Esempio n. 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);
        }
Esempio n. 2
0
        protected virtual void PostReportAccountWorkStatus(string workStatus)
        {
            ReportWorkStatusEventArgs e = new ReportWorkStatusEventArgs(
                workStatus, TotalWork, CurrentWork, ProcessTime, UserState);

            PostReportAccountWorkStatus(e);
        }
Esempio n. 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);
        }