private void createAutoReplyWindow() { if (!base.IsDisposed) { string str = this.comm.sourceDeviceName + ": Auto Reply"; if ((this._formautoReply == null) || this._formautoReply.IsDisposed) { this._formautoReply = new frmAutoReply(); } this._formautoReply.CommWindow = this.comm; this._formautoReply.Text = str; this._formautoReply.ShowDialog(); } else { MessageBox.Show("COM window not initialized!", "Information"); } if (this._ttffDisplay != null) { this._ttffDisplay.SetTTFFMsgIndication(); } }
private void hWConfigRespToolStripMenuItem_Click(object sender, EventArgs e) { if (!base.IsDisposed) { string str = this.comm.PortName + ": HW Config Response"; if ((this._formautoReply == null) || this._formautoReply.IsDisposed) { this._formautoReply = new frmAutoReply(); } this._formautoReply.CommWindow = this.comm; this._formautoReply.Text = str; this._formautoReply.ShowDialog(); } else { MessageBox.Show("COM window not initialized!", "Information"); } }
private void frmEditConfigurationAutoReplyBtn_Click(object sender, EventArgs e) { string filepath = string.Empty; if ((this.configFilePathVal.Text.Length == 0) || !File.Exists(this.configFilePathVal.Text)) { filepath = clsGlobal.InstalledDirectory + @"\scripts\SiRFLiveAutomationSetupAutoReply.cfg"; } else { filepath = this.configFilePathVal.Text; } frmAutoReply reply = new frmAutoReply(); reply.AutoReplyConfigFilePath = filepath; reply.CommWindow = new CommunicationManager(); reply.CommWindow.ReadAutoReplyData(filepath); reply.ShowDialog(); this.loadConfigFile(); reply.CommWindow.Dispose(); reply.CommWindow = null; reply.Dispose(); reply = null; }
private void frmEditConfigurationAutoReplyBtn_Click(object sender, EventArgs e) { string path = this._configFilePath; if (!File.Exists(path)) { MessageBox.Show(string.Format("Configuration file not found!\n {0}", path), "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { frmAutoReply reply = new frmAutoReply(); reply.AutoReplyConfigFilePath = path; reply.CommWindow = new CommunicationManager(); reply.CommWindow.ReadAutoReplyData(path); if (reply.ShowDialog() == DialogResult.Cancel) { reply.CommWindow.Dispose(); reply.CommWindow = null; reply.Dispose(); reply = null; } else { if (reply.CommWindow.AutoReplyCtrl.HWCfgCtrl.FreqAidEnabled == 0) { this.frm3GPPConfigNoFreqReqRadioBtn.Checked = true; } else if (reply.CommWindow.AutoReplyCtrl.HWCfgCtrl.FreqAidMethod == 0) { this.frm3GPPConfigCounterRadioBtn.Checked = true; } else { this.frm3GPPConfigNonCounterRadioBtn.Checked = true; } if (this.frm3GPPConfigTest1ChkBox.Checked) { this.frm3GPPConfigTest1RelFreqAccTxtBox.Text = reply.CommWindow.AutoReplyCtrl.FreqTransferCtrl.Accuracy.ToString(); this.frm3GPPConfigTest1HrzQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.HorrErrMax.ToString(); this.frm3GPPConfigTest1VrtQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.VertErrMax.ToString(); this.frm3GPPConfigTest1RespMaxTimeTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.RespTimeMax.ToString(); if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 0) { this.frm3GPPConfigTest1PriorityTxtBox.Text = "No Priority"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 1) { this.frm3GPPConfigTest1PriorityTxtBox.Text = "Response Time"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 2) { this.frm3GPPConfigTest1PriorityTxtBox.Text = "Position Error"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 3) { this.frm3GPPConfigTest1PriorityTxtBox.Text = "Use Entire Response Time"; } else { this.frm3GPPConfigTest1PriorityTxtBox.Text = "Response Time"; } } if (this.frm3GPPConfigTest2ChkBox.Checked) { this.frm3GPPConfigTest2RelFreqAccTxtBox.Text = reply.CommWindow.AutoReplyCtrl.FreqTransferCtrl.Accuracy.ToString(); this.frm3GPPConfigTest2HrzQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.HorrErrMax.ToString(); this.frm3GPPConfigTest2VrtQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.VertErrMax.ToString(); this.frm3GPPConfigTest2RespMaxTimeTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.RespTimeMax.ToString(); if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 0) { this.frm3GPPConfigTest2PriorityTxtBox.Text = "No Priority"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 1) { this.frm3GPPConfigTest2PriorityTxtBox.Text = "Response Time"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 2) { this.frm3GPPConfigTest2PriorityTxtBox.Text = "Position Error"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 3) { this.frm3GPPConfigTest2PriorityTxtBox.Text = "Use Entire Response Time"; } else { this.frm3GPPConfigTest2PriorityTxtBox.Text = "Response Time"; } } if (this.frm3GPPConfigTest3ChkBox.Checked) { this.frm3GPPConfigTest3RelFreqAccTxtBox.Text = reply.CommWindow.AutoReplyCtrl.FreqTransferCtrl.Accuracy.ToString(); this.frm3GPPConfigTest3HrzQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.HorrErrMax.ToString(); this.frm3GPPConfigTest3VrtQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.VertErrMax.ToString(); this.frm3GPPConfigTest3RespMaxTimeTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.RespTimeMax.ToString(); if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 0) { this.frm3GPPConfigTest3PriorityTxtBox.Text = "No Priority"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 1) { this.frm3GPPConfigTest3PriorityTxtBox.Text = "Response Time"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 2) { this.frm3GPPConfigTest3PriorityTxtBox.Text = "Position Error"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 3) { this.frm3GPPConfigTest3PriorityTxtBox.Text = "Use Entire Response Time"; } else { this.frm3GPPConfigTest3PriorityTxtBox.Text = "Response Time"; } } if (this.frm3GPPConfigTest4ChkBox.Checked) { this.frm3GPPConfigTest4RelFreqAccTxtBox.Text = reply.CommWindow.AutoReplyCtrl.FreqTransferCtrl.Accuracy.ToString(); this.frm3GPPConfigTest4HrzQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.HorrErrMax.ToString(); this.frm3GPPConfigTest4VrtQoSTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.VertErrMax.ToString(); this.frm3GPPConfigTest4RespMaxTimeTxtBox.Text = reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.RespTimeMax.ToString(); if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 0) { this.frm3GPPConfigTest4PriorityTxtBox.Text = "No Priority"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 1) { this.frm3GPPConfigTest4PriorityTxtBox.Text = "Response Time"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 2) { this.frm3GPPConfigTest4PriorityTxtBox.Text = "Position Error"; } else if (reply.CommWindow.AutoReplyCtrl.PositionRequestCtrl.TimeAccPriority == 3) { this.frm3GPPConfigTest4PriorityTxtBox.Text = "Use Entire Response Time"; } else { this.frm3GPPConfigTest4PriorityTxtBox.Text = "Response Time"; } } reply.CommWindow.Dispose(); reply.CommWindow = null; reply.Dispose(); reply = null; } } }
private void frmRxInitCmdConfigAutoReplyBtn_Click(object sender, EventArgs e) { string path = clsGlobal.InstalledDirectory + @"\scripts\SiRFLiveAutomationSetupAutoReply.cfg"; if (!File.Exists(path)) { MessageBox.Show(string.Format("Configuration file not found!\n {0}", path), "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { frmAutoReply reply = new frmAutoReply(); reply.AutoReplyConfigFilePath = path; reply.CommWindow = this.comm; reply.CommWindow.ReadAutoReplyData(path); if (reply.ShowDialog() == DialogResult.Cancel) { } } }
private void createAutoReplyWindow(ref PortManager target) { if (target != null) { if (!base.IsDisposed) { string str = target.comm.sourceDeviceName + ": Auto Reply"; if (target.comm.IsSourceDeviceOpen()) { frmAutoReply reply = new frmAutoReply(); if (reply != null) { reply.CommWindow = target.comm; reply.Text = str; if ((reply.ShowDialog() != DialogResult.Cancel) && target.comm.Log.IsFileOpen()) { target.comm.WriteApp(utils_AutoReply.getAutoReplySummary(target.comm)); } } } } else { MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); } if ((target._ttffDisplay != null) && target.TTFFDisplayLocation.IsOpen) { target._ttffDisplay.SetTTFFMsgIndication(); } } }
private void createAutoReplyWindow() { if (PortManagerHash.Count > 0) { PortManager manager = null; bool flag = false; foreach (string str in PortManagerHash.Keys) { manager = (PortManager) PortManagerHash[str]; if (((manager != null) && !(manager.comm.MessageProtocol == "NMEA")) && manager.comm.IsSourceDeviceOpen()) { flag = true; break; } } DialogResult cancel = System.Windows.Forms.DialogResult.Cancel; if (flag && (manager != null)) { string str2 = "Auto Reply Configure: All"; frmAutoReply reply = new frmAutoReply(); if (reply != null) { reply.CommWindow = manager.comm; reply.Text = str2; cancel = reply.ShowDialog(); } } if (cancel != DialogResult.Cancel) { foreach (string str3 in PortManagerHash.Keys) { manager = (PortManager) PortManagerHash[str3]; if ((manager != null) && (manager.comm.MessageProtocol != "NMEA")) { if (manager.comm.IsSourceDeviceOpen()) { manager.comm.ReadAutoReplyData(clsGlobal.InstalledDirectory + @"\scripts\SiRFLiveAutomationSetupAutoReply.cfg"); if (manager.comm.Log.IsFileOpen()) { manager.comm.WriteApp(utils_AutoReply.getAutoReplySummary(manager.comm)); } } if ((manager._ttffDisplay != null) && manager.TTFFDisplayLocation.IsOpen) { manager._ttffDisplay.SetTTFFMsgIndication(); } } } } clsGlobal.PerformOnAll = false; } }