use numbers when defining cycle order to avoid issues going over 10

This commit is contained in:
Aura Asuna
2022-05-11 01:02:05 +10:00
parent 533a208bff
commit a6497ad25a
5 changed files with 25 additions and 19 deletions

View File

@@ -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.

View File

@@ -15,22 +15,24 @@ namespace EveOPreview.Configuration.Implementation
public ThumbnailConfiguration()
{
this.ConfigVersion = 1;
this.CycleGroup1ForwardHotkeys = new List<string> { "F14", "Control+F14" };
this.CycleGroup1BackwardHotkeys = new List<string> { "F13", "Control+F13" };
this.CycleGroup1ClientsOrder = new Dictionary<string, string>
this.CycleGroup1ClientsOrder = new Dictionary<string, int>
{
{ "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<string> { "F16", "Control+F16" };
this.CycleGroup2BackwardHotkeys = new List<string> { "F15", "Control+F15" };
this.CycleGroup2ClientsOrder = new Dictionary<string, string>
this.CycleGroup2ClientsOrder = new Dictionary<string, int>
{
{ "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<string, Color>
@@ -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<string> CycleGroup1ForwardHotkeys { get; set; }
@@ -89,7 +95,7 @@ namespace EveOPreview.Configuration.Implementation
public List<string> CycleGroup1BackwardHotkeys { get; set; }
[JsonProperty("CycleGroup1ClientsOrder")]
public Dictionary<string, string> CycleGroup1ClientsOrder { get; set; }
public Dictionary<string, int> CycleGroup1ClientsOrder { get; set; }
[JsonProperty("CycleGroup2ForwardHotkeys")]
public List<string> CycleGroup2ForwardHotkeys { get; set; }
@@ -98,7 +104,7 @@ namespace EveOPreview.Configuration.Implementation
public List<string> CycleGroup2BackwardHotkeys { get; set; }
[JsonProperty("CycleGroup2ClientsOrder")]
public Dictionary<string, string> CycleGroup2ClientsOrder { get; set; }
public Dictionary<string, int> CycleGroup2ClientsOrder { get; set; }
[JsonProperty("PerClientActiveClientHighlightColor")]
public Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }

View File

@@ -8,11 +8,11 @@ namespace EveOPreview.Configuration
{
List<string> CycleGroup1ForwardHotkeys { get; set; }
List<string> CycleGroup1BackwardHotkeys { get; set; }
Dictionary<string, string> CycleGroup1ClientsOrder { get; set; }
Dictionary<string, int> CycleGroup1ClientsOrder { get; set; }
List<string> CycleGroup2ForwardHotkeys { get; set; }
List<string> CycleGroup2BackwardHotkeys { get; set; }
Dictionary<string, string> CycleGroup2ClientsOrder { get; set; }
Dictionary<string, int> CycleGroup2ClientsOrder { get; set; }
Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }

View File

@@ -109,9 +109,9 @@ namespace EveOPreview.Services
newClient.Value.Refresh(true);
}
public void CycleNextClient(bool isForwards, Dictionary<string, string> cycleOrder)
public void CycleNextClient(bool isForwards, Dictionary<string, int> cycleOrder)
{
IOrderedEnumerable<KeyValuePair<string, string>> clientOrder;
IOrderedEnumerable<KeyValuePair<string, int>> clientOrder;
if (isForwards)
{
clientOrder = cycleOrder.OrderBy(x => x.Value);
@@ -159,7 +159,7 @@ namespace EveOPreview.Services
}
}
public void RegisterCycleClientHotkey(IEnumerable<Keys> keys, bool isForwards, Dictionary<string, string> cycleOrder)
public void RegisterCycleClientHotkey(IEnumerable<Keys> keys, bool isForwards, Dictionary<string, int> cycleOrder)
{
foreach (var hotkey in keys)
{