private void OnCopyHandler(CopyingEventArgs copyArgs) { EventHandler <CopyingEventArgs> handler = HandlerAction; if (handler != null) { handler(this, copyArgs); } }
public void RaiseHandler(object sender, CopyingEventArgs e) { TextBox.Invoke(new Action(() => { TextBox.AppendText(e.Message); TextBox.AppendText(Environment.NewLine); })); ProgressBar.Invoke(new Action(() => ProgressBar.Value += e.Step)); }