public virtual void PostReportWorkStatus(ReportWorkStatusEventArgs e) { if (OnReportWorkStatus == null) return; if (SyncContext == null) OnReportWorkStatus(this, e); else SyncContext.Send(new SendOrPostCallback(InvokeReportWorkStatus), e); }
protected virtual void PostReportAccountWorkStatus(string workStatus) { ReportWorkStatusEventArgs e = new ReportWorkStatusEventArgs( workStatus, TotalWork, CurrentWork, ProcessTime, UserState); PostReportAccountWorkStatus(e); }
/// <summary> /// 引发工作进度通知事件 /// </summary> /// <param name="status"></param> /// <param name="data"></param> public virtual void PostReportWorkStatus(string status, object data, bool result) { if (OnReportWorkStatus == null) return; ReportWorkStatusEventArgs e = new ReportWorkStatusEventArgs( status, TotalWork, CurrentWork, ProcessTime, null); e.Tag = data; e.Result = result; if (SyncContext == null) OnReportWorkStatus(this, e); else SyncContext.Send(new SendOrPostCallback(InvokeReportWorkStatus), e); }