Ejemplo n.º 1
0
 public void FundEventHandler(PublishEventArgs args) // should do somework
 {
     //事件记录、标记、日志、提示等
     try
     {
         //if (args.EventType == EventTypeAssign.SocketServerRcvDataOri)
         //{
         //    this.AddItems(new ItemInfo() {SocketDataType = "Rcv Ori", Data = args.GetParams()[0].ToString()});
         //}
         //else if (args.EventType == EventTypeAssign.SocketServerSndDataOri)
         //{
         //    this.AddItems(new ItemInfo() {SocketDataType = "Snd Ori", Data = args.GetParams()[0].ToString()});
         //}
         //else if (args.EventType == EventTypeAssign.SocketServerSndDataProtocol )
         //{
         //    this.AddItems(new ItemInfo()
         //                      {
         //                          SocketDataType = "Snd Pcl",
         //                          Id = args.GetParams()[0].ToString(),
         //                          Guid = args.GetParams()[1].ToString(),
         //                          Cmd = args.GetParams()[2].ToString(),
         //                          OtherArug = args.GetParams()[3].ToString(),
         //                          Data = args.GetParams()[4].ToString()
         //                      });
         //}
         //else if (args.EventType == EventTypeAssign.SocketServerRcvDataProtocol)
         //{
         //    this.AddItems(new ItemInfo()
         //                      {
         //                          SocketDataType = "Rcv Pcl",
         //                          Id = args.GetParams()[0].ToString(),
         //                          Guid = args.GetParams()[1].ToString(),
         //                          Cmd = args.GetParams()[2].ToString(),
         //                          OtherArug = args.GetParams()[3].ToString(),
         //                          Data = args.GetParams()[4].ToString()
         //                      });
         //}
     }
     catch (Exception ex)
     {
         ex.ToString();
         //contents += "fail";
     }
     try
     {
         // this.AddItems(new ItemInfo() { EventType = eventtype, EventId = eventid, EventPars = eventargs });
     }
     catch (Exception ex)
     {
         WriteLog.WriteLogError("Core_Monitor SocketDataMonitorViewModel FundEventHandler Occer an error :" +
                                ex.ToString() + ";data is:" + args.ToString());
     }
 }