private void configDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { e_configParams @params; int rowIndex = e.RowIndex; string source = this.configDataGridView.Rows[rowIndex].Cells[0].Value.ToString().Trim(); string inStr = this.configDataGridView.Rows[rowIndex].Cells[1].Value.ToString().Trim(); switch (source) { case "PLAYBACK_FILES": case "HOST_APP": case "PATCH_FILE": @params = e_configParams.E_CONFIG_UNKNOWN; if (!(source == "HOST_APP")) { if (source == "PATCH_FILE") { @params = e_configParams.E_PATCH_NAME; } else { @params = e_configParams.E_PLAYBACK_FILES; } break; } @params = e_configParams.E_HOST_APP_NAME; break; case "BASE_TEST_LOG": case "HOST_APP_DIR": { e_configParams type = e_configParams.E_CONFIG_UNKNOWN; if (!(source == "HOST_APP_DIR")) { type = e_configParams.E_LOG_DIR; } else { type = e_configParams.E_HOST_DIR; } frmUpdateTestLogDir dir = frmUpdateTestLogDir.GetChildInstance(type); if (dir.IsDisposed) { dir = new frmUpdateTestLogDir(type); } this.currentSelectCellIdx = 1; this.currentSelectRowIdx = rowIndex; dir.updateParent += new frmUpdateTestLogDir.updateParentEventHandler(this.updateConfigList); dir.MdiParent = base.MdiParent; dir.ShowDialog(); return; } case "PLAY_TIME_LISTS": { frmUpdatePlaybackTime time = frmUpdatePlaybackTime.GetChildInstance(); if (time.IsDisposed) { time = new frmUpdatePlaybackTime(); } this.currentSelectCellIdx = 1; this.currentSelectRowIdx = rowIndex; time.updateParent += new frmUpdatePlaybackTime.updateParentEventHandler(this.updateConfigList); time.MdiParent = base.MdiParent; time.ShowDialog(); return; } case "SIGNAL_SOURCE": case "ATTEN_SOURCE": case "POWER_SOURCE": { frmComboBoxSelection selection = frmComboBoxSelection.GetChildInstance(source); if (selection.IsDisposed) { selection = new frmComboBoxSelection(source); } this.currentSelectCellIdx = 1; this.currentSelectRowIdx = rowIndex; selection.updateParent += new frmComboBoxSelection.updateParentEventHandler(this.updateConfigList); selection.MdiParent = base.MdiParent; selection.ShowDialog(); return; } default: if (this.configDataGridView.Rows[rowIndex].HeaderCell.Value.ToString() == "RX_SETUP") { frmReceiverConfig config = frmReceiverConfig.GetChildInstance(); if (config.IsDisposed) { config = new frmReceiverConfig(); } config.MdiParent = base.MdiParent; config.updateParent += new frmReceiverConfig.updateParentEventHandler(this.updateConfigList); config.ShowDialog(); } return; } frmUpdatePbFiles childInstance = frmUpdatePbFiles.GetChildInstance(@params, inStr); if (childInstance.IsDisposed) { childInstance = new frmUpdatePbFiles(@params, inStr); } this.currentSelectCellIdx = 1; this.currentSelectRowIdx = rowIndex; childInstance.updateParent += new frmUpdatePbFiles.updateParentEventHandler(this.updateConfigList); childInstance.MdiParent = base.MdiParent; childInstance.ShowDialog(); }
private void updateReceiver_Click(object sender, EventArgs e) { frmReceiverConfig childInstance = frmReceiverConfig.GetChildInstance(); if (childInstance.IsDisposed) { childInstance = new frmReceiverConfig(); } childInstance.MdiParent = base.MdiParent; childInstance.updateParent += new frmReceiverConfig.updateParentEventHandler(this.updateReceiverCallBack); childInstance.ShowDialog(); }
private void frmReceiverConfigDoneBtn_Click(object sender, EventArgs e) { Hashtable automationParamsHash = clsGlobal.AutomationParamsHash; string text = string.Empty; string nameStr = string.Empty; nameStr = "PROD_FAMILY"; text = this.list2String(this.rxFamily, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "RX_TYPES"; text = this.list2String(this.rxTypes, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "RX_BAUDS"; text = this.list2String(this.rxBauds, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "RX_NAMES"; text = this.list2String(this.rxNames, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "ACTIVE_PORTS"; text = this.list2String(this.rxPorts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "PHY_COMM_PROTOCOL"; text = this.list2String(this.rxPhyCommProtocols, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TCPIP_IP_ADDRESS"; text = this.list2String(this.rxIPAddress, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TTB_PORTS"; text = this.list2String(this.rxTTBPorts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "DEFAULT_CLK"; text = this.list2String(this.rxDefaultClocks, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "EXT_CLK_FREQ"; text = this.list2String(this.rxExtClkFreqs, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "EXT_CLK_SRC"; text = this.list2String(this.rxRefFreqSrc, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "LNA_TYPE"; text = this.list2String(this.rxLnaType, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "LDO_MODE"; text = this.list2String(this.rxLdoMode, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "AI3_ICD"; text = this.list2String(this.rxAI3ICDs, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "F_ICD"; text = this.list2String(this.rxFICDs, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "RX_LOG_TYPES"; text = this.list2String(this.rxRxLogTypes, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TX_LOG_TYPES"; text = this.list2String(this.rxTxLogTypes, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "MESSAGE_PROTOCOL"; text = this.list2String(this.rxMessageProtocols, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "AIDING_PROTOCOL"; text = this.list2String(this.rxAidingProtocols, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "REQUIRED_HOSTS"; text = this.list2String(this.rxRequiredHosts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "REQUIRED_PATCH"; text = this.list2String(this.rxRequiredPatches, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TRACKER_PORTS"; text = this.list2String(this.rxTrackerPorts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "HOST_PORTS"; text = this.list2String(this.rxHostPorts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "RESET_PORTS"; text = this.list2String(this.rxResetPorts, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "PLATFORM"; text = this.list2String(this.rxPlatform, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "PACKAGE"; text = this.list2String(this.rxPackage, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "REVISION"; text = this.list2String(this.rxRev, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "MANUFACTURE_NAME"; text = this.list2String(this.rxMfg, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TEMPERATURE"; text = this.list2String(this.rxTemperature, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "TEMPERATURE_UNIT"; text = this.list2String(this.rxTemperatureUnit, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "VOLTAGE"; text = this.list2String(this.rxVoltage, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "SIRFNAV_INTF_STR"; text = this.list2String(this.rxSirfNavStartStopIntfStr, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "EXTRA_HOST_APP_ARGVS"; text = this.list2String(this.rxHostSWArgs, nameStr, ""); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "HOST_APP"; text = this.list2String(this.rxHostSWs, nameStr, "-1"); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "PATCH_FILE"; text = this.list2String(this.rxPatchSWs, nameStr, "-1"); this.addElementToHash(ref clsGlobal.AutomationParamsHash, nameStr, text); nameStr = "HOST_APP_DIR"; text = this.frmReceiverConfigHostDirTxtBox.Text; if (clsGlobal.AutomationParamsHash.ContainsKey(nameStr)) { clsGlobal.AutomationParamsHash[nameStr] = text; } else { clsGlobal.AutomationParamsHash.Add(nameStr, text); } this.updateParent(clsGlobal.AutomationParamsHash); m_SChildform = null; base.Close(); }
private void frmReceiverConfigCancelBtn_Click(object sender, EventArgs e) { m_SChildform = null; base.Close(); }
protected override void OnClosed(EventArgs e) { m_SChildform = null; }
internal static frmReceiverConfig GetChildInstance() { if (m_SChildform == null) { m_SChildform = new frmReceiverConfig(); } return m_SChildform; }