UI - Removed Fody, begone arrogant devs!

This commit is contained in:
Robert committed 2020-06-30 20:41:46 +02:00
1 parent 8e01d1f63e
commit 2c2b0ca3e1
49 files changed
+1011 -232

No files matched your search

@@ -10,14 +10,15 @@ using Stylet;
namespace Artemis.UI.Screens.Settings.Tabs.Devices
{
public class DeviceSettingsViewModel
public class DeviceSettingsViewModel : PropertyChangedBase
{
private readonly IDeviceService _deviceService;
private readonly IDialogService _dialogService;
private readonly IWindowManager _windowManager;
private readonly IDeviceDebugVmFactory _deviceDebugVmFactory;
private bool _isDeviceEnabled;
public DeviceSettingsViewModel(ArtemisDevice device, IDeviceService deviceService, IDialogService dialogService,
public DeviceSettingsViewModel(ArtemisDevice device, IDeviceService deviceService, IDialogService dialogService,
IWindowManager windowManager, IDeviceDebugVmFactory deviceDebugVmFactory)
{
_deviceService = deviceService;
@@ -29,15 +30,22 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
Type = Device.RgbDevice.DeviceInfo.DeviceType.ToString().Humanize();
Name = Device.RgbDevice.DeviceInfo.Model;
Manufacturer = Device.RgbDevice.DeviceInfo.Manufacturer;
// TODO: Implement this bad boy
IsDeviceEnabled = true;
}
public ArtemisDevice Device { get; }
public string Type { get; set; }
public string Name { get; set; }
public string Manufacturer { get; set; }
public bool IsDeviceEnabled { get; set; }
public string Type { get; }
public string Name { get; }
public string Manufacturer { get; }
public bool IsDeviceEnabled
{
get => _isDeviceEnabled;
set => SetAndNotify(ref _isDeviceEnabled, value);
}
public void IdentifyDevice()
{
@@ -17,6 +17,9 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
private readonly IPluginService _pluginService;
private readonly ISnackbarMessageQueue _snackbarMessageQueue;
private readonly IWindowManager _windowManager;
private Plugin _plugin;
private PluginInfo _pluginInfo;
private bool _enabling;
public PluginSettingsViewModel(Plugin plugin, IWindowManager windowManager, IDialogService dialogService, IPluginService pluginService,
ISnackbarMessageQueue snackbarMessageQueue)
@@ -30,9 +33,24 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
_snackbarMessageQueue = snackbarMessageQueue;
}
public Plugin Plugin { get; set; }
public PluginInfo PluginInfo { get; set; }
public bool Enabling { get; set; }
public Plugin Plugin
{
get => _plugin;
set => SetAndNotify(ref _plugin, value);
}
public PluginInfo PluginInfo
{
get => _pluginInfo;
set => SetAndNotify(ref _pluginInfo, value);
}
public bool Enabling
{
get => _enabling;
set => SetAndNotify(ref _enabling, value);
}
public PackIconKind Icon => GetIconKind();
public string Type => Plugin.GetType().BaseType?.Name ?? Plugin.GetType().Name;
public bool CanOpenSettings => IsEnabled && Plugin.HasConfigurationViewModel;