Skip to content

Commit

Permalink
Clear clipboard on application exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Jul 5, 2024
1 parent b0e0cc9 commit d6e9d73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion KeyManager/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Leosac.KeyManager"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="pack://application:,,,/WpfApp;component/MainWindow.xaml" Startup="Application_Startup">
StartupUri="pack://application:,,,/WpfApp;component/MainWindow.xaml"
Startup="Application_Startup"
Exit="Application_Exit">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
5 changes: 5 additions & 0 deletions KeyManager/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ private void Application_Startup(object sender, StartupEventArgs e)
LangHelper.ChangeLanguage(settings.Language);
}
}

private void Application_Exit(object sender, ExitEventArgs e)
{
Clipboard.Clear();
}
}
}

0 comments on commit d6e9d73

Please sign in to comment.