mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 01:34:58 +00:00
refactor<*>: rewrite all codes...
This commit is contained in:
parent
89ff8aa744
commit
30ab8ae954
342 changed files with 17208 additions and 19633 deletions
24
src/Views/Widgets/Exceptions.xaml.cs
Normal file
24
src/Views/Widgets/Exceptions.xaml.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SourceGit.Views.Widgets {
|
||||
|
||||
/// <summary>
|
||||
/// 错误提示面板
|
||||
/// </summary>
|
||||
public partial class Exceptions : UserControl {
|
||||
public ObservableCollection<string> Messages { get; set; }
|
||||
|
||||
public Exceptions() {
|
||||
Messages = new ObservableCollection<string>();
|
||||
Models.Exception.Handler = e => Dispatcher.Invoke(() => Messages.Add(e));
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Dismiss(object sender, RoutedEventArgs e) {
|
||||
var data = (sender as Button).DataContext as string;
|
||||
Messages.Remove(data);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue