/// <summary> /// 发出状态变化事件 /// </summary> /// <param name="status">状态</param> public void OnStatusChanged(NotificationStatusType status) { OnStatusChangedInner(status); #if CLIENT RaiseStatusChanged(status); #endif }
/// <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 }
/// <summary> /// 状态变化处理 /// </summary> /// <param name="status">状态</param> protected sealed override void StatusChangedInner(NotificationStatusType status) { if (__status != null && __status.Arrest.HasFlag(EditArrestMode.RecordChanged)) { return; } OnStatusChangedInner(status); }
/// <summary> /// 状态变化处理 /// </summary> /// <param name="status">状态</param> protected virtual void OnStatusChangedInner(NotificationStatusType status) { }
/// <summary> /// 发出状态变化事件 /// </summary> /// <param name="status">状态</param> public void RaiseStatusChanged(NotificationStatusType status) { InvokeInUiThread(RaiseStatusChangedInner, new PropertyChangedEventArgs(status.ToString())); }
/// <summary> /// 发出状态变化事件 /// </summary> /// <param name="status">状态</param> public void RaiseStatusChanged(NotificationStatusType status) { RaiseStatusChanged(status.ToString()); }
public void EnableNotificationType(NotificationStatusType status) { Status |= status; }
public void DisableNotificationType(NotificationStatusType status) { Status &= (~status); }
public bool IsEnabled(NotificationStatusType status) { return((Status & status) == status); }
/// <summary> /// Validates and dispatches this notice. /// </summary> public void Dispatch() { try { if (this.IsValid()) { this.OnDispatch(); } } catch (Exception) { this.Status = NotificationStatusType.Failed; throw; } }
/// <summary> /// Initializes the dispatching process. /// </summary> public void PreDispatch() { this.Status = NotificationStatusType.InProgress; try { this.OnPreDispatch(); } catch (Exception) { this.Status = NotificationStatusType.Failed; throw; } }
/// <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; } }
/// <summary> /// 发出状态变化事件 /// </summary> /// <param name="status">状态</param> public void OnStatusChanged(NotificationStatusType status) { StatusChangedInner(status); }