Пример #1
0
        private void OnWorkerLogChanged(object sender, LogChangedArgs e)
        {
            //cross thread - so you don't get the cross theading exception
            if (this.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker)delegate
                {
                    OnWorkerLogChanged(sender, e);
                });
                return;
            }

            //change control
            WriteToConsole(e.Log);
        }
Пример #2
0
 protected void OnLogChanged(LogChangedArgs e)
 {
     if (LogChanged != null)
     {
         LogChanged(this, e);
     }
 }