예제 #1
0
        public virtual void PostReportWorkStatus(ReportWorkStatusEventArgs e)
        {
            if (OnReportWorkStatus == null)
                return;

            if (SyncContext == null)
                OnReportWorkStatus(this, e);
            else
                SyncContext.Send(new SendOrPostCallback(InvokeReportWorkStatus), e);
        }
예제 #2
0
        protected virtual void PostReportAccountWorkStatus(string workStatus)
        {
            ReportWorkStatusEventArgs e = new ReportWorkStatusEventArgs(
                workStatus, TotalWork, CurrentWork, ProcessTime, UserState);

            PostReportAccountWorkStatus(e);
        }
예제 #3
0
        /// <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);
        }