Exemplo n.º 1
0
 private void LoadShortcuts()
 {
     Shortcuts.Clear();
     foreach (var item in ShortcutServices.LoadExistingShortcuts())
     {
         Shortcuts.Add(new ShortcutViewModel(item));
     }
 }
Exemplo n.º 2
0
 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);
 }