private void UpdateVariables() { // 扫描模式 SCAN_MODE mode = rbtnGalv.Checked ? SCAN_MODE.GALVANOMETER : SCAN_MODE.RESONANT; m_config.SetScanMode(mode); // 扫描策略 SCAN_STRATEGY strategy = ((KeyValuePair <SCAN_STRATEGY, string>)cbxScanStrategy.SelectedItem).Key; m_config.SetScanStartegy(strategy); // 振镜系统 SCAN_MIRROR_NUM mirrorNum = rbtnThree.Checked ? SCAN_MIRROR_NUM.THREEE : SCAN_MIRROR_NUM.TWO; m_config.SetScanMirrorNum(mirrorNum); // 采集模式 & 采集数量 SCAN_ACQUISITION_MODE acquisitionMode = ((KeyValuePair <SCAN_ACQUISITION_MODE, string>)cbxAcquisitionMode.SelectedItem).Key; m_config.SetScanAcquisitionMode(acquisitionMode); // 采集模式数量 int acquisitionModeNum = (int)cbxAcquisitionModeNum.SelectedItem; m_config.SetScanAcquisitionModeNum(acquisitionModeNum); // Dwell Time m_config.SetScanDwellTime(double.Parse(cbxDwellTime.SelectedItem.ToString())); // 扫描像素 int scanPixels = ((KeyValuePair <int, string>)cbxScanPixels.SelectedItem).Key; m_config.SetScanXPoints(scanPixels); m_config.SetScanYPoints(scanPixels); // 激光[通道]开关状态 LASER_CHAN_SWITCH status = chbx405.Checked ? LASER_CHAN_SWITCH.ON : LASER_CHAN_SWITCH.OFF; m_config.SetLaserSwitch(CHAN_ID.WAVELENGTH_405_NM, status); status = chbx488.Checked ? LASER_CHAN_SWITCH.ON : LASER_CHAN_SWITCH.OFF; m_config.SetLaserSwitch(CHAN_ID.WAVELENGTH_488_NM, status); status = chbx561.Checked ? LASER_CHAN_SWITCH.ON : LASER_CHAN_SWITCH.OFF; m_config.SetLaserSwitch(CHAN_ID.WAVELENGTH_561_NM, status); status = chbx640.Checked ? LASER_CHAN_SWITCH.ON : LASER_CHAN_SWITCH.OFF; m_config.SetLaserSwitch(CHAN_ID.WAVELENGTH_640_NM, status); m_params.Calculate(); }