source: trunk/CrypUpdater/MainWindow.xaml.cs @ 2220

Last change on this file since 2220 was 2204, checked in by sauer, 11 years ago

Tray Icon:

  • icon always visible (same backgrounding/exiting behavior)
  • bug fix ticket #167
File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Controls;
7using System.Windows.Data;
8using System.Windows.Documents;
9using System.Windows.Input;
10using System.Windows.Media;
11using System.Windows.Media.Imaging;
12using System.Windows.Navigation;
13using System.Windows.Shapes;
14using System.Windows.Threading;
15using System.Threading;
16
17namespace CrypUpdater
18{
19    /// <summary>
20    /// Interaktionslogik für MainWindow.xaml
21    /// </summary>
22    public partial class MainWindow : Window
23    {
24
25        public MainWindow()
26        {
27            InitializeComponent();
28        }
29
30        internal void UpdateProgress(double progress)
31        {
32            Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
33            {
34                progressBar1.Value = progress;
35            }, progress);
36        }
37
38        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
39        {
40            e.Cancel = true;
41        }
42
43    }
44}
Note: See TracBrowser for help on using the repository browser.