mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Layer properties - Added back most of the reworked VMs and views
This commit is contained in:
1 parent
2fd522bafb
commit
3d244ff028
21 files changed
+862
-146
No files matched your search
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.UI.Shared.Services.Dialog;
|
||||
using ICSharpCode.AvalonEdit;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
|
||||
namespace Artemis.UI.Shared.Screens.Dialogs
|
||||
@@ -10,18 +10,35 @@ namespace Artemis.UI.Shared.Screens.Dialogs
|
||||
public ExceptionDialogViewModel(string message, Exception exception)
|
||||
{
|
||||
Header = message;
|
||||
Exception = exception;
|
||||
Document = new TextDocument(new StringTextSource(exception.StackTrace));
|
||||
Exceptions = new List<DialogException>();
|
||||
|
||||
var currentException = exception;
|
||||
while (currentException != null)
|
||||
{
|
||||
Exceptions.Add(new DialogException(currentException));
|
||||
currentException = currentException.InnerException;
|
||||
}
|
||||
}
|
||||
|
||||
public string Header { get; }
|
||||
public Exception Exception { get; }
|
||||
public List<DialogException> Exceptions { get; set; }
|
||||
|
||||
public IDocument Document { get; set; }
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Session.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public class DialogException
|
||||
{
|
||||
public Exception Exception { get; }
|
||||
public IDocument Document { get; set; }
|
||||
|
||||
public DialogException(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
Document = new TextDocument(new StringTextSource($"{exception.Message}\r\n\r\n{exception.StackTrace}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user