Data model - Added data model visualization view model

Debugger - Split debugger into different tabs
Debugger - Added data model debugger
This commit is contained in:
SpoinkyNL committed 2020-06-29 00:22:16 +02:00
1 parent 1bc8d65237
commit 98ec26304a
33 files changed
+565 -236

No files matched your search

@@ -32,23 +32,18 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
public Plugin Plugin { get; set; }
public PluginInfo PluginInfo { get; set; }
public string Type => Plugin.GetType().BaseType?.Name ?? Plugin.GetType().Name;
public bool Enabling { get; set; }
public PackIconKind Icon => GetIconKind();
public string Type => Plugin.GetType().BaseType?.Name ?? Plugin.GetType().Name;
public bool CanOpenSettings => IsEnabled && Plugin.HasConfigurationViewModel;
public bool DisplayLoadFailed => !Enabling && PluginInfo.LoadException != null;
public bool IsEnabled
{
get => PluginInfo.Enabled;
get => Plugin.Enabled;
set => Task.Run(() => UpdateEnabled(value));
}
public bool CanOpenSettings => IsEnabled && Plugin.HasConfigurationViewModel;
public bool Enabling { get; set; }
public bool DisplayLoadFailed => !Enabling && !PluginInfo.LastEnableSuccessful;
public async Task OpenSettings()
{
try
@@ -76,6 +71,14 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
}
}
public async Task ShowLoadException()
{
if (PluginInfo.LoadException == null)
return;
await _dialogService.ShowExceptionDialog("The plugin failed to load: " + PluginInfo.LoadException.Message, PluginInfo.LoadException);
}
private PackIconKind GetIconKind()
{
if (PluginInfo.Icon != null)
@@ -106,7 +109,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
private async Task UpdateEnabled(bool enable)
{
if (PluginInfo.Enabled == enable)
if (Plugin.Enabled == enable)
{
NotifyOfPropertyChange(nameof(IsEnabled));
return;
@@ -133,7 +136,6 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
try
{
_pluginService.EnablePlugin(Plugin);
_snackbarMessageQueue.Enqueue($"Enabled plugin {PluginInfo.Name}");
}
catch (Exception e)
{