diff --git a/Eve-O-Preview/Configuration/AppConfig.cs b/Eve-O-Preview/Configuration/Implementation/AppConfig.cs
similarity index 71%
rename from Eve-O-Preview/Configuration/AppConfig.cs
rename to Eve-O-Preview/Configuration/Implementation/AppConfig.cs
index c059d39..daa7de0 100644
--- a/Eve-O-Preview/Configuration/AppConfig.cs
+++ b/Eve-O-Preview/Configuration/Implementation/AppConfig.cs
@@ -1,4 +1,4 @@
-namespace EveOPreview.Configuration
+namespace EveOPreview.Configuration.Implementation
{
class AppConfig : IAppConfig
{
diff --git a/Eve-O-Preview/Configuration/ConfigurationStorage.cs b/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs
similarity index 92%
rename from Eve-O-Preview/Configuration/ConfigurationStorage.cs
rename to Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs
index 50a0663..e07ec8f 100644
--- a/Eve-O-Preview/Configuration/ConfigurationStorage.cs
+++ b/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs
@@ -1,7 +1,7 @@
using System.IO;
using Newtonsoft.Json;
-namespace EveOPreview.Configuration
+namespace EveOPreview.Configuration.Implementation
{
class ConfigurationStorage : IConfigurationStorage
{
diff --git a/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs b/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs
index b22c926..eac17e9 100644
--- a/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs
+++ b/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs
@@ -3,7 +3,7 @@
using System.Windows.Forms;
using Newtonsoft.Json;
-namespace EveOPreview.Configuration.Omplementation
+namespace EveOPreview.Configuration.Implementation
{
sealed class ThumbnailConfiguration : IThumbnailConfiguration
{
diff --git a/Eve-O-Preview/Configuration/ClientLayout.cs b/Eve-O-Preview/Configuration/Interface/ClientLayout.cs
similarity index 100%
rename from Eve-O-Preview/Configuration/ClientLayout.cs
rename to Eve-O-Preview/Configuration/Interface/ClientLayout.cs
diff --git a/Eve-O-Preview/Configuration/IAppConfig.cs b/Eve-O-Preview/Configuration/Interface/IAppConfig.cs
similarity index 100%
rename from Eve-O-Preview/Configuration/IAppConfig.cs
rename to Eve-O-Preview/Configuration/Interface/IAppConfig.cs
diff --git a/Eve-O-Preview/Configuration/IConfigurationStorage.cs b/Eve-O-Preview/Configuration/Interface/IConfigurationStorage.cs
similarity index 100%
rename from Eve-O-Preview/Configuration/IConfigurationStorage.cs
rename to Eve-O-Preview/Configuration/Interface/IConfigurationStorage.cs
diff --git a/Eve-O-Preview/Configuration/ZoomAnchor.cs b/Eve-O-Preview/Configuration/Interface/ZoomAnchor.cs
similarity index 100%
rename from Eve-O-Preview/Configuration/ZoomAnchor.cs
rename to Eve-O-Preview/Configuration/Interface/ZoomAnchor.cs
diff --git a/Eve-O-Preview/Eve-O-Preview.csproj b/Eve-O-Preview/Eve-O-Preview.csproj
index cf8b4be..abdecee 100644
--- a/Eve-O-Preview/Eve-O-Preview.csproj
+++ b/Eve-O-Preview/Eve-O-Preview.csproj
@@ -19,7 +19,7 @@
true
full
false
- bin\Debug\
+ ..\bin
DEBUG;TRACE
prompt
4
@@ -30,7 +30,7 @@
pdbonly
true
- bin\Release\
+ ..\bin
TRACE
prompt
4
@@ -108,11 +108,11 @@
-
-
-
+
+
+
-
+
@@ -143,7 +143,7 @@
-
+
@@ -167,7 +167,7 @@
MainForm.cs
-
+
diff --git a/Eve-O-Preview/Presenters/Implementation/MainFormPresenter.cs b/Eve-O-Preview/Presenters/Implementation/MainFormPresenter.cs
index e4fa52e..8d35104 100644
--- a/Eve-O-Preview/Presenters/Implementation/MainFormPresenter.cs
+++ b/Eve-O-Preview/Presenters/Implementation/MainFormPresenter.cs
@@ -12,7 +12,7 @@ namespace EveOPreview.Presenters
public class MainFormPresenter : Presenter, IMainFormPresenter
{
#region Private constants
- private const string ForumUrl = @"https://meta.eveonline.com/t/4202";
+ private const string ForumUrl = @"https://forum.eveonline.com/t/4202";
#endregion
#region Private fields
@@ -232,7 +232,7 @@ private void OpenDocumentationLink()
private string GetApplicationVersion()
{
Version version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
- return $"{version.Major}.{version.Minor}.{version.Revision}";
+ return $"{version.Major}.{version.Minor}.{version.Build}";
}
private void ExitApplication()
diff --git a/Eve-O-Preview/Properties/AssemblyInfo.cs b/Eve-O-Preview/Properties/AssemblyInfo.cs
index 0867608..363b1d9 100644
--- a/Eve-O-Preview/Properties/AssemblyInfo.cs
+++ b/Eve-O-Preview/Properties/AssemblyInfo.cs
@@ -12,7 +12,7 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
-[assembly: AssemblyVersion("4.0.0.0")]
-[assembly: AssemblyFileVersion("4.0.0.0")]
+[assembly: AssemblyVersion("4.0.1.0")]
+[assembly: AssemblyFileVersion("4.0.1.0")]
[assembly: CLSCompliant(false)]
\ No newline at end of file
diff --git a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs
index 1fe7862..693e12d 100644
--- a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs
+++ b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs
@@ -198,7 +198,7 @@ private void RefreshThumbnails()
this.SwitchActiveClient(foregroundWindowHandle, foregroundWindowTitle);
}
- bool hideAllThumbnails = this._configuration.HideThumbnailsOnLostFocus && !(string.IsNullOrEmpty(foregroundWindowTitle) || this.IsClientWindowActive(foregroundWindowHandle));
+ bool hideAllThumbnails = this._configuration.HideThumbnailsOnLostFocus && !this.IsClientWindowActive(foregroundWindowHandle);
this._refreshCycleCount++;
@@ -383,11 +383,20 @@ private void ThumbnailViewLostFocus(IntPtr id)
private void ThumbnailActivated(IntPtr id)
{
- // View is always available because this method is actually being called by
- // a view callback
IThumbnailView view = this._thumbnailViews[id];
- Task.Run(() => this._windowManager.ActivateWindow(view.Id));
+ Task.Run(() =>
+ {
+ this._windowManager.ActivateWindow(view.Id);
+ })
+ .ConfigureAwait(true)
+ .GetAwaiter()
+ .OnCompleted(() =>
+ {
+ this.SwitchActiveClient(view.Id, view.Title);
+ this.UpdateClientLayouts();
+ this.RefreshThumbnails();
+ });
this.UpdateClientLayouts();
}
diff --git a/Eve-O-Preview/View/Implementation/ThumbnailOverlay.Designer.cs b/Eve-O-Preview/View/Implementation/ThumbnailOverlay.Designer.cs
index a089ab4..b1668ae 100644
--- a/Eve-O-Preview/View/Implementation/ThumbnailOverlay.Designer.cs
+++ b/Eve-O-Preview/View/Implementation/ThumbnailOverlay.Designer.cs
@@ -61,7 +61,7 @@ private void InitializeComponent()
// ThumbnailOverlay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(284, 262);
this.ControlBox = false;
diff --git a/Eve-O-Preview/View/Implementation/ThumbnailView.Designer.cs b/Eve-O-Preview/View/Implementation/ThumbnailView.Designer.cs
index 2271a94..c0540fd 100644
--- a/Eve-O-Preview/View/Implementation/ThumbnailView.Designer.cs
+++ b/Eve-O-Preview/View/Implementation/ThumbnailView.Designer.cs
@@ -20,7 +20,7 @@ private void InitializeComponent()
//
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(153, 89);
this.ControlBox = false;
diff --git a/Eve-O-Preview/View/Implementation/ThumbnailView.cs b/Eve-O-Preview/View/Implementation/ThumbnailView.cs
index b4cdb8b..7199707 100644
--- a/Eve-O-Preview/View/Implementation/ThumbnailView.cs
+++ b/Eve-O-Preview/View/Implementation/ThumbnailView.cs
@@ -9,6 +9,10 @@ namespace EveOPreview.View
{
public partial class ThumbnailView : Form, IThumbnailView
{
+ #region Private constants
+ private const int ResizeEventTimeout = 500;
+ #endregion
+
#region Private fields
private readonly IWindowManager _windowManager;
private readonly ThumbnailOverlay _overlay;
@@ -34,6 +38,8 @@ public partial class ThumbnailView : Form, IThumbnailView
public ThumbnailView(IWindowManager windowManager)
{
+ this.SuppressResizeEvent();
+
this._windowManager = windowManager;
this.IsActive = false;
@@ -48,8 +54,6 @@ public ThumbnailView(IWindowManager windowManager)
this._isHighlightEnabled = false;
- this._suppressResizeEventsTimestamp = DateTime.UtcNow;
-
InitializeComponent();
this._overlay = new ThumbnailOverlay(this, this.MouseDown_Handler);
@@ -104,20 +108,23 @@ public Size ThumbnailSize
public new void Show()
{
+ this.SuppressResizeEvent();
+
base.Show();
this._isLocationChanged = true;
this._isSizeChanged = true;
this._isOverlayVisible = false;
- // Thumbnail will be properly registered during the Manager's Refresh cycle
- this.Refresh();
+ this.Refresh(true);
this.IsActive = true;
}
public new void Hide()
{
+ this.SuppressResizeEvent();
+
this.IsActive = false;
this._overlay.Hide();
@@ -126,6 +133,8 @@ public Size ThumbnailSize
public new void Close()
{
+ this.SuppressResizeEvent();
+
this.IsActive = false;
this._thumbnail?.Unregister();
this._overlay.Close();
@@ -165,9 +174,8 @@ public void SetFrames(bool enable)
return;
}
- // Fix for WinForms issue with the Resize event being fired with inconsistent ClientSize value
- // Any Resize events fired before this timestamp will be ignored
- this._suppressResizeEventsTimestamp = DateTime.UtcNow.AddMilliseconds(450);
+ this.SuppressResizeEvent();
+
this.FormBorderStyle = style;
// Notify about possible contents position change
@@ -176,12 +184,12 @@ public void SetFrames(bool enable)
public void SetTopMost(bool enableTopmost)
{
- // IMO WinForms could check this too
if (this._isTopMost == enableTopmost)
{
return;
}
+ this.TopLevel = enableTopmost;
this.TopMost = enableTopmost;
this._overlay.TopMost = enableTopmost;
@@ -384,6 +392,13 @@ private void RecalculateThumbnailSize()
this._thumbnail.Move(0 + highlightWidthLeft, 0 + this._highlightWidth, baseWidth - highlightWidthRight, baseHeight - this._highlightWidth);
}
+ private void SuppressResizeEvent()
+ {
+ // Workaround for WinForms issue with the Resize event being fired with inconsistent ClientSize value
+ // Any Resize events fired before this timestamp will be ignored
+ this._suppressResizeEventsTimestamp = DateTime.UtcNow.AddMilliseconds(ThumbnailView.ResizeEventTimeout);
+ }
+
#region GUI events
protected override CreateParams CreateParams
{
diff --git a/Eve-O-Preview/app.manifest b/Eve-O-Preview/app.manifest
index 555d4c6..5fc7044 100644
--- a/Eve-O-Preview/app.manifest
+++ b/Eve-O-Preview/app.manifest
@@ -75,6 +75,7 @@
True/PM
+ PerMonitorV2