コード例 #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.";
                }
            });
        }