Stored Thumbnail position is not applied to the newly created thumbnail immediately

This commit is contained in:
Anton Kasyanov
2016-06-05 18:26:49 +03:00
parent 68e1a32009
commit 5b768579ca
2 changed files with 6 additions and 2 deletions

View File

@@ -11,7 +11,6 @@ namespace EveOPreview.UI
{ {
#region Private constants #region Private constants
private const string ClientProcessName = "ExeFile"; private const string ClientProcessName = "ExeFile";
private const string DefaultThumbnailTitle = "...";
#endregion #endregion
#region Private fields #region Private fields
@@ -194,12 +193,13 @@ namespace EveOPreview.UI
if ((view == null) && (processTitle != "")) if ((view == null) && (processTitle != ""))
{ {
view = this._thumbnailViewFactory.Create(processHandle, ThumbnailManager.DefaultThumbnailTitle, this._configuration.ThumbnailSize); view = this._thumbnailViewFactory.Create(processHandle, processTitle, this._configuration.ThumbnailSize);
view.IsEnabled = true; view.IsEnabled = true;
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays; view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize); view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop); view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
view.SetWindowFrames(this._configuration.ShowThumbnailFrames); view.SetWindowFrames(this._configuration.ShowThumbnailFrames);
view.Location = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.Location);
view.ThumbnailResized += ThumbnailViewResized; view.ThumbnailResized += ThumbnailViewResized;
view.ThumbnailMoved += ThumbnailViewMoved; view.ThumbnailMoved += ThumbnailViewMoved;

View File

@@ -76,6 +76,10 @@ namespace EveOPreview.UI
public new void Show() public new void Show()
{ {
this.StartPosition = (this.Location.X > 0) || (this.Location.Y > 0)
? FormStartPosition.Manual
: FormStartPosition.WindowsDefaultLocation;
base.Show(); base.Show();
if (this.IsOverlayEnabled) if (this.IsOverlayEnabled)