예제 #1
0
 private static void RunOnStartup(MenuItem menuItem)
 {
     try
     {
         var autoStart = new AutoStart
         {
             IsEnabled = !menuItem.Checked
         };
         menuItem.Checked = autoStart.IsEnabled;
     }
     catch (AutoStartException e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
예제 #2
0
 private static void RunOnStartup(MenuItem menuItem)
 {
     try
     {
         var autoStart = new AutoStart
         {
             IsEnabled = !menuItem.Checked
         };
         menuItem.Checked = autoStart.IsEnabled;
     }
     catch (AutoStartException e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }