Generelle Ausnahmenanzeige

This commit is contained in:
2023-03-03 21:23:48 +01:00
parent 101ce32c06
commit 6ea4a47b98
18 changed files with 1226 additions and 1346 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
namespace ChatController
{
public partial class ExceptionViewControl : INotifyPropertyChanged
{
public event EventHandler OkButtonClicked;
private Exception _Exception;
public Exception Exception
{
get => _Exception;
set
{
_Exception = value;
OnPropertyChanged();
}
}
public ExceptionViewControl()
{
InitializeComponent();
DataContext = this;
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
private void OkButton_OnClick(object sender, RoutedEventArgs args)
{
OkButtonClicked?.Invoke(this, args);
}
private void CopyToClipboardButton_OnClick(object sender, RoutedEventArgs args)
{
Clipboard.SetText(Exception.StackTrace);
}
}
}