mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Bumped version to 1.4.0.0
Implemented layout selection Updated default profiles
This commit is contained in:
parent
50decfc6e0
commit
46cebbc2f9
@ -1,13 +1,17 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.DAL;
|
||||
using Artemis.DeviceProviders.Logitech.Utilities;
|
||||
using Artemis.Properties;
|
||||
using Artemis.Settings;
|
||||
|
||||
namespace Artemis.DeviceProviders.Logitech
|
||||
{
|
||||
internal class G810 : LogitechKeyboard
|
||||
{
|
||||
private GeneralSettings _generalSettings;
|
||||
|
||||
public G810()
|
||||
{
|
||||
Name = "Logitech G810 RGB";
|
||||
@ -19,11 +23,14 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
Height = 6;
|
||||
Width = 21;
|
||||
PreviewSettings = new PreviewSettings(675, 185, new Thickness(0, 35, 0, 0), Resources.g810);
|
||||
_generalSettings = SettingsProvider.Load<GeneralSettings>();
|
||||
}
|
||||
|
||||
public override KeyMatch? GetKeyPosition(Keys keyCode)
|
||||
{
|
||||
return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
|
||||
return _generalSettings.Layout == "Qwerty"
|
||||
? KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode)
|
||||
: KeyMap.AzertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,13 +3,17 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.DAL;
|
||||
using Artemis.DeviceProviders.Logitech.Utilities;
|
||||
using Artemis.Properties;
|
||||
using Artemis.Settings;
|
||||
|
||||
namespace Artemis.DeviceProviders.Logitech
|
||||
{
|
||||
internal class G910 : LogitechKeyboard
|
||||
{
|
||||
private readonly GeneralSettings _generalSettings;
|
||||
|
||||
public G910()
|
||||
{
|
||||
Name = "Logitech G910 RGB";
|
||||
@ -21,11 +25,17 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
Height = 7;
|
||||
Width = 22;
|
||||
PreviewSettings = new PreviewSettings(570, 175, new Thickness(-10, -105, 0, 0), Resources.g910);
|
||||
_generalSettings = SettingsProvider.Load<GeneralSettings>();
|
||||
}
|
||||
|
||||
public override KeyMatch? GetKeyPosition(Keys keyCode)
|
||||
{
|
||||
return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
|
||||
var value = _generalSettings.Layout == "Qwerty"
|
||||
? KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode)
|
||||
: KeyMap.AzertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
|
||||
|
||||
// Adjust the distance by 1 on both x and y for the G910
|
||||
return new KeyMatch(value.KeyCode, value.X + 1, value.Y + 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Artemis.DeviceProviders.Logitech
|
||||
|
||||
// Turn it into one long number...
|
||||
var version = int.Parse($"{majorNum}{minorNum}{buildNum}");
|
||||
CantEnableText = "Couldn't connect to your Logitech G910.\n" +
|
||||
CantEnableText = "Couldn't connect to your Logitech keyboard.\n" +
|
||||
"Please check your cables and updating the Logitech Gaming Software\n" +
|
||||
$"A minimum version of 8.81.15 is required (detected {majorNum}.{minorNum}.{buildNum}).\n\n" +
|
||||
"If the detected version differs from the version LGS is reporting, reinstall LGS or see the FAQ.\n\n" +
|
||||
|
||||
@ -52,5 +52,5 @@ using System.Windows;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.3.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.3.3.0")]
|
||||
[assembly: AssemblyVersion("1.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
||||
Binary file not shown.
@ -27,6 +27,10 @@ namespace Artemis.Settings
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public string LastKeyboard { get; set; }
|
||||
|
||||
[DefaultValue("Qwerty")]
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public string Layout { get; set; }
|
||||
|
||||
[DefaultValue(true)]
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public bool EnablePointersUpdate { get; set; }
|
||||
|
||||
@ -86,6 +86,12 @@ namespace Artemis.ViewModels.Flyouts
|
||||
"Corsair Dark"
|
||||
};
|
||||
|
||||
public BindableCollection<string> Layouts => new BindableCollection<string>
|
||||
{
|
||||
"Qwerty",
|
||||
"Azerty"
|
||||
};
|
||||
|
||||
public string VersionText => "Artemis " + Assembly.GetExecutingAssembly().GetName().Version;
|
||||
|
||||
public BindableCollection<string> LogLevels { get; set; }
|
||||
@ -101,6 +107,17 @@ namespace Artemis.ViewModels.Flyouts
|
||||
}
|
||||
}
|
||||
|
||||
public string SelectedLayout
|
||||
{
|
||||
get { return GeneralSettings.Layout; }
|
||||
set
|
||||
{
|
||||
if (value == GeneralSettings.Layout) return;
|
||||
GeneralSettings.Layout = value;
|
||||
NotifyOfPropertyChange(() => SelectedLayout);
|
||||
}
|
||||
}
|
||||
|
||||
public string SelectedLogLevel
|
||||
{
|
||||
get { return GeneralSettings.LogLevel; }
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
<!-- Layout selection -->
|
||||
<Label Grid.Row="5" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Content="Layout:" />
|
||||
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="KeyboardLayouts" Margin="10" VerticalAlignment="Center"
|
||||
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="Layouts" Margin="10" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Width="140" />
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user