From a6497ad25a7c50a01f73bff997d146c1857cc95c Mon Sep 17 00:00:00 2001 From: Aura Asuna Date: Wed, 11 May 2022 01:02:05 +1000 Subject: [PATCH] use numbers when defining cycle order to avoid issues going over 10 --- README.md | 6 ++--- .../Implementation/ThumbnailConfiguration.cs | 26 ++++++++++++------- .../Interface/IThumbnailConfiguration.cs | 4 +-- .../Implementation/ThumbnailManager.cs | 6 ++--- .../View/Implementation/ThumbnailView.cs | 2 +- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 744a72c..23e6c47 100644 --- a/README.md +++ b/README.md @@ -189,9 +189,9 @@ Open the file using any text editor. find the entries **CycleGroup1ForwardHotkey Next find the entry **CycleGroup1ForwardHotkeys**. Most probably it will look like "CycleGroup1ClientsOrder": { - "EVE - Example DPS Toon 1": "1", - "EVE - Example DPS Toon 2": "2", - "EVE - Example DPS Toon 3": "3" + "EVE - Example DPS Toon 1": 1, + "EVE - Example DPS Toon 2": 2, + "EVE - Example DPS Toon 3": 3 } You should modify this entry with a list of each of your clients replacing "Example DPS Toon 1", etc with the name of your character. The numbers on the right are used to force the order in which they cycle. diff --git a/src/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs b/src/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs index 92142b1..22864c1 100644 --- a/src/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs +++ b/src/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs @@ -15,22 +15,24 @@ namespace EveOPreview.Configuration.Implementation public ThumbnailConfiguration() { + this.ConfigVersion = 1; + this.CycleGroup1ForwardHotkeys = new List { "F14", "Control+F14" }; this.CycleGroup1BackwardHotkeys = new List { "F13", "Control+F13" }; - this.CycleGroup1ClientsOrder = new Dictionary + this.CycleGroup1ClientsOrder = new Dictionary { - { "EVE - Example DPS Toon 1", "1" }, - { "EVE - Example DPS Toon 2", "2" }, - { "EVE - Example DPS Toon 3", "3" } + { "EVE - Example DPS Toon 1", 1 }, + { "EVE - Example DPS Toon 2", 2 }, + { "EVE - Example DPS Toon 3", 3 } }; this.CycleGroup2ForwardHotkeys = new List { "F16", "Control+F16" }; this.CycleGroup2BackwardHotkeys = new List { "F15", "Control+F15" }; - this.CycleGroup2ClientsOrder = new Dictionary + this.CycleGroup2ClientsOrder = new Dictionary { - { "EVE - Example Logi Toon 1", "1" }, - { "EVE - Example Scout Toon 2", "2" }, - { "EVE - Example Tackle Toon 3", "3" } + { "EVE - Example Logi Toon 1", 1 }, + { "EVE - Example Scout Toon 2", 2 }, + { "EVE - Example Tackle Toon 3", 3 } }; this.PerClientActiveClientHighlightColor = new Dictionary @@ -82,6 +84,10 @@ namespace EveOPreview.Configuration.Implementation this.LoginThumbnailLocation = new Point(5, 5); } + + [JsonProperty("ConfigVersion")] + public int ConfigVersion { get; set; } + [JsonProperty("CycleGroup1ForwardHotkeys")] public List CycleGroup1ForwardHotkeys { get; set; } @@ -89,7 +95,7 @@ namespace EveOPreview.Configuration.Implementation public List CycleGroup1BackwardHotkeys { get; set; } [JsonProperty("CycleGroup1ClientsOrder")] - public Dictionary CycleGroup1ClientsOrder { get; set; } + public Dictionary CycleGroup1ClientsOrder { get; set; } [JsonProperty("CycleGroup2ForwardHotkeys")] public List CycleGroup2ForwardHotkeys { get; set; } @@ -98,7 +104,7 @@ namespace EveOPreview.Configuration.Implementation public List CycleGroup2BackwardHotkeys { get; set; } [JsonProperty("CycleGroup2ClientsOrder")] - public Dictionary CycleGroup2ClientsOrder { get; set; } + public Dictionary CycleGroup2ClientsOrder { get; set; } [JsonProperty("PerClientActiveClientHighlightColor")] public Dictionary PerClientActiveClientHighlightColor { get; set; } diff --git a/src/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs b/src/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs index fa87807..ae992d8 100644 --- a/src/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs +++ b/src/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs @@ -8,11 +8,11 @@ namespace EveOPreview.Configuration { List CycleGroup1ForwardHotkeys { get; set; } List CycleGroup1BackwardHotkeys { get; set; } - Dictionary CycleGroup1ClientsOrder { get; set; } + Dictionary CycleGroup1ClientsOrder { get; set; } List CycleGroup2ForwardHotkeys { get; set; } List CycleGroup2BackwardHotkeys { get; set; } - Dictionary CycleGroup2ClientsOrder { get; set; } + Dictionary CycleGroup2ClientsOrder { get; set; } Dictionary PerClientActiveClientHighlightColor { get; set; } diff --git a/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs index 8c087e9..cd3166b 100644 --- a/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs +++ b/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs @@ -109,9 +109,9 @@ namespace EveOPreview.Services newClient.Value.Refresh(true); } - public void CycleNextClient(bool isForwards, Dictionary cycleOrder) + public void CycleNextClient(bool isForwards, Dictionary cycleOrder) { - IOrderedEnumerable> clientOrder; + IOrderedEnumerable> clientOrder; if (isForwards) { clientOrder = cycleOrder.OrderBy(x => x.Value); @@ -159,7 +159,7 @@ namespace EveOPreview.Services } } - public void RegisterCycleClientHotkey(IEnumerable keys, bool isForwards, Dictionary cycleOrder) + public void RegisterCycleClientHotkey(IEnumerable keys, bool isForwards, Dictionary cycleOrder) { foreach (var hotkey in keys) { diff --git a/src/Eve-O-Preview/View/Implementation/ThumbnailView.cs b/src/Eve-O-Preview/View/Implementation/ThumbnailView.cs index 138ea44..279312e 100644 --- a/src/Eve-O-Preview/View/Implementation/ThumbnailView.cs +++ b/src/Eve-O-Preview/View/Implementation/ThumbnailView.cs @@ -34,7 +34,7 @@ namespace EveOPreview.View private bool _isCustomMouseModeActive; private double _opacity; - + private DateTime _suppressResizeEventsTimestamp; private Size _baseZoomSize; private Point _baseZoomLocation;