diff --git a/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs b/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs index 2d65319..b22c926 100644 --- a/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs +++ b/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs @@ -19,6 +19,7 @@ namespace EveOPreview.Configuration.Omplementation this.ClientLayout = new Dictionary(); this.ClientHotkey = new Dictionary(); this.DisableThumbnail = new Dictionary(); + this.PriorityClients = new List(); this.MinimizeToTray = false; this.ThumbnailRefreshPeriod = 500; @@ -119,6 +120,8 @@ namespace EveOPreview.Configuration.Omplementation private Dictionary ClientHotkey { get; set; } [JsonProperty] private Dictionary DisableThumbnail { get; set; } + [JsonProperty] + private List PriorityClients { get; set; } public Point GetDefaultThumbnailLocation() { @@ -208,6 +211,11 @@ namespace EveOPreview.Configuration.Omplementation this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey); } + public bool IsPriorityClient(string currentClient) + { + return this.PriorityClients.Contains(currentClient); + } + public bool IsThumbnailDisabled(string currentClient) { return this.DisableThumbnail.TryGetValue(currentClient, out bool isDisabled) && isDisabled; diff --git a/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs b/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs index d182f78..565e395 100644 --- a/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs +++ b/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs @@ -44,6 +44,8 @@ namespace EveOPreview.Configuration Keys GetClientHotkey(string currentClient); void SetClientHotkey(string currentClient, Keys hotkey); + bool IsPriorityClient(string currentClient); + bool IsThumbnailDisabled(string currentClient); void ToggleThumbnail(string currentClient, bool isDisabled); diff --git a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs index 15b9de1..1fe7862 100644 --- a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs +++ b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs @@ -334,7 +334,7 @@ namespace EveOPreview.Services } // Minimize the currently active client if needed - if (this._configuration.MinimizeInactiveClients) + if (this._configuration.MinimizeInactiveClients && !this._configuration.IsPriorityClient(this._activeClient.Title)) { this._windowManager.MinimizeWindow(this._activeClient.Handle, false); }