Esempio n. 1
0
 /// <summary>
 /// 初始化串口消息配置
 /// </summary>
 public void InitSerialInfoConfig()
 {
     SerialInfoConfig.Path = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "SerialInfoConfig.config";
     objSerialInfoConfig   = Json.ReadFile <SerialInfoConfig>(SerialInfoConfig.Path);
     if (objSerialInfoConfig == null)
     {
         objSerialInfoConfig = new SerialInfoConfig();
         objSerialInfoConfig.ResetConfig();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 初始化串口消息配置
 /// </summary>
 public void InitSerialInfoConfig()
 {
     SerialInfoConfig.Path = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "SerialInfoConfig.config";
     objSerialInfoConfig   = Json.ReadFile <SerialInfoConfig>(SerialInfoConfig.Path);
     if (objSerialInfoConfig == null)
     {
         objSerialInfoConfig = new SerialInfoConfig();
         objSerialInfoConfig.ResetConfig();
     }
     chkShowSend.Checked   = objSerialInfoConfig.ShowSend;
     chkShowSerial.Checked = objSerialInfoConfig.ShowSerial;
     chkShowTime.Checked   = objSerialInfoConfig.ShowTime;
 }