Exemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            Mode1_MeasCondition ret = new Mode1_MeasCondition();

            ret.MeasConditionType = this.MeasConditionType;
            ret.Interval_count = this.Interval_count;
            ret.Average_count = this.Average_count;
            ret.Inverval_time2shot_time = this.Inverval_time2shot_time;
            ret.Inverval_time2shot_shots = this.Inverval_time2shot_shots;
            ret.Inverval_time2time_meastime = this.Inverval_time2time_meastime;
            ret.Inverval_time2time_stoptime = this.Inverval_time2time_stoptime;

            ret.IsUpdated = this.IsUpdated;

            return ret;
        }
Exemplo n.º 2
0
        /// <summary>
        /// フォームロードイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmMeasureSetting_Load(object sender, EventArgs e)
        {
            if (this.log != null) this.log.PutLog("frmMeasureSetting.frmMeasureSetting_Load() - 測定設定画面のロードを開始しました。");

            try
            {
                if (this.MeasSetting == null)
                {
                    ShowErrorMessage(AppResource.GetString("ERROR_MEASURE_SETTING_FILE_NOT_FOUND"));
                    this.Close();
                }

                // 表示コントロールの設定
                this.binding = true;
                switch ((ModeType)this.MeasSetting.Mode)
                {
                    case ModeType.MODE1:

                        switch (this.MeasSetting.Mode1_MeasCondition.MeasConditionType)
                        {
                            case Mode1_MeasCondition.EnumMeasConditionType.MEAS_ALL_SHOTS:
                                rdoEveryShot.Checked = true;
                                break;
                            case Mode1_MeasCondition.EnumMeasConditionType.MEAS_INT_SHOTS:
                                rdoINT_Shot.Checked = true;
                                break;
                            case Mode1_MeasCondition.EnumMeasConditionType.MEAS_AVG_SHOTS:
                                rdoAverage.Checked = true;
                                break;
                            case Mode1_MeasCondition.EnumMeasConditionType.MEAS_INT_TIME2SHOTS:
                                rdoINT_Time2Shot.Checked = true;
                                break;
                            case Mode1_MeasCondition.EnumMeasConditionType.MEAS_INT_TIME2TIME:
                                rdoINT_Time2Time.Checked = true;
                                break;

                        }

                        this.numIntervalCount.Text = this.MeasSetting.Mode1_MeasCondition.Interval_count.ToString();
                        this.numAverageCount.Text = this.MeasSetting.Mode1_MeasCondition.Average_count.ToString();
                        this.numTime2Shot_Time.Text = this.MeasSetting.Mode1_MeasCondition.Inverval_time2shot_time.ToString();
                        this.numTime2Shot_Shots.Text = this.MeasSetting.Mode1_MeasCondition.Inverval_time2shot_shots.ToString();
                        this.numTime2Time_MeasTime.Text = this.MeasSetting.Mode1_MeasCondition.Inverval_time2time_meastime.ToString();
                        this.numTime2Time_StopTime.Text = this.MeasSetting.Mode1_MeasCondition.Inverval_time2time_stoptime.ToString();

                        this.sampling = this.MeasSetting.SamplingCountLimit;

                        break;

                    case ModeType.MODE2:
                        grpMain.Text = "TXT_MODE2";
                        this.lblSamplingTime.Text = "TXT_SAMPLING_PERIOD";
                        this.lblUnit.Text = "TXT_UNIT_MICROSECOND";
                        this.lblMeasureTime.Visible = true;
                        this.txtMeasureTime.Visible = true;
                        this.lblUnitSecond.Visible = true;
                        this.txtMeasureTime.Text = this.MeasSetting.MeasureTime_Mode2.ToString();
                        this.measTime = this.MeasSetting.MeasureTime_Mode2;
                        string[] samplingValue = new string[] {"5μS","10μS","25μS","50μS","100μS","250μS","500μS",
                                                "1mS","5mS","10mS","25mS","50mS","100mS" };
                        for (int i = 0; i < samplingValue.Length; i++)
                        {
                            cboSampling.Items.Add(samplingValue[i]);
                        }
                        cboSampling.SelectedIndex = 0;
                        SetSamplingToCombo(this.MeasSetting.SamplingTiming_Mode2);
                        txtSampling.Visible = false;
                        lblUnit.Visible = false;

                        chDetailMode1.Checked = false;
                        chDetailMode1.Visible = false;

                        this.sampling = this.MeasSetting.SamplingTiming_Mode2;

                        break;
                    case ModeType.MODE3:
                        grpMain.Text = "TXT_MODE3";
                        this.lblSamplingTime.Text = "TXT_SAMPLING_PERIOD";
                        this.lblUnit.Text = "TXT_UNIT_MICROSECOND";
                        this.lblMeasureTime.Visible = true;
                        this.txtMeasureTime.Visible = true;
                        this.lblUnitSecond.Visible = true;
                        this.txtMeasureTime.Text = this.MeasSetting.MeasureTime_Mode3.ToString();
                        this.measTime = this.MeasSetting.MeasureTime_Mode3;
                        string[] samplingValue2 = new string[] {"250μS","500μS","1mS","10mS","25mS","50mS",
                                                    "100mS","250mS","500mS","1S" };
                        for (int i = 0; i < samplingValue2.Length; i++)
                        {
                            cboSampling.Items.Add(samplingValue2[i]);
                        }
                        cboSampling.SelectedIndex = 0;
                        SetSamplingToCombo(this.MeasSetting.SamplingTiming_Mode3);
                        txtSampling.Visible = false;
                        lblUnit.Visible = false;

                        chDetailMode1.Checked = false;
                        chDetailMode1.Visible = false;

                        this.sampling = this.MeasSetting.SamplingTiming_Mode3;

                        break;
                }
                this.txtSampling.Text = this.MeasSetting.SamplingCountLimit.ToString();
            //                this.sampling = this.MeasSetting.SamplingCountLimit;

                this.mode1_MeasCondition = (Mode1_MeasCondition)this.MeasSetting.Mode1_MeasCondition.Clone();

                // 言語切替
                AppResource.SetControlsText(this);
            }
            catch (Exception ex)
            {
                ShowErrorMessage(ex);
            }

            this.binding = false;

            if (this.log != null) this.log.PutLog("frmMeasureSetting.frmMeasureSetting_Load() - 測定設定画面のロードを終了しました。");
        }