private void LoadShortcuts() { Shortcuts.Clear(); foreach (var item in ShortcutServices.LoadExistingShortcuts()) { Shortcuts.Add(new ShortcutViewModel(item)); } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ShortcutServices.InitializeEnvironmentVariable(); DispatcherUnhandledException += (o, ev) => MessageBox.Show(ev.Exception.ToString(), "Unhandled exception", MessageBoxButton.OK, MessageBoxImage.Error); }