Example #1
0
        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();
        }
Example #2
0
        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();
        }