void OnIdled(object sender, EventArgs e) { // if the form is closed and the dialog is still alive the closed the dialog directly if (_isClosed) { Dialog.Close(); return; } // event Idled?.Invoke(this, null); // show var lines = _progress.Build(out string progress, _textActivity.Length); for (int iLine = 0; iLine < _LineCount && iLine < lines.Length; ++iLine) { _textActivity[iLine].Text = lines[iLine]; } _textProgress.Text = progress; }
protected virtual void OnIdled(EventArgs e) { Idled?.Invoke(this, e); }
/// <summary> /// Called periodically when idle. /// </summary> /// <remarks> /// It is used for panel updating and redrawing if data have changed. /// The base method triggers the <see cref="Idled"/> event. /// </remarks> public virtual void UIIdle() { Idled?.Invoke(this, null); }