public void EndProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { _progressStack.RemoveAt(_progressStack.Count - 1); if (_progressStack.Count > 0) { ProgressInfo pi = _progressStack[_progressStack.Count - 1]; UpdateProgressInfo(pi); } }
void p_UpdateProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { _context.Send(new SendOrPostCallback(delegate(object state) { if (_frmDlg != null) { _frmDlg.UpdateProgress(sender, e); } }), null); }
public virtual bool OnUpdateProgress(string actionTitle, string actionText, int max, int position) { bool result = true; if (UpdateProgress != null) { Framework.EventArguments.ProgressEventArgs e = new Framework.EventArguments.ProgressEventArgs(this, actionTitle, actionText, max, position); UpdateProgress(this, e); result = !e.Cancel; } return(result); }
public void UpdateProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { if (_progressStack.Count > 0) { ProgressInfo pi = _progressStack[_progressStack.Count - 1]; pi.ActionText = Utils.LanguageSupport.Instance.GetTranslation(e.ActionText); pi.ActionTitle = Utils.LanguageSupport.Instance.GetTranslation(e.ActionTitle); pi.Max = e.Max; pi.Pos = e.Position; e.Cancel = _cancelled; UpdateProgressInfo(pi); } }
public void StartProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { _cancelled = false; buttonCancel.Text = Utils.LanguageSupport.Instance.GetTranslation("Cancel"); buttonCancel.Visible = e.CanCancel; buttonCancel.Enabled = true; ProgressInfo pi = new ProgressInfo(); pi.ActionText = Utils.LanguageSupport.Instance.GetTranslation(e.ActionText); pi.ActionTitle = Utils.LanguageSupport.Instance.GetTranslation(e.ActionTitle); pi.Max = e.Max; pi.Pos = e.Position; _progressStack.Add(pi); UpdateProgressInfo(pi); }
void p_EndProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { _context.Send(new SendOrPostCallback(delegate(object state) { if (_frmDlg != null) { _frmDlg.EndProgress(sender, e); if (_frmDlg._progressStack.Count == 0) { _frmDlg.Dispose(); _frmDlg = null; } } }), null); }
void p_StartProgress(object sender, Framework.EventArguments.ProgressEventArgs e) { _context.Send(new SendOrPostCallback(delegate(object state) { if (_frmDlg == null) { _frmDlg = new FormProgress(); _frmDlg.Owner = _owner; _frmDlg.StartProgress(sender, e); _frmDlg.Show(); } else { _frmDlg.StartProgress(sender, e); } }), null); }
public virtual bool OnUpdateProgress(string actionTitle, string actionText, int max, int position) { bool result = true; if (UpdateProgress != null) { Framework.EventArguments.ProgressEventArgs e = new Framework.EventArguments.ProgressEventArgs(this, actionTitle, actionText, max, position); UpdateProgress(this, e); result = !e.Cancel; } return result; }