Ejemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Application.Current.Windows.OfType <SplashScreen>().ToList().ForEach(w => w.Close());
            WaitCursor.IgnoreOverrideCursor = false;
            WaitCursor.SetOverrideCursor(null);

            // Auto allows the user to Skip (updates are still available via F1)
            _updateChecker.CheckForUpdates(UpdateNotifyMode.Auto);
        }
Ejemplo n.º 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     loadSettings();
     // --- EXAMPLE 4: Check for App Updates ---
     // This event is fired when update checking has finished.
     updateChecker.UpdateCheckCompleted += delegate(object s, UpdateCheckEventArgs args)
     {
         Debug.WriteLine("Update check completed.");
         if (!args.Successful)
         {
             Debug.WriteLine("Update check failed!");
         }
         else
         {
             var download = updateChecker.ResolveDownloadEntry(args.Update);
             Debug.WriteLine($"Found version: {args.Update.Version}.");
             Debug.WriteLine($"Download file name: {download.FileName}");
         }
     };
     updateChecker.CheckForUpdates();
 }
Ejemplo n.º 3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     // Check for updates
     updateChecker.CheckForUpdates(UpdateNotifyMode.Auto);
     // Load color history
     if (Settings.Default.LatestColors != null)
     {
         colorHistory           = Settings.Default.LatestColors;
         colorHistory.MaxLength = Settings.Default.ColorHistoryLength;
     }
     else
     {
         colorHistory = new FixedColorCollection(Settings.Default.ColorHistoryLength);
     }
     lstHistory.ItemsSource = colorHistory;
     // Set current color
     CurrentColor = new NotifyColor(Settings.Default.CurrentColor);
     // Init screen picker
     ScreenPicker = new ScreenPicker(CurrentColor, imgScreen);
     ScreenPicker.PositionSelected += ScreenPicker_PositionSelected;
     // Set data context
     this.DataContext = this;
 }