Example #1
0
        /// <summary>
        ///     发出状态变化事件
        /// </summary>
        /// <param name="status">状态</param>
        public void OnStatusChanged(NotificationStatusType status)
        {
            OnStatusChangedInner(status);
#if CLIENT
            RaiseStatusChanged(status);
#endif
        }
Example #2
0
        /// <summary>
        ///     发出状态变化事件
        /// </summary>
        /// <param name="status">状态</param>
        public void RaiseStatusChanged(NotificationStatusType status)
        {
#if CLIENT
            this.InvokeInUiThread(this.RaiseStatusChangedInner, new PropertyChangedEventArgs(status.ToString()));
#else
            RaiseStatusChangedInner(new PropertyChangedEventArgs(status.ToString()));
#endif
        }
Example #3
0
 /// <summary>
 ///     状态变化处理
 /// </summary>
 /// <param name="status">状态</param>
 protected sealed override void StatusChangedInner(NotificationStatusType status)
 {
     if (__status != null && __status.Arrest.HasFlag(EditArrestMode.RecordChanged))
     {
         return;
     }
     OnStatusChangedInner(status);
 }
Example #4
0
 /// <summary>
 ///    状态变化处理
 /// </summary>
 /// <param name="status">状态</param>
 protected virtual void OnStatusChangedInner(NotificationStatusType status)
 {
 }
Example #5
0
 /// <summary>
 ///     发出状态变化事件
 /// </summary>
 /// <param name="status">状态</param>
 public void RaiseStatusChanged(NotificationStatusType status)
 {
     InvokeInUiThread(RaiseStatusChangedInner, new PropertyChangedEventArgs(status.ToString()));
 }
Example #6
0
 /// <summary>
 ///     发出状态变化事件
 /// </summary>
 /// <param name="status">状态</param>
 public void RaiseStatusChanged(NotificationStatusType status)
 {
     RaiseStatusChanged(status.ToString());
 }
Example #7
0
 public void EnableNotificationType(NotificationStatusType status)
 {
     Status |= status;
 }
Example #8
0
 public void DisableNotificationType(NotificationStatusType status)
 {
     Status &= (~status);
 }
Example #9
0
 public bool IsEnabled(NotificationStatusType status)
 {
     return((Status & status) == status);
 }
Example #10
0
 /// <summary>
 /// Validates and dispatches this notice.
 /// </summary>
 public void Dispatch()
 {
     try
     {
         if (this.IsValid())
         {
             this.OnDispatch();
         }
     }
     catch (Exception)
     {
         this.Status = NotificationStatusType.Failed;
         throw;
     }
 }
Example #11
0
 /// <summary>
 /// Initializes the dispatching process.
 /// </summary>
 public void PreDispatch()
 {
     this.Status = NotificationStatusType.InProgress;
     try
     {
         this.OnPreDispatch();
     }
     catch (Exception)
     {
         this.Status = NotificationStatusType.Failed;
         throw;
     }
 }
Example #12
0
 /// <summary>
 /// Posts process the notice after dispatching.
 /// </summary>
 public void PostDispatch()
 {
     try
     {
         this.OnPostDispatch();
         this.Status = NotificationStatusType.Sent;
     }
     catch (Exception)
     {
         this.Status = NotificationStatusType.SentWithErrors;
         throw;
     }
 }
Example #13
0
 /// <summary>
 ///     发出状态变化事件
 /// </summary>
 /// <param name="status">状态</param>
 public void OnStatusChanged(NotificationStatusType status)
 {
     StatusChangedInner(status);
 }