예제 #1
0
        void endOperation(object sender, EndOperationEventArgs args)
        {
            if (cts != null)
            {
                cts.Dispose();
                cts = null;
            }

            this.Dispatcher.Invoke(() =>
            {
                commandPanel.IsEnabled = true;
                btnStop.Visibility     = Visibility.Collapsed;
                if (args != null)
                {
                    tbReport.Text = args.Report;
                    if (args.Failed)
                    {
                        MessageBox.Show("Operation failed, check console for error.");
                    }
                }
                else
                {
                    tbReport.Text = "Missing managed event args.";
                }
            });
        }
예제 #2
0
 static void endOperation(object sender, EndOperationEventArgs args)
 {
     Console.WriteLine(args.Report);
     if (args.Failed)
     {
         Environment.ExitCode = -1;
     }
 }
예제 #3
0
        void endOperation(object sender, EndOperationEventArgs args)
        {
            if (cts != null)
            {
                cts.Dispose();
                cts = null;
            }

            this.Dispatcher.Invoke(() =>
            {
                commandPanel.IsEnabled = true;
                btnStop.Visibility     = Visibility.Collapsed;
                if (args != null)
                {
                    tbReport.Text = args.Report;
                }
                else
                {
                    tbReport.Text = "Missing managed event args.";
                }
            });
        }