diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index d31cbcd30..cb6ee3990 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -256,6 +256,7 @@ + @@ -278,6 +279,7 @@ + diff --git a/Artemis/Artemis/DAL/ProfileProvider.cs b/Artemis/Artemis/DAL/ProfileProvider.cs new file mode 100644 index 000000000..a3d3aadd1 --- /dev/null +++ b/Artemis/Artemis/DAL/ProfileProvider.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using System.Linq; +using Artemis.Models; + +namespace Artemis.DAL +{ + internal class ProfileProvider + { + /// + /// Get all profiles + /// + /// All profiles + public List GetAll() + { + return new List(); + } + + /// + /// Get all profiles matching the provided game + /// + /// The game to match + /// All profiles matching the provided game + public List GetAll(GameModel game) + { + return GetAll().Where(g => g.GameName.Equals(game.Name)).ToList(); + } + + /// + /// Adds or update the given profile. + /// Updates occur when a profile with the same name and game exist. + /// + /// The profile to add or update + public void AddOrUpdate(ProfileModel profile) + { + } + } +} \ No newline at end of file diff --git a/Artemis/Artemis/KeyboardProviders/Logitech/Orion.cs b/Artemis/Artemis/KeyboardProviders/Logitech/Orion.cs index e72086e84..eb7a76195 100644 --- a/Artemis/Artemis/KeyboardProviders/Logitech/Orion.cs +++ b/Artemis/Artemis/KeyboardProviders/Logitech/Orion.cs @@ -11,12 +11,14 @@ namespace Artemis.KeyboardProviders.Logitech { internal class Orion : KeyboardProvider { + private string _versionString; + public Orion() { Name = "Logitech G910 RGB"; CantEnableText = "Couldn't connect to your Logitech G910.\n" + "Please check your cables and updating the Logitech Gaming Software\n" + - "A minimum version of 8.81.15 is required).\n\n" + + $"A minimum version of 8.81.15 is required. (Detected {_versionString})\n\n" + "If needed, you can select a different keyboard in Artemis under settings."; Height = 6; Width = 21; @@ -30,7 +32,6 @@ namespace Artemis.KeyboardProviders.Logitech public override bool CanEnable() { - return true; if (DllManager.RestoreDll()) RestoreDll(); int majorNum = 0, minorNum = 0, buildNum = 0; @@ -41,6 +42,7 @@ namespace Artemis.KeyboardProviders.Logitech // Turn it into one long number... var version = int.Parse($"{majorNum}{minorNum}{buildNum}"); + _versionString = $"{majorNum}.{minorNum}.{buildNum}"; return version >= 88115; } diff --git a/Artemis/Artemis/KeyboardProviders/Razer/BlackWidow.cs b/Artemis/Artemis/KeyboardProviders/Razer/BlackWidow.cs index f0f409e11..fb5594498 100644 --- a/Artemis/Artemis/KeyboardProviders/Razer/BlackWidow.cs +++ b/Artemis/Artemis/KeyboardProviders/Razer/BlackWidow.cs @@ -13,8 +13,8 @@ namespace Artemis.KeyboardProviders.Razer public BlackWidow() { Name = "Razer BlackWidow Chroma"; - CantEnableText = "Couldn't connect to your Razer BlackWidow Chroma.\n " + - "Please check your cables and try updating Razer Synapse.\n\n " + + CantEnableText = "Couldn't connect to your Razer BlackWidow Chroma.\n" + + "Please check your cables and try updating Razer Synapse.\n\n" + "If needed, you can select a different keyboard in Artemis under settings."; } diff --git a/Artemis/Artemis/Models/ProfileModel.cs b/Artemis/Artemis/Models/ProfileModel.cs new file mode 100644 index 000000000..6e4471686 --- /dev/null +++ b/Artemis/Artemis/Models/ProfileModel.cs @@ -0,0 +1,14 @@ +using Artemis.Components; + +namespace Artemis.Models +{ + public class ProfileModel + { + public string Name { get; set; } + + public string KeyboardName { get; set; } + public string GameName { get; set; } + + public LayerComposite Layers { get; set; } + } +} \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Games/TheDivision/TheDivisionDataModel.cs b/Artemis/Artemis/Modules/Games/TheDivision/TheDivisionDataModel.cs index b89b74583..301676bfb 100644 --- a/Artemis/Artemis/Modules/Games/TheDivision/TheDivisionDataModel.cs +++ b/Artemis/Artemis/Modules/Games/TheDivision/TheDivisionDataModel.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; + using System.Collections.Generic; using Artemis.Models.Interfaces; namespace Artemis.Modules.Games.TheDivision diff --git a/Artemis/Artemis/ViewModels/ProfileEditorViewModel.cs b/Artemis/Artemis/ViewModels/ProfileEditorViewModel.cs index 7689dd64b..dafad9215 100644 --- a/Artemis/Artemis/ViewModels/ProfileEditorViewModel.cs +++ b/Artemis/Artemis/ViewModels/ProfileEditorViewModel.cs @@ -1,4 +1,6 @@ -using System.Windows.Media; +using System.Collections.Generic; +using System.Windows.Media; +using Artemis.Components; using Artemis.KeyboardProviders; using Caliburn.Micro;