UI - Moved exception viewer to its own seperate window

Conditions - Started adding list conditions
This commit is contained in:
Robert committed 2020-08-11 22:47:41 +02:00
1 parent f21ade955d
commit cb69760971
36 files changed
+930 -471

No files matched your search

@@ -52,7 +52,7 @@ namespace Artemis.UI.Screens.Settings.Debug
_deviceService.IdentifyDevice(Device);
}
public async void OpenPluginDirectory()
public void OpenPluginDirectory()
{
try
{
@@ -60,11 +60,11 @@ namespace Artemis.UI.Screens.Settings.Debug
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn't open the device's plugin folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn't open the device's plugin folder for you", e);
}
}
public async void OpenImageDirectory()
public void OpenImageDirectory()
{
if (!CanOpenImageDirectory)
return;
@@ -75,7 +75,7 @@ namespace Artemis.UI.Screens.Settings.Debug
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn't open the device's image folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn't open the device's image folder for you", e);
}
}
@@ -196,7 +196,7 @@ namespace Artemis.UI.Screens.Settings
_debugService.ShowDebugger();
}
public async Task ShowLogsFolder()
public void ShowLogsFolder()
{
try
{
@@ -204,11 +204,11 @@ namespace Artemis.UI.Screens.Settings
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn\'t open the logs folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn\'t open the logs folder for you", e);
}
}
public async Task ShowDataFolder()
public void ShowDataFolder()
{
try
{
@@ -216,7 +216,7 @@ namespace Artemis.UI.Screens.Settings
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn\'t open the data folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn\'t open the data folder for you", e);
}
}
@@ -240,7 +240,7 @@ namespace Artemis.UI.Screens.Settings
base.OnClose();
}
private async Task ApplyAutorun()
private void ApplyAutorun()
{
try
{
@@ -254,7 +254,7 @@ namespace Artemis.UI.Screens.Settings
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("An exception occured while trying to apply the auto run setting", e);
_dialogService.ShowExceptionDialog("An exception occured while trying to apply the auto run setting", e);
throw;
}
}
@@ -57,7 +57,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
_windowManager.ShowWindow(_deviceDebugVmFactory.Create(Device));
}
public async void OpenPluginDirectory()
public void OpenPluginDirectory()
{
try
{
@@ -65,7 +65,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn't open the device's plugin folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn't open the device's plugin folder for you", e);
}
}
}
@@ -62,7 +62,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
set => Task.Run(() => UpdateEnabled(value));
}
public async Task OpenSettings()
public void OpenSettings()
{
try
{
@@ -72,12 +72,12 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("An exception occured while trying to show the plugin's settings window", e);
_dialogService.ShowExceptionDialog("An exception occured while trying to show the plugin's settings window", e);
throw;
}
}
public async Task ShowLogsFolder()
public void ShowLogsFolder()
{
try
{
@@ -85,16 +85,16 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
}
catch (Exception e)
{
await _dialogService.ShowExceptionDialog("Welp, we couldn\'t open the logs folder for you", e);
_dialogService.ShowExceptionDialog("Welp, we couldn\'t open the logs folder for you", e);
}
}
public async Task ShowLoadException()
public void ShowLoadException()
{
if (PluginInfo.LoadException == null)
return;
await _dialogService.ShowExceptionDialog("The plugin failed to load: " + PluginInfo.LoadException.Message, PluginInfo.LoadException);
_dialogService.ShowExceptionDialog("The plugin failed to load: " + PluginInfo.LoadException.Message, PluginInfo.LoadException);
}
private PackIconKind GetIconKind()
@@ -157,7 +157,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
}
catch (Exception e)
{
_snackbarMessageQueue.Enqueue($"Failed to enable plugin {PluginInfo.Name}\r\n{e.Message}", "VIEW LOGS", async () => await ShowLogsFolder());
_snackbarMessageQueue.Enqueue($"Failed to enable plugin {PluginInfo.Name}\r\n{e.Message}", "VIEW LOGS", ShowLogsFolder);
}
finally
{