diff --git a/SlnMesnac.WPF/App.xaml.cs b/SlnMesnac.WPF/App.xaml.cs index 3040fed..54a2c0f 100644 --- a/SlnMesnac.WPF/App.xaml.cs +++ b/SlnMesnac.WPF/App.xaml.cs @@ -152,5 +152,8 @@ namespace SlnMesnac.WPF } + // 防止默认的崩溃行为 + e.Handled = true; + } } } diff --git a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs index 7390988..d0be099 100644 --- a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs +++ b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs @@ -67,6 +67,7 @@ namespace SlnMesnac.WPF.ViewModel /// /// [RelayCommand] + [RequirePermission("FormControl")] private void FormControl(object obj) { try