示例#1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     testTimer.Interval = TimeSpan.FromMilliseconds(TimeMilliseconds);
     testTimer.Tick    += new EventHandler(Timer_Tick);
     loading.ChangeState();
     testTimer.Start();
     if (isSendMsg)
     {
         if (con == null || con.Count == 0)
         {
             Responsible.SendCommand(sendMsgType);
         }
         else
         {
             Responsible.SendMsg(sendMsgType, con);
         }
     }
 }
示例#2
0
        /// <summary>
        /// 发送操作日志
        /// </summary>
        /// <param name="data">操作码</param>
        /// <param name="data">被操作对象,如果没有不传</param>
        public void SendOperationLog(string operateCode, Conditions data = null)
        {
            if (data == null)
            {
                data = new Conditions();
            }

            data.AddItem("StationID", AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationID);
            data.AddItem("StationCode", AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationCode);
            data.AddItem("OperatorGuid", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserGuid);
            data.AddItem("OperatorID", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserID);
            data.AddItem("OperatorName", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserName);
            data.AddItem("OperatorCode", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserCode);
            data.AddItem("OperatorOrgID", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgID);
            data.AddItem("OperatorOrgName", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgName);
            data.AddItem("OperatorOrgIDCode", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgIDCode);
            data.AddItem("OpTime", DateTime.Now.ToString("yyyyMMdd HH:mm:ss"));
            data.AddItem("OpType", operateCode);
            data.AddItem("LogID", DateTime.Now.ToString("yyyyMMddHHmmss") + AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationCode + Guid.NewGuid().ToString("N"));

            Responsible.SendMsg(MsgType.StationLogContent, data);
        }
示例#3
0
 public void SendMessage(MsgType msgType, Conditions data)
 {
     Responsible.SendMsg(msgType, data);
 }
示例#4
0
 /// <summary>
 /// 发送消息
 /// </summary>
 /// <param name="msgType"></param>
 /// <param name="data"></param>
 public void SendMessage(MsgType msgType, object data)
 {
     Responsible.SendMsg(msgType, data);
 }