internal static frmUpdatePbFiles GetChildInstance(e_configParams type, string inStr) { if (m_SChildform == null) { m_SChildform = new frmUpdatePbFiles(type, inStr); } return(m_SChildform); }
private void updatePlaybackFileBtn_Click(object sender, EventArgs e) { e_configParams type = e_configParams.E_PLAYBACK_FILES; frmUpdatePbFiles childInstance = frmUpdatePbFiles.GetChildInstance(type, this.playbackFileListTxtBox.Text); if (childInstance.IsDisposed) { childInstance = new frmUpdatePbFiles(type, this.playbackFileListTxtBox.Text); } childInstance.updateParent += new frmUpdatePbFiles.updateParentEventHandler(this.updatePlaybackFileList); childInstance.MdiParent = base.MdiParent; childInstance.ShowDialog(); }
private void updatePbDoneBut_Click(object sender, EventArgs e) { this.outputStr = string.Empty; if ((this.selectUpdateElmName == e_configParams.E_HOST_APP_NAME) || (this.selectUpdateElmName == e_configParams.E_PATCH_NAME)) { foreach (string str in this.updatePbToRunFilesListVal.Items) { if (this.outputStr.Length != 0) { this.outputStr = this.outputStr + "," + str; } else { this.outputStr = str; } } } else { foreach (string str2 in this.toRunList) { if (this.outputStr.Length != 0) { this.outputStr = this.outputStr + "," + str2; } else { this.outputStr = str2; } } } this.outputStr = this.outputStr.TrimEnd(new char[] { ',' }); if ((this.updateParent != null) && (this.outputStr != string.Empty)) { this.updateParent(this.outputStr); } base.Close(); m_SChildform = null; }
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 updatePbExitBut_Click(object sender, EventArgs e) { this.outputStr = string.Empty; base.Close(); m_SChildform = null; }
protected override void OnClosed(EventArgs e) { m_SChildform = null; }
internal static frmUpdatePbFiles GetChildInstance(e_configParams type, string inStr) { if (m_SChildform == null) { m_SChildform = new frmUpdatePbFiles(type, inStr); } return m_SChildform; }