コード例 #1
0
 public header(byte Version = default, recType Type = default, ushort Id = default, ushort ContentLength = default, byte PaddingLength = default, byte Reserved = default)
 {
     this.Version       = Version;
     this.Type          = Type;
     this.Id            = Id;
     this.ContentLength = ContentLength;
     this.PaddingLength = PaddingLength;
     this.Reserved      = Reserved;
 }
コード例 #2
0
 public recUnit(string serialNum, string userName, string dis, DateTime dtStart, DateTime dtEnd, int plateNum, double oldValue, double newValue ,recType type)
 {
     this.serialNum = serialNum;
     this.userName = userName;
     this.discription = dis;
     this.dtStart = dtStart;
     this.dtEnd = dtEnd;
     this.plateNums = plateNum;
     this.oldValue = oldValue;
     this.newValue = newValue;
     this.type = type;
 }
コード例 #3
0
 public recUnit()
 {
     this.serialNum = "";
     this.userName = "";
     this.discription = "";
     this.dtStart = DateTime.Now;
     this.dtEnd = valmoWin.tmNull;
     this.plateNums = 0;
     this.oldValue = 0;
     this.newValue = 0;
     this.type = recType.alarmType;
 }
コード例 #4
0
 public recUnit(string serialNum, string userName, DateTime dtStart, DateTime dtEnd, int plateNum, double oldValue, double newValue, recType type)
 {
     this.serialNum = serialNum;
     this.userName = userName;
     string objDis = valmoWin.dv.getCurDis(serialNum); //Application.Current.Resources.MergedDictionaries[0][serialNum];
     if (objDis != null && objDis != "null")
         this.discription = objDis;
     else
         this.discription = " ";
     this.dtStart = dtStart;
     this.dtEnd = dtEnd;
     this.plateNums = plateNum;
     this.oldValue = oldValue;
     this.newValue = newValue;
     this.type = type;
 }
コード例 #5
0
 public streamWriter(ref ptr <conn> c = default, recType recType = default, ushort reqId = default)
 {
     this.c       = c;
     this.recType = recType;
     this.reqId   = reqId;
 }
コード例 #6
0
 public recUnit(string serialNum, DateTime dtStart, recType type)
 {
     this.serialNum = serialNum;
     this.userName = valmoWin.dv.users.curUser.name;
     string objDis = valmoWin.dv.getCurDis(serialNum); //Application.Current.Resources.MergedDictionaries[0][serialNum];
     if (objDis != null && objDis != "null")
         this.discription = objDis;
     else
         this.discription = " ";
     this.dtStart = dtStart;
     //this.dtEnd = dtEnd;
     this.plateNums = valmoWin.dv.getCurPlateNr();
     this.oldValue = 0;
     this.newValue = 0;
     this.type = type;
 }
コード例 #7
0
        public recUnit(string str)
        {
            try
            {
                string[] strTmp = str.Split('\t');
                if (strTmp.Length < 4)
                {
                    this.serialNum = "error";
                    return;
                }
                this.serialNum = strTmp[0];
                this.userName = strTmp[1];
                this.dtStart = DateTime.Parse(strTmp[2]);
                this.plateNums = Int32.Parse(strTmp[3]);

                switch (serialNum.Substring(0,3))
                {
                    case "Alm":
                        {
                            this.type = recType.alarmType;

                            //if (strTmp[4] == "--")
                            //{

                            //}
                            //else
                            //{
                            //    this.dtEnd = DateTime.Parse(strTmp[4]);
                            //}
                        }
                        break;
                    case "Log":
                        {
                            this.type = recType.logType;
                        }
                        break;
                    case "Als":
                        {
                            this.type = recType.sysType;
                        }
                        break;
                    default:
                        {
                            this.oldValue = double.Parse(strTmp[4]);
                            this.newValue = double.Parse(strTmp[5]);
                            this.type = recType.operateType;
                        }
                        break;
                }
            }
            catch (Exception ex)
            {
                this.serialNum = "error";
                vm.printLn("[ergItemObj] " + ex.ToString());
            }
        }
コード例 #8
0
        public void addParamMsg(string serialNum, DateTime dtStart, double oldValue, double newValue, recType type = recType.operateType)
        {
            string ergSerialNum = "--";
            if (serialNum != null)
                ergSerialNum = serialNum;
            string userName = valmoWin.dv.users.curUser.name;
            int plateNum = valmoWin.dv.getCurPlateNr();
            recUnit erObj = new recUnit(serialNum, userName, dtStart, valmoWin.sNullTime, plateNum, oldValue, newValue, type);
            msgSave(erObj);

            valmoWin.refresh();
        }
コード例 #9
0
 public void addParamMsg(objUnit obj, double oldValue, recType type)
 {
     string ergSerialNum = "--";
     if (obj.serialNum != null)
         ergSerialNum = obj.serialNum;
     string userName = valmoWin.dv.users.curUser.name;
     if (userName == "null")
         userName = "******";
     DateTime dtStart = DateTime.Now;
     int plateNum = valmoWin.dv.getCurPlateNr();
     double newValue = obj.valueNew;
     recUnit erObj = new recUnit(ergSerialNum, userName, dtStart, valmoWin.sNullTime, plateNum, oldValue, newValue, type);
     msgSave(erObj);
 }