/// <summary> /// 打开 /// </summary> private void open() { try { string modelPath = string.Empty; string fileDirectry = string.Empty; fileDirectry = CGlobalPara.SysPara.Report.ModelPath; openFiledlg.InitialDirectory = fileDirectry; openFiledlg.Filter = "spec files (*.pwr)|*.pwr"; if (openFiledlg.ShowDialog() != DialogResult.OK) { return; } modelPath = openFiledlg.FileName; CSerializable <CModelPara> .ReadXml(modelPath, ref modelPara); txtModel.Text = modelPara.Base.Model; txtCustom.Text = modelPara.Base.Custom; txtVersion.Text = modelPara.Base.Version; txtReleaseName.Text = modelPara.Base.ReleaseName; //pickerDate.Value = System.Convert.ToDateTime(modelPara.Base.ReleaseDate); cmbACV.Text = modelPara.OutPut.ACVolt.ToString(); txtACVL.Text = modelPara.OutPut.ACvMin.ToString(); txtACVH.Text = modelPara.OutPut.ACvMax.ToString(); txtVname.Text = modelPara.OutPut.Vname; txtVmin.Text = modelPara.OutPut.Vmin.ToString(); txtVmax.Text = modelPara.OutPut.Vmax.ToString(); cmbMode.SelectedIndex = modelPara.OutPut.LoadMode; txtVon.Text = modelPara.OutPut.LoadVon.ToString(); txtLoadSet.Text = modelPara.OutPut.LoadSet.ToString(); txtLoadmin.Text = modelPara.OutPut.LoadMin.ToString(); txtLoadmax.Text = modelPara.OutPut.LoadMax.ToString(); txtVOffset.Text = modelPara.OutPut.VOffSet.ToString(); chkQCM.Checked = modelPara.OutPut.ChkQCM; cmbQCM.Text = ((EQCM)modelPara.OutPut.QCM).ToString(); txtQCV.Text = modelPara.OutPut.QCV.ToString(); chkDD.Checked = modelPara.OutPut.ChkDD; chkDV1.Checked = modelPara.OutPut.ChkDG[0]; chkDV2.Checked = modelPara.OutPut.ChkDG[1]; chkDV3.Checked = modelPara.OutPut.ChkDG[2]; chkDV4.Checked = modelPara.OutPut.ChkDG[3]; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
/// <summary> /// 打开 /// </summary> private void open() { try { string modelPath = string.Empty; string fileDirectry = string.Empty; fileDirectry = CGlobalPara.SysPara.Report.ModelPath; openFiledlg.InitialDirectory = fileDirectry; openFiledlg.Filter = "HP files (*.hp)|*.hp"; if (openFiledlg.ShowDialog() != DialogResult.OK) { return; } modelPath = openFiledlg.FileName; CModelPara modelPara = new CModelPara(); CSerializable <CModelPara> .ReadXml(modelPath, ref modelPara); txtModel.Text = modelPara.Base.Model; txtCustom.Text = modelPara.Base.Custom; txtVersion.Text = modelPara.Base.Version; txtReleaseName.Text = modelPara.Base.ReleaseName; if (modelPara.Base.ReleaseDate != null && modelPara.Base.ReleaseDate != string.Empty) { pickerDate.Value = System.Convert.ToDateTime(modelPara.Base.ReleaseDate); } txtHPModel.Text = modelPara.Base.HPModel; hpChan.mHpChan = modelPara.Para.HpCH; hpChan.mIoChan = modelPara.Para.IoCH; step = modelPara.Para.Step; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
/// <summary> /// 加载系统参数 /// </summary> public static void LoadSysXml() { CSerializable <CSysPara> .ReadXml(SysFile, ref SysPara); }
/// <summary> /// 打开 /// </summary> private void open() { try { string modelPath = string.Empty; string fileDirectry = string.Empty; fileDirectry = CGlobalPara.SysPara.Report.ModelPath; openFiledlg.InitialDirectory = fileDirectry; openFiledlg.Filter = "BI files (*.bi)|*.bi"; if (openFiledlg.ShowDialog() != DialogResult.OK) { return; } modelPath = openFiledlg.FileName; CSerializable <CModelPara> .ReadXml(modelPath, ref modelPara); txtModel.Text = modelPara.Base.Model; txtCustom.Text = modelPara.Base.Custom; txtVersion.Text = modelPara.Base.Version; txtReleaseName.Text = modelPara.Base.ReleaseName; //pickerDate.Value = System.Convert.ToDateTime(modelPara.Base.ReleaseDate); txtTSet.Text = modelPara.Temp.TSet.ToString(); txtTLP.Text = modelPara.Temp.TLP.ToString(); txtTHP.Text = modelPara.Temp.THP.ToString(); txtHAlarm.Text = modelPara.Temp.THAlarm.ToString(); txtTOpen.Text = modelPara.Temp.TOPEN.ToString(); txtTClose.Text = modelPara.Temp.TCLOSE.ToString(); txtBITime.Text = modelPara.Para.BITime.ToString(); cmbACV.Text = modelPara.Para.ACV.ToString(); cmbDCVNum.Text = modelPara.Para.OutPut_Chan.ToString(); cmbQCVType.Text = ((EQCM)modelPara.Para.QCV_Type).ToString(); txt110V.Text = modelPara.Para.AC_110V.ToString(); txt220V.Text = modelPara.Para.AC_220V.ToString(); txt250V.Text = modelPara.Para.AC_264V.ToString(); txt360V.Text = modelPara.Para.AC_380V.ToString(); txtVOffSet.Text = modelPara.Para.VOffset.ToString(); _outPutNum = modelPara.Para.OutPut_Num; _outPutChan = modelPara.Para.OutPut_Chan; _onOffNum = modelPara.Para.OnOff_Num; for (int i = 0; i < modelPara.Para.OutPut_Num; i++) { _outPut[i] = modelPara.OutPut[i].Clone(); } for (int i = 0; i < modelPara.Para.OnOff_Num; i++) { _onOff[i] = modelPara.OnOff[i].Clone(); } refreshOutPutView(); refreshOnOffView(); refreshChart(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }