Some EVE clients should not be minimized even if the 'Minimize inactive clients' option is enabled
This commit is contained in:
@@ -19,6 +19,7 @@ namespace EveOPreview.Configuration.Omplementation
|
|||||||
this.ClientLayout = new Dictionary<string, ClientLayout>();
|
this.ClientLayout = new Dictionary<string, ClientLayout>();
|
||||||
this.ClientHotkey = new Dictionary<string, string>();
|
this.ClientHotkey = new Dictionary<string, string>();
|
||||||
this.DisableThumbnail = new Dictionary<string, bool>();
|
this.DisableThumbnail = new Dictionary<string, bool>();
|
||||||
|
this.PriorityClients = new List<string>();
|
||||||
|
|
||||||
this.MinimizeToTray = false;
|
this.MinimizeToTray = false;
|
||||||
this.ThumbnailRefreshPeriod = 500;
|
this.ThumbnailRefreshPeriod = 500;
|
||||||
@@ -119,6 +120,8 @@ namespace EveOPreview.Configuration.Omplementation
|
|||||||
private Dictionary<string, string> ClientHotkey { get; set; }
|
private Dictionary<string, string> ClientHotkey { get; set; }
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
private Dictionary<string, bool> DisableThumbnail { get; set; }
|
private Dictionary<string, bool> DisableThumbnail { get; set; }
|
||||||
|
[JsonProperty]
|
||||||
|
private List<string> PriorityClients { get; set; }
|
||||||
|
|
||||||
public Point GetDefaultThumbnailLocation()
|
public Point GetDefaultThumbnailLocation()
|
||||||
{
|
{
|
||||||
@@ -208,6 +211,11 @@ namespace EveOPreview.Configuration.Omplementation
|
|||||||
this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey);
|
this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsPriorityClient(string currentClient)
|
||||||
|
{
|
||||||
|
return this.PriorityClients.Contains(currentClient);
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsThumbnailDisabled(string currentClient)
|
public bool IsThumbnailDisabled(string currentClient)
|
||||||
{
|
{
|
||||||
return this.DisableThumbnail.TryGetValue(currentClient, out bool isDisabled) && isDisabled;
|
return this.DisableThumbnail.TryGetValue(currentClient, out bool isDisabled) && isDisabled;
|
||||||
|
@@ -44,6 +44,8 @@ namespace EveOPreview.Configuration
|
|||||||
Keys GetClientHotkey(string currentClient);
|
Keys GetClientHotkey(string currentClient);
|
||||||
void SetClientHotkey(string currentClient, Keys hotkey);
|
void SetClientHotkey(string currentClient, Keys hotkey);
|
||||||
|
|
||||||
|
bool IsPriorityClient(string currentClient);
|
||||||
|
|
||||||
bool IsThumbnailDisabled(string currentClient);
|
bool IsThumbnailDisabled(string currentClient);
|
||||||
void ToggleThumbnail(string currentClient, bool isDisabled);
|
void ToggleThumbnail(string currentClient, bool isDisabled);
|
||||||
|
|
||||||
|
@@ -334,7 +334,7 @@ namespace EveOPreview.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Minimize the currently active client if needed
|
// 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);
|
this._windowManager.MinimizeWindow(this._activeClient.Handle, false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user