Exemplo n.º 1
0
        private void uiCheckForUpdatesMenuItem_Click(object sender, RoutedEventArgs e)
        {
            // cancel the automatic update thread if it's already running
            if (updateCheck != null)
            {
                updateCheck.Cancel();
            }

            UpdateCheckWindow window = new UpdateCheckWindow(ShowUpdateWindow)
            {
                Owner = this
            };

            try
            {
                canOpenDemo = false;
                window.ShowDialog();
            }
            finally
            {
                canOpenDemo = true;
            }
        }
 private void Window_Closed(object sender, EventArgs e)
 {
     updateCheck.Cancel();
 }