private void ParseStatus(List <Event> events)
        {
            NewSystemEventArgs args = new NewSystemEventArgs();

            args.systemEvents = events;
            OnNewSystemEvents(args);
        }
        protected virtual void OnNewSystemEvents(NewSystemEventArgs e)
        {
            EventHandler <NewSystemEventArgs> handler = NewSystemEvents;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 3
0
 private void OnNewSystemEventGenerated(object sender, NewSystemEventArgs args)
 {
     try
     {
         this.InvokeWithCatch(() =>
         {
             this.ShowSysEventLog(args.Value);
         }, LogUtility.Log);
     }
     catch (Exception ex)
     {
         LogUtility.Error(ex);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 当新的系统事件产生时。
 /// </summary>
 private void OnNewSystemEventGenerated(object sender, NewSystemEventArgs args)
 {
     try
     {
         if (args.Value.Code == 0)
         {
             GlobalServices.SEM.AddSysEventLog(args.Value);
         }
         else
         {
             GlobalServices.SEM.UpdateSysEventLog(args.Value);
         }
     }
     catch (System.Exception ex)
     {
         LogUtility.Error(ex);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 发布 系统事件产生或更新 消息。
 /// </summary>
 public static IMessageResponse PublishNewSystemEventGenerated(NewSystemEventArgs args, object sender = null)
 {
     return(SystemEventMessageBus.Publish(SystemEventTopic, args, sender, false));
 }