コード例 #1
0
        private void LoadTmt(XmlDocument xmlDoc, TmtConfigData configData)
        {
            XmlOldTmt xmlTmt = new XmlOldTmt();
            xmlTmt.LoadConfig(xmlDoc);
            configData.CommandSet = xmlTmt.CommandSet;
            configData.CommunicationType = xmlTmt.CommunicationType;

            configData.TcpIp.HostName = xmlTmt.TcpIp.HostName;
            configData.TcpIp.Port = xmlTmt.TcpIp.Port;

            configData.Serial.PortName = xmlTmt.Serial.PortName;
            configData.Serial.BaudRate = xmlTmt.Serial.BaudRate;
            configData.Serial.Parity = xmlTmt.Serial.Parity;
            configData.Serial.DataBits = xmlTmt.Serial.DataBits;
            configData.Serial.StopBits = xmlTmt.Serial.StopBits;
            configData.Serial.Separator = xmlTmt.Serial.Separator;
        }
コード例 #2
0
        private void SaveTmt(XmlDocument xmlDoc, TmtConfigData configData)
        {
            XmlOldTmt xmlTmt = new XmlOldTmt();

            xmlTmt.CommandSet = configData.CommandSet;
            xmlTmt.CommunicationType = configData.CommunicationType;
            xmlTmt.TcpIp.HostName = configData.TcpIp.HostName;
            xmlTmt.TcpIp.Port = configData.TcpIp.Port;
            xmlTmt.Serial.PortName = configData.Serial.PortName;
            xmlTmt.Serial.BaudRate = configData.Serial.BaudRate;
            xmlTmt.Serial.Parity = configData.Serial.Parity;
            xmlTmt.Serial.DataBits = configData.Serial.DataBits;
            xmlTmt.Serial.StopBits = configData.Serial.StopBits;
            xmlTmt.Serial.Separator = configData.Serial.Separator;
            xmlTmt.SaveConfig(xmlDoc);
        }