Thumbnail positions are not saved on exit
This commit is contained in:
@@ -35,7 +35,6 @@ namespace EveOPreview.UI
|
|||||||
this._thumbnailDescriptionViews = new Dictionary<IntPtr, IThumbnailDescriptionView>();
|
this._thumbnailDescriptionViews = new Dictionary<IntPtr, IThumbnailDescriptionView>();
|
||||||
this._exitApplication = false;
|
this._exitApplication = false;
|
||||||
|
|
||||||
this.View.ApplicationExitRequested += ExitApplication;
|
|
||||||
this.View.FormActivated += Activate;
|
this.View.FormActivated += Activate;
|
||||||
this.View.FormMinimized += Minimize;
|
this.View.FormMinimized += Minimize;
|
||||||
this.View.FormCloseRequested += Close;
|
this.View.FormCloseRequested += Close;
|
||||||
@@ -43,6 +42,7 @@ namespace EveOPreview.UI
|
|||||||
this.View.ThumbnailsSizeChanged += UpdateThumbnailsSize;
|
this.View.ThumbnailsSizeChanged += UpdateThumbnailsSize;
|
||||||
this.View.ThumbnailStateChanged += UpdateThumbnailState;
|
this.View.ThumbnailStateChanged += UpdateThumbnailState;
|
||||||
this.View.ForumUrlLinkActivated += OpenForumUrlLink;
|
this.View.ForumUrlLinkActivated += OpenForumUrlLink;
|
||||||
|
this.View.ApplicationExitRequested += ExitApplication;
|
||||||
|
|
||||||
this._thumbnailManager.ThumbnailsAdded += ThumbnailsAdded;
|
this._thumbnailManager.ThumbnailsAdded += ThumbnailsAdded;
|
||||||
this._thumbnailManager.ThumbnailsUpdated += ThumbnailsUpdated;
|
this._thumbnailManager.ThumbnailsUpdated += ThumbnailsUpdated;
|
||||||
@@ -50,14 +50,6 @@ namespace EveOPreview.UI
|
|||||||
this._thumbnailManager.ThumbnailSizeChanged += ThumbnailSizeChanged;
|
this._thumbnailManager.ThumbnailSizeChanged += ThumbnailSizeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExitApplication()
|
|
||||||
{
|
|
||||||
this._thumbnailManager.Deactivate();
|
|
||||||
this._configurationStorage.Save();
|
|
||||||
this._exitApplication = true;
|
|
||||||
this.View.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Activate()
|
private void Activate()
|
||||||
{
|
{
|
||||||
this.LoadApplicationSettings();
|
this.LoadApplicationSettings();
|
||||||
@@ -80,6 +72,8 @@ namespace EveOPreview.UI
|
|||||||
{
|
{
|
||||||
if (this._exitApplication || !this.View.MinimizeToTray)
|
if (this._exitApplication || !this.View.MinimizeToTray)
|
||||||
{
|
{
|
||||||
|
this._thumbnailManager.Deactivate();
|
||||||
|
this._configurationStorage.Save();
|
||||||
request.Allow = true;
|
request.Allow = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -223,5 +217,11 @@ namespace EveOPreview.UI
|
|||||||
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
|
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
|
||||||
Process.Start(processStartInfo);
|
Process.Start(processStartInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExitApplication()
|
||||||
|
{
|
||||||
|
this._exitApplication = true;
|
||||||
|
this.View.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user