Profiles - Only set imports as changed if they actually had real changes

Default layouts - Added default keyboard and headset layouts
This commit is contained in:
Robert committed 2021-05-18 16:59:58 +02:00
1 parent 9168ac2823
commit f1eefe0761
145 files changed
+5874 -92

No files matched your search

@@ -46,7 +46,7 @@ namespace Artemis.UI.Screens.Settings.Device
SelectedLeds = new BindableCollection<ArtemisLed>();
Items.Add(factory.DevicePropertiesTabViewModel(device));
if (device.RgbDevice.DeviceInfo.DeviceType == RGBDeviceType.Keyboard)
if (device.DeviceType == RGBDeviceType.Keyboard)
Items.Add(factory.InputMappingsTabViewModel(device));
Items.Add(factory.DeviceInfoTabViewModel(device));
Items.Add(factory.DeviceLedsTabViewModel(device));
@@ -178,7 +178,7 @@ namespace Artemis.UI.Screens.Settings.Device
string directory = Path.Combine(
dialog.SelectedPath,
Device.RgbDevice.DeviceInfo.Manufacturer,
Device.RgbDevice.DeviceInfo.DeviceType.ToString()
Device.DeviceType.ToString()
);
string filePath = Path.Combine(directory, Device.GetLayoutFileName());
Core.Utilities.CreateAccessibleDirectory(directory);
@@ -40,7 +40,7 @@
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
TextWrapping="Wrap"
Text="{Binding Device.RgbDevice.DeviceInfo.DeviceType}" />
Text="{Binding Device.DeviceType}" />
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
<StackPanel Visibility="{Binding IsKeyboard, Converter={x:Static s:BoolToVisibilityConverter.Instance}, Mode=OneWay}">
@@ -15,7 +15,7 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
DisplayName = "INFO";
}
public bool IsKeyboard => Device.RgbDevice.DeviceInfo.DeviceType == RGBDeviceType.Keyboard;
public bool IsKeyboard => Device.DeviceType == RGBDeviceType.Keyboard;
public ArtemisDevice Device { get; }
public string DefaultLayoutPath
@@ -17,7 +17,7 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
public InputMappingsTabViewModel(ArtemisDevice device, IRgbService rgbService, IInputService inputService)
{
if (device.RgbDevice.DeviceInfo.DeviceType != RGBDeviceType.Keyboard)
if (device.DeviceType != RGBDeviceType.Keyboard)
throw new ArtemisUIException("The input mappings tab only supports keyboards");
_rgbService = rgbService;
_inputService = inputService;
@@ -50,7 +50,7 @@
<TextBlock TextWrapping="Wrap" Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
<Run Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer, Mode=OneWay}" />
-
<Run Text="{Binding Device.RgbDevice.DeviceInfo.DeviceType, Mode=OneWay}" />
<Run Text="{Binding Device.DeviceType, Mode=OneWay}" />
</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Margin="8">
@@ -35,7 +35,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
_rgbService = rgbService;
Device = device;
Type = Device.RgbDevice.DeviceInfo.DeviceType.ToString().Humanize();
Type = Device.DeviceType.ToString().Humanize();
Name = Device.RgbDevice.DeviceInfo.Model;
Manufacturer = Device.RgbDevice.DeviceInfo.Manufacturer;
}
@@ -46,8 +46,8 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
public string Name { get; }
public string Manufacturer { get; }
public bool CanDetectInput => Device.RgbDevice.DeviceInfo.DeviceType == RGBDeviceType.Keyboard ||
Device.RgbDevice.DeviceInfo.DeviceType == RGBDeviceType.Mouse;
public bool CanDetectInput => Device.DeviceType == RGBDeviceType.Keyboard ||
Device.DeviceType == RGBDeviceType.Mouse;
public bool IsDeviceEnabled
{