internal void LoadSettings() { string s1 = ""; string s2 = ""; IniFile.SetFileName(fileName); s1 = IniFile.GetString(sectionName, "tx_p", ""); s2 = IniFile.GetString(sectionName, "tx_f", ""); if (String.IsNullOrEmpty(s1) || String.IsNullOrEmpty(s2)) { return; } //校准表的行数目 int N = IniFile.CountOfItemIn(s1); //校准表的列数目 int M = IniFile.CountOfItemIn(s2); if ((N <= 0) || (M <= 0)) { return; } rowHead.Parse(s2, M); colHead.Parse(s1, N); FillTable(N, M); }
private void btnOk_Click(object sender, EventArgs e) { SetPimValues(); //IniFile.SetFileName("d:\\settings\\Settings_Spc.ini"); //App_Settings.spc.RxRef = Convert.ToSingle(numericUpDown1.Value); //IniFile.SetString("spectrum", "rxRef", App_Settings.spc.RxRef.ToString()); //App_Settings.spc.TxRef = Convert.ToSingle(numericUpDown2.Value); //IniFile.SetString("spectrum", "txRef", App_Settings.spc.TxRef.ToString()); IniFile.SetFileName("d:\\settings\\Settings_Spc.ini"); string rx_s = ""; string tx_s = ""; for (int i = 0; i < 8; i++) { if (i != 0) { rx_s += ","; tx_s += ","; } rx_s += App_Settings.spc.List_rxRef[i]; tx_s += App_Settings.spc.List_txRef[i]; } IniFile.SetString("spectrum", "rxRefTable", rx_s); IniFile.SetString("spectrum", "txRefTable", tx_s); this.DialogResult = DialogResult.OK; }
internal void StoreSettings() { IniFile.SetFileName(fileName); IniFile.SetString("spectrum", "channel", channel.ToString()); IniFile.SetString("spectrum", "enableOffset", enableOffset.ToString()); IniFile.SetString("spectrum", "offsetFilePath", offsetFilePath.ToString()); IniFile.SetString("spectrum", "att", att.ToString()); IniFile.SetString("spectrum", "rbw", rbw.ToString()); IniFile.SetString("spectrum", "vbw", vbw.ToString()); IniFile.SetString("spectrum", "start", start.ToString()); IniFile.SetString("spectrum", "stop", stop.ToString()); IniFile.SetString("spectrum", "min_freq", min_freq.ToString("0.#")); IniFile.SetString("spectrum", "max_freq", max_freq.ToString("0.#")); IniFile.SetString("spectrum", "min_aph", min_aph.ToString("0.#")); IniFile.SetString("spectrum", "max_aph", max_aph.ToString("0.#")); IniFile.SetString("spectrum", "rev", rev.ToString("0.#")); IniFile.SetString("spectrum", "enableRF", enableRF.ToString()); IniFile.SetString("spectrum", "timeRF", timeRF.ToString()); IniFile.SetString("spectrum", "sampleSpan", sampleSpan.ToString()); IniFile.SetString("spectrum", "averagecount", averageCount.ToString()); }
internal void LoadSettings() { IniFile.SetFileName(fileName); port = IniFile.GetString(signalName, "port", "COM1"); limit_vswr = float.Parse(IniFile.GetString(signalName, "limit_vswr", "2.0")); mode_power = int.Parse(IniFile.GetString(signalName, "mode_power", "0")); tx_pre = float.Parse(IniFile.GetString(signalName, "tx_pre", "30")); tx = float.Parse(IniFile.GetString(signalName, "tx", "43")); enableVswr = int.Parse(IniFile.GetString(signalName, "enableVswr", "1")); time_vswr = int.Parse(IniFile.GetString(signalName, "time_vswr", "500")); min_power = float.Parse(IniFile.GetString(signalName, "min_power", "30")); max_power = float.Parse(IniFile.GetString(signalName, "max_power", "45")); min_freq = float.Parse(IniFile.GetString(signalName, "min_freq", "930")); max_freq = float.Parse(IniFile.GetString(signalName, "max_freq", "940")); min_temp = float.Parse(IniFile.GetString(signalName, "min_temp", "-10")); max_temp = float.Parse(IniFile.GetString(signalName, "max_temp", "65")); min_curr = float.Parse(IniFile.GetString(signalName, "min_curr", "0.5")); max_curr = float.Parse(IniFile.GetString(signalName, "max_curr", "2.5")); }
/// <summary> /// 设置属性值 /// </summary> internal void StoreSettings(string fileName) { IniFile.SetFileName(fileName); IniFile.SetString("pim", "tx", tx.ToString("0.#")); IniFile.SetString("pim", "f1", f1.ToString("0.#")); IniFile.SetString("pim", "f2", f2.ToString("0.#")); // IniFile.SetString("pim", "enableSquence", enableSquence.ToString()); IniFile.SetString("pim", "schema", schema.ToString()); IniFile.SetString("pim", "mode", mode.ToString()); IniFile.SetString("pim", "order", order.ToString()); IniFile.SetString("pim", "unit", unit.ToString()); IniFile.SetString("pim", "limit", limit.ToString("0.#")); IniFile.SetString("pim", "scanum1", scanum1.ToString()); IniFile.SetString("pim", "scanum2", scanum2.ToString()); IniFile.SetString("pim", "scanum3", scanum3.ToString()); IniFile.SetString("pim", "scanum4", scanum4.ToString()); IniFile.SetString("pim", "att_spc", att_spc.ToString()); IniFile.SetString("pim", "rbw_spc", rbw_spc.ToString()); IniFile.SetString("pim", "vbw_spc", vbw_spc.ToString()); IniFile.SetString("pim", "scanband", scanband.ToString()); }
private void btnSave_Click(object sender, EventArgs e) { //SaveSettingFile ssfm = new SaveSettingFile(); //if (ssfm.ShowDialog() == DialogResult.OK) //{ // string File_Usr_Pim = ssfm.FileName; //this.settings.Save2File(App_Configure.Cnfgs.Path_Def + "\\Settings_Pim.ini", // App_Configure.Cnfgs.Path_Usr_Pim + "\\" + ssfm.FileName); //} //ssfm.Dispose(); if (MessageBox.Show("是否确认保存?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK) { IniFile.SetFileName("D:\\settings\\Settings_Pim.ini"); IniFile.SetString("pim", "mode", cbxPimMode.SelectedIndex.ToString()); IniFile.SetString("pim", "order", cbxPimOrder.Text.Substring(2)); IniFile.SetString("pim", "unit", cbxPimUnit.SelectedIndex.ToString()); IniFile.SetString("pim", "limit", nudPimLimit.Value.ToString()); IniFile.SetString("pim", "att_spc", nudAtt.Value.ToString()); IniFile.SetString("pim", "tx", nudTx.Value.ToString()); IniFile.SetString("pim", "schema", cbxPimSchema.SelectedIndex.ToString()); } }
private void btnDefault_Click(object sender, EventArgs e) { //App_Settings.pim.Clone(this.settings); //GetPimValues(); //ygq IniFile.SetFileName(Application.StartupPath + "\\settings\\Settings_Pim.ini"); cbxPimMode.SelectedIndex = int.Parse(IniFile.GetString("pim", "mode", "0")); int order = int.Parse(IniFile.GetString("pim", "order", "0")); switch (order) { case 3: cbxPimOrder.SelectedIndex = 0; break; case 5: cbxPimOrder.SelectedIndex = 1; break; case 7: cbxPimOrder.SelectedIndex = 2; break; case 9: cbxPimOrder.SelectedIndex = 3; break; } cbxPimUnit.SelectedIndex = int.Parse(IniFile.GetString("pim", "unit", "0")); nudPimLimit.Value = Convert.ToDecimal(IniFile.GetString("pim", "limit", "-110")); nudAtt.Value = Convert.ToDecimal(IniFile.GetString("pim", "att_spc", "0")); nudTx.Value = Convert.ToDecimal(IniFile.GetString("pim", "tx", "43")); cbxPimSchema.SelectedIndex = int.Parse(IniFile.GetString("pim", "schema", "0")); // }
internal void LoadSettings() { IniFile.SetFileName(fileName); channel = int.Parse(IniFile.GetString("spectrum", "channel", "0")); enableOffset = int.Parse(IniFile.GetString("spectrum", "enableOffset", "1")); offsetFilePath = IniFile.GetString("spectrum", "offsetFilePath", ""); att = int.Parse(IniFile.GetString("spectrum", "att", "0")); rbw = int.Parse(IniFile.GetString("spectrum", "rbw", "4")); vbw = int.Parse(IniFile.GetString("spectrum", "vbw", "4")); start = float.Parse(IniFile.GetString("spectrum", "start", "800")); stop = float.Parse(IniFile.GetString("spectrum", "stop", "900")); min_freq = float.Parse(IniFile.GetString("spectrum", "min_freq", "0.1")); max_freq = float.Parse(IniFile.GetString("spectrum", "max_freq", "3000")); min_aph = float.Parse(IniFile.GetString("spectrum", "min_aph", "-30")); max_aph = float.Parse(IniFile.GetString("spectrum", "max_aph", "-130")); rev = float.Parse(IniFile.GetString("spectrum", "rev", "0")); enableRF = int.Parse(IniFile.GetString("spectrum", "enableRF", "0")); timeRF = int.Parse(IniFile.GetString("spectrum", "timeRF", "200")); sampleSpan = int.Parse(IniFile.GetString("spectrum", "sampleSpan", "200")); averageCount = int.Parse(IniFile.GetString("spectrum", "averagecount", "5")); rxRef = float.Parse(IniFile.GetString("spectrum", "rxRef", "0")); txRef = float.Parse(IniFile.GetString("spectrum", "txRef", "0")); List_txRef = IniFile.GetString("spectrum", "txRefTable", "0,0,0,0,0,0,0,0").Split(','); List_rxRef = IniFile.GetString("spectrum", "rxRefTable", "0,0,0,0,0,0,0,0").Split(','); }
private void btnSave_Click(object sender, EventArgs e) { IniFile.SetFileName("D:\\settings\\Specifics.ini"); IniFile.SetString("Specifics", "csvC", _csvFlag?"1":"0"); IniFile.SetString("Specifics", "pdfC", _pdfFlag?"1":"0"); IniFile.SetString("Specifics", "jpgC", _jpgFlag?"1":"0"); this.DialogResult = DialogResult.OK; }
private void btnLoad_Click(object sender, EventArgs e) { //ReadSettingFiles rsfm = new ReadSettingFiles(); //rsfm.FillFiles(App_Configure.Cnfgs.Path_Usr_Pim); //if (rsfm.ShowDialog() == DialogResult.OK) //{ // if (File.Exists(App_Configure.Cnfgs.Path_Usr_Pim + "\\" + rsfm.FileName)) // { // // string File_Usr_Pim = rsfm.FileName; // Settings_Pim pim = new Settings_Pim(App_Configure.Cnfgs.Path_Usr_Pim + "\\" + // rsfm.FileName); // pim.LoadSettings(); // pim.Clone(this.settings); // GetPimValues(); // } //} //rsfm.Dispose(); //ygq IniFile.SetFileName("D:\\settings\\Settings_Pim.ini"); cbxPimMode.SelectedIndex = int.Parse(IniFile.GetString("pim", "mode", "0")); int order = int.Parse(IniFile.GetString("pim", "order", "0")); switch (order) { case 3: cbxPimOrder.SelectedIndex = 0; break; case 5: cbxPimOrder.SelectedIndex = 1; break; case 7: cbxPimOrder.SelectedIndex = 2; break; case 9: cbxPimOrder.SelectedIndex = 3; break; } cbxPimUnit.SelectedIndex = int.Parse(IniFile.GetString("pim", "unit", "0")); nudPimLimit.Value = Convert.ToDecimal(IniFile.GetString("pim", "limit", "-110")); nudAtt.Value = Convert.ToDecimal(IniFile.GetString("pim", "att_spc", "0")); nudTx.Value = Convert.ToDecimal(IniFile.GetString("pim", "tx", "43")); cbxPimSchema.SelectedIndex = int.Parse(IniFile.GetString("pim", "schema", "0")); // }
internal void StoreOffsets() { //设置配置文件,以操作之 IniFile.SetFileName(fileName); string s = a1.ToString("0.#######") + ", " + b1.ToString("0.#######") + ", " + c1.ToString("0.#######") + ", " + a2.ToString("0.#######") + ", " + b2.ToString("0.#######") + ", " + c2.ToString("0.#######"); IniFile.SetString(sectionName, keyName, s); }
/// <summary> /// 获取属性值 /// </summary> internal void LoadSettings() { IniFile.SetFileName(fileName); ishigh = IniFile.GetString("pim", "ishigh", "0") == "1" ? true : false; //ishigh = false; tx = float.Parse(IniFile.GetString("pim", "tx", "43.0")); tx2 = float.Parse(IniFile.GetString("pim", "tx", "43.0")); f1 = float.Parse(IniFile.GetString("pim", "f1", "935.0")); f2 = float.Parse(IniFile.GetString("pim", "f2", "960.0")); _f1s = App_Settings.spfc.ims[0].F1UpS; _f1e = App_Settings.spfc.ims[0].F1UpE; _f2s = App_Settings.spfc.ims[0].F2DnS; _f2e = App_Settings.spfc.ims[0].F2DnE; _setp1 = App_Settings.spfc.ims[0].F1Step; _setp2 = App_Settings.spfc.ims[0].F2Step; enableSquence = 0; schema = int.Parse(IniFile.GetString("pim", "schema", "0")); mode = int.Parse(IniFile.GetString("pim", "mode", "0")); order = int.Parse(IniFile.GetString("pim", "order", "3")); unit = int.Parse(IniFile.GetString("pim", "unit", "1")); limit = float.Parse(IniFile.GetString("pim", "limit", "-165.0")); scanum1 = int.Parse(IniFile.GetString("pim", "scanum1", "20")); scanum2 = int.Parse(IniFile.GetString("pim", "scanum2", "20")); scanum3 = int.Parse(IniFile.GetString("pim", "scanum3", "10")); scanum4 = int.Parse(IniFile.GetString("pim", "scanum4", "1")); att_spc = int.Parse(IniFile.GetString("pim", "att_spc", "0")); rbw_spc = int.Parse(IniFile.GetString("pim", "rbw_spc", "4")); vbw_spc = int.Parse(IniFile.GetString("pim", "vbw_spc", "4")); scanband = float.Parse(IniFile.GetString("pim", "scanband", "0.05")); specDelay = int.Parse(IniFile.GetString("pim", "specDelay", "0")); tsDelay = int.Parse(IniFile.GetString("pim", "tsDelay", "0")); fsDelay = int.Parse(IniFile.GetString("pim", "fsDelay", "0")); }
internal void StoreSettings() { IniFile.SetFileName(fileName); IniFile.SetString("cnfgs", "max_vswr", max_vswr.ToString("0.#")); IniFile.SetString("cnfgs", "min_temp", min_temp.ToString("0.#")); IniFile.SetString("cnfgs", "max_temp", max_temp.ToString("0.#")); IniFile.SetString("cnfgs", "gpio", min_temp.ToString()); IniFile.SetString("cnfgs", "battery", max_temp.ToString()); //IniFile.SetString("cnfgs", "file_usr_pim", file_usr_pim); //IniFile.SetString("cnfgs", "file_usr_spc", file_usr_spc); //IniFile.SetString("cnfgs", "file_usr_iso", file_usr_iso); //IniFile.SetString("cnfgs", "file_usr_vsw", file_usr_vsw); //IniFile.SetString("cnfgs", "file_usr_har", file_usr_har); IniFile.SetString("cnfgs", "password", _password); }
/// <summary> /// 加载规格参数 /// </summary> internal void LoadSettings() { IniFile.SetFileName(fileName); int n = 3; string pre; for (int i = 0; i < ims.Length; i++) { ims[i] = new ImSpecifics(); pre = "ord" + n.ToString() + "_"; ims[i].F1UpS = float.Parse(IniFile.GetString("Specifics", pre + "F1UpS", "869")); //F1: 869~871.5 ims[i].F1UpE = float.Parse(IniFile.GetString("Specifics", pre + "F1UpE", "871.5")); ims[i].F2DnS = float.Parse(IniFile.GetString("Specifics", pre + "F2DnS", "889")); //F2: 889~894 ims[i].F2DnE = float.Parse(IniFile.GetString("Specifics", pre + "F2DnE", "894")); ims[i].F1fixed = float.Parse(IniFile.GetString("Specifics", pre + "F1fixed", "869")); //F1: 869 F2: 894 ims[i].F2fixed = float.Parse(IniFile.GetString("Specifics", pre + "F2fixed", "894")); ims[i].F1Step = float.Parse(IniFile.GetString("Specifics", pre + "F1Step", "1")); //Step ims[i].F2Step = float.Parse(IniFile.GetString("Specifics", pre + "F2Step", "1")); ims[i].ImS = float.Parse(IniFile.GetString("Specifics", pre + "ImS", "844")); //Im3: 844~849 ims[i].ImE = float.Parse(IniFile.GetString("Specifics", pre + "ImE", "849")); n = n + 2; } cbn.Cbn1F1S = float.Parse(IniFile.GetString("Specifics", "Cbn1F1S", "869")); //F1: 869~871.5 cbn.Cbn1F1E = float.Parse(IniFile.GetString("Specifics", "Cbn1F1E", "871.5")); cbn.Cbn1F2S = float.Parse(IniFile.GetString("Specifics", "Cbn1F2S", "889")); //F2: 889~894 cbn.Cbn1F2E = float.Parse(IniFile.GetString("Specifics", "Cbn1F2E", "894")); cbn.Cbn1RxS = float.Parse(IniFile.GetString("Specifics", "Cbn1RxS", "824")); //Rx: 824~849 cbn.Cbn1RxE = float.Parse(IniFile.GetString("Specifics", "Cbn1RxE", "849")); cbn.Cbn2TxS = float.Parse(IniFile.GetString("Specifics", "Cbn2TxS", "869")); //Tx: 869~894 cbn.Cbn2TxE = float.Parse(IniFile.GetString("Specifics", "Cbn2TxE", "894")); cbn.Cbn2RxS = float.Parse(IniFile.GetString("Specifics", "Cbn2RxS", "824")); //Rx: 824~849 cbn.Cbn2RxE = float.Parse(IniFile.GetString("Specifics", "Cbn2RxE", "849")); cbn.TxS = float.Parse(IniFile.GetString("Specifics", "TxS", "869")); //Tx: 869~894 cbn.TxE = float.Parse(IniFile.GetString("Specifics", "TxE", "894")); cbn.RxS = float.Parse(IniFile.GetString("Specifics", "RxS", "824")); //Rx: 824~849 cbn.RxE = float.Parse(IniFile.GetString("Specifics", "RxE", "849")); }
///<summary> ///获取指定的时间扫描数据 ///</summary> internal TimeSweepParam GetTimeSweepParam(Settings_Pim settings, string filePath, string gsm, string mode, int imOrder, string cate, float num) { TimeSweepParam tsp = new TimeSweepParam(); IniFile.SetFileName(filePath); string name = GetName(gsm, mode, imOrder, cate); tsp.F1 = float.Parse(IniFile.GetString(name, "tx1", "935")); tsp.F2 = float.Parse(IniFile.GetString(name, "tx2", "960")); tsp.Rx = float.Parse(IniFile.GetString(name, "rx", "910")); if (App_Configure.Cnfgs.Cal_Use_Table) { //---------------------------------------- tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1); tsp.P2 = (float)settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx2, Tx_Tables.pim_rev_offset2); //if (settings.PimSchema == ImSchema.REV) //{ // tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1); // tsp.P2 = (float)settings.Tx + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx, Tx_Tables.pim_rev_offset2); //} //else //{ // tsp.P1 = (float)settings.Tx + Tx_Tables.pim_frd_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_frd_offset1); // tsp.P2 = (float)settings.Tx + Tx_Tables.pim_frd_tx2.Offset(tsp.F2, settings.Tx, Tx_Tables.pim_frd_offset2); //} //---------------------------------------- } else { tsp.P1 = (float)App_Factors.pim_tx1.ValueWithOffset(tsp.F1, settings.Tx); tsp.P2 = (float)App_Factors.pim_tx2.ValueWithOffset(tsp.F2, settings.Tx2); } tsp.N1 = num; return(tsp); }
internal void LoadOffsets() { string strTemp; //设置配置文件,以操作之 IniFile.SetFileName(fileName); strTemp = IniFile.GetString(sectionName, keyName, ""); factors = strTemp.Trim(); a1 = GetFactors(0); b1 = GetFactors(1); c1 = GetFactors(2); a2 = GetFactors(3); b2 = GetFactors(4); c2 = GetFactors(5); }
internal void StoreSettings(string fileName) { IniFile.SetFileName(fileName); IniFile.SetString("harmonic", "tx", tx.ToString("0.#")); IniFile.SetString("harmonic", "freq", freq.ToString("0.#")); IniFile.SetString("harmonic", "att_spc", att_spc.ToString()); IniFile.SetString("harmonic", "rbw_spc", rbw_spc.ToString()); IniFile.SetString("harmonic", "vbw_spc", vbw_spc.ToString()); IniFile.SetString("harmonic", "min_har", min_har.ToString("0.#")); IniFile.SetString("harmonic", "max_har", max_har.ToString("0.#")); IniFile.SetString("harmonic", "time_points", time_points.ToString()); IniFile.SetString("harmonic", "freq_step", freq_step.ToString("0.#")); IniFile.SetString("harmonic", "limit", limit.ToString("0.#")); IniFile.SetString("harmonic", "rev", rev.ToString("0.#")); }
internal void LoadSettings() { IniFile.SetFileName(fileName); tx = float.Parse(IniFile.GetString("isolation", "tx", "30.0")); freq = float.Parse(IniFile.GetString("isolation", "freq", "930.0")); att_spc = int.Parse(IniFile.GetString("isolation", "att_spc", "0")); rbw_spc = int.Parse(IniFile.GetString("isolation", "rbw_spc", "4")); vbw_spc = int.Parse(IniFile.GetString("isolation", "vbw_spc", "4")); time_points = int.Parse(IniFile.GetString("isolation", "time_points", "20")); freq_step = float.Parse(IniFile.GetString("isolation", "freq_step", "1.0")); min_iso = float.Parse(IniFile.GetString("isolation", "min_iso", "0")); max_iso = float.Parse(IniFile.GetString("isolation", "max_iso", "140")); limit = float.Parse(IniFile.GetString("isolation", "limit", "80")); attenuator = float.Parse(IniFile.GetString("isolation", "attenuator", "0")); offset = float.Parse(IniFile.GetString("isolation", "offset", "0")); }
internal void StoreSettings(string fileName) { IniFile.SetFileName(fileName); IniFile.SetString("isolation", "tx", tx.ToString("0.#")); IniFile.SetString("isolation", "freq", freq.ToString("0.#")); IniFile.SetString("isolation", "att_spc", att_spc.ToString()); IniFile.SetString("isolation", "rbw_spc", rbw_spc.ToString()); IniFile.SetString("isolation", "vbw_spc", vbw_spc.ToString()); IniFile.SetString("isolation", "time_points", time_points.ToString()); IniFile.SetString("isolation", "freq_step", freq_step.ToString("0.#")); IniFile.SetString("isolation", "min_iso", min_iso.ToString("0.#")); IniFile.SetString("isolation", "max_iso", max_iso.ToString("0.#")); IniFile.SetString("isolation", "limit", limit.ToString("0.#")); IniFile.SetString("isolation", "attenuator", limit.ToString("0.#")); IniFile.SetString("isolation", "offset", limit.ToString("0.#")); }
internal void LoadSettings() { IniFile.SetFileName(fileName); tx = float.Parse(IniFile.GetString("harmonic", "tx", "30.0")); freq = float.Parse(IniFile.GetString("harmonic", "freq", "930.0")); att_spc = int.Parse(IniFile.GetString("harmonic", "att_spc", "0")); rbw_spc = int.Parse(IniFile.GetString("harmonic", "rbw_spc", "4")); vbw_spc = int.Parse(IniFile.GetString("harmonic", "vbw_spc", "4")); min_har = float.Parse(IniFile.GetString("harmonic", "min_har", "0")); max_har = float.Parse(IniFile.GetString("harmonic", "max_har", "140")); time_points = int.Parse(IniFile.GetString("harmonic", "time_points", "20")); freq_step = float.Parse(IniFile.GetString("harmonic", "freq_step", "1.0")); limit = float.Parse(IniFile.GetString("harmonic", "limit", "80")); multiplier = int.Parse(IniFile.GetString("harmonic", "multiplier", "2")); rev = int.Parse(IniFile.GetString("harmonic", "rev", "0")); }
private void PimSaveForm_Load(object sender, EventArgs e) { IniFile.SetFileName("D:\\settings\\Specifics.ini"); chkCsv.Checked = IniFile.GetString("Specifics", "csvC", "1") == "1"?true:false; chkPDF.Checked = IniFile.GetString("Specifics", "pdfC", "0") == "1" ? true : false; chkJpg.Checked = IniFile.GetString("Specifics", "jpgC", "0") == "1" ? true : false; //chkCsv.Checked = Convert.ToBoolean(App_Configure.Cnfgs.Csv_checked); //chkPDF.Checked = Convert.ToBoolean(App_Configure.Cnfgs.Pdf_checked); //chkJpg.Checked = Convert.ToBoolean(App_Configure.Cnfgs.Jpg_checked); string formate = "yyyy-MM-dd HH-mm-ss"; txtCsv.Text = DateTime.Now.ToString(formate); txtJpg.Text = DateTime.Now.ToString(formate); txtPDF.Text = DateTime.Now.ToString(formate); textBox2.Text = App_Configure.Cnfgs.Modno; textBox3.Text = App_Configure.Cnfgs.Serno; textBox1.Text = App_Configure.Cnfgs.Opeor; SaveDatas(); lblPath.Text = "文件路径:" + App_Configure.Cnfgs.Path_Rpt_Pim; }
internal void StoreSettings() { IniFile.SetFileName(fileName); IniFile.SetString(signalName, "port", port); IniFile.SetString(signalName, "limit_vswr", limit_vswr.ToString("0.#")); IniFile.SetString(signalName, "mode_power", mode_power.ToString()); IniFile.SetString(signalName, "tx_pre", tx_pre.ToString("0.#")); IniFile.SetString(signalName, "tx", tx.ToString("0.#")); IniFile.SetString(signalName, "enableVswr", enableVswr.ToString()); IniFile.SetString(signalName, "time_vswr", time_vswr.ToString()); IniFile.SetString(signalName, "min_power", min_power.ToString("0.#")); IniFile.SetString(signalName, "max_power", max_power.ToString("0.#")); IniFile.SetString(signalName, "min_freq", min_freq.ToString("0.#")); IniFile.SetString(signalName, "max_freq", max_freq.ToString("0.#")); IniFile.SetString(signalName, "min_temp", min_temp.ToString("0.#")); IniFile.SetString(signalName, "max_temp", max_temp.ToString("0.#")); IniFile.SetString(signalName, "min_curr", min_curr.ToString("0.#")); IniFile.SetString(signalName, "max_curr", max_curr.ToString("0.#")); }
internal void LoadSettings() { IniFile.SetFileName(fileName); tx = float.Parse(IniFile.GetString("vswr", "tx", "30.0")); freq = float.Parse(IniFile.GetString("vswr", "freq", "935.0")); freq_step = float.Parse(IniFile.GetString("vswr", "freq_step", "0.5")); count = int.Parse(IniFile.GetString("vswr", "count", "20")); att_spc = int.Parse(IniFile.GetString("vswr", "att_spc", "0")); rbw_spc = int.Parse(IniFile.GetString("vswr", "rbw_spc", "4")); vbw_spc = int.Parse(IniFile.GetString("vswr", "vbw_spc", "4")); min_vsw = float.Parse(IniFile.GetString("vswr", "min_vsw", "0")); max_vsw = float.Parse(IniFile.GetString("vswr", "max_vsw", "10")); min_rls = float.Parse(IniFile.GetString("vswr", "min_rls", "0")); max_rls = float.Parse(IniFile.GetString("vswr", "max_rls", "100")); limit = float.Parse(IniFile.GetString("vswr", "limit", "1.3")); attenuator = float.Parse(IniFile.GetString("vswr", "attenuator", "0")); offset = float.Parse(IniFile.GetString("vswr", "offset", "0")); }
internal void StoreSettings(string SettingsFileName) { IniFile.SetFileName(SettingsFileName); IniFile.SetString("vswr", "tx", tx.ToString("0.#")); IniFile.SetString("vswr", "freq", freq.ToString("0.#")); IniFile.SetString("vswr", "freq_step", freq_step.ToString("0.#")); IniFile.SetString("vswr", "att_spc", att_spc.ToString()); IniFile.SetString("vswr", "rbw_spc", rbw_spc.ToString()); IniFile.SetString("vswr", "vbw_spc", vbw_spc.ToString()); IniFile.SetString("vswr", "count", count.ToString()); IniFile.SetString("vswr", "min_vsw", min_vsw.ToString("0.#")); IniFile.SetString("vswr", "max_vsw", max_vsw.ToString("0.#")); IniFile.SetString("vswr", "min_rls", min_rls.ToString("0.#")); IniFile.SetString("vswr", "max_rls", max_rls.ToString("0.#")); IniFile.SetString("vswr", "limit", limit.ToString("0.#")); IniFile.SetString("vswr", "attenuator", limit.ToString("0.#")); IniFile.SetString("vswr", "offset", limit.ToString("0.#")); }
/// <summary> /// 获取指定的序列频率扫描数据 /// </summary> /// <param name="filePath">读取的文件地址</param> /// <param name="gsm"></param> /// <param name="mode">REV,FWD</param> /// <param name="imOder">阶数</param> /// <param name="cate">fixed,sweep</param> internal FreqSweepParam GetFreqSweepParam(Settings_Pim settings, string filePath, string gsm, string mode, string cate, int imOrder) { IniFile.SetFileName(filePath); string name = GetName(gsm, mode, imOrder, cate); FreqSweepParam fsp = new FreqSweepParam(); FreqSweepItem[] sweepItem1 = null; FreqSweepItem[] sweepItem2 = null; string tx1_1 = IniFile.GetString(name, "tx1_1", "935"); string tx2_1 = IniFile.GetString(name, "tx2_1", "960"); string rx_1 = IniFile.GetString(name, "rx_1", "910"); string tx1_2 = IniFile.GetString(name, "tx1_2", "935"); string tx2_2 = IniFile.GetString(name, "tx2_2", "960"); string rx_2 = IniFile.GetString(name, "rx_2", "910"); string[] strTx1_1 = tx1_1.Split(char.Parse(",")); string[] strTx2_1 = tx2_1.Split(char.Parse(",")); string[] strRx_1 = rx_1.Split(char.Parse(",")); string[] strTx1_2 = tx1_2.Split(char.Parse(",")); string[] strTx2_2 = tx2_2.Split(char.Parse(",")); string[] strRx_2 = rx_2.Split(char.Parse(",")); sweepItem1 = new FreqSweepItem[strTx1_1.Length]; sweepItem2 = new FreqSweepItem[strTx1_2.Length]; for (int i = 0; i < strTx1_1.Length; i++) { sweepItem1[i] = new FreqSweepItem(); sweepItem1[i].Tx1 = float.Parse(strTx1_1[i]); sweepItem1[i].Tx2 = float.Parse(strTx2_1[i]); sweepItem1[i].Rx = float.Parse(strRx_1[i]); sweepItem2[i] = new FreqSweepItem(); sweepItem2[i].Tx1 = float.Parse(strTx1_2[i]); sweepItem2[i].Tx2 = float.Parse(strTx2_2[i]); sweepItem2[i].Rx = float.Parse(strRx_2[i]); if (App_Configure.Cnfgs.Cal_Use_Table) { //---------------------------------------- sweepItem1[i].P1 = settings.Tx + Tx_Tables.pim_rev_tx1.Offset(sweepItem1[i].Tx1, settings.Tx, Tx_Tables.pim_rev_offset1); sweepItem1[i].P2 = settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(sweepItem1[i].Tx2, settings.Tx2, Tx_Tables.pim_rev_offset2); sweepItem2[i].P1 = settings.Tx + Tx_Tables.pim_rev_tx1.Offset(sweepItem2[i].Tx1, settings.Tx, Tx_Tables.pim_rev_offset1); sweepItem2[i].P2 = settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(sweepItem2[i].Tx2, settings.Tx2, Tx_Tables.pim_rev_offset2); //if (settings.PimSchema == ImSchema.REV) //{ // sweepItem1[i].P1 = settings.Tx + Tx_Tables.pim_rev_tx1.Offset(sweepItem1[i].Tx1, settings.Tx, Tx_Tables.pim_rev_offset1); // sweepItem1[i].P2 = settings.Tx + Tx_Tables.pim_rev_tx2.Offset(sweepItem1[i].Tx2, settings.Tx, Tx_Tables.pim_rev_offset2); // sweepItem2[i].P1 = settings.Tx + Tx_Tables.pim_rev_tx1.Offset(sweepItem2[i].Tx1, settings.Tx, Tx_Tables.pim_rev_offset1); // sweepItem2[i].P2 = settings.Tx + Tx_Tables.pim_rev_tx2.Offset(sweepItem2[i].Tx2, settings.Tx, Tx_Tables.pim_rev_offset2); //} //else //{ // sweepItem1[i].P1 = settings.Tx + Tx_Tables.pim_frd_tx1.Offset(sweepItem1[i].Tx1, settings.Tx, Tx_Tables.pim_frd_offset1); // sweepItem1[i].P2 = settings.Tx + Tx_Tables.pim_frd_tx2.Offset(sweepItem1[i].Tx2, settings.Tx, Tx_Tables.pim_frd_offset2); // sweepItem2[i].P1 = settings.Tx + Tx_Tables.pim_frd_tx1.Offset(sweepItem2[i].Tx1, settings.Tx, Tx_Tables.pim_frd_offset1); // sweepItem2[i].P2 = settings.Tx + Tx_Tables.pim_frd_tx2.Offset(sweepItem2[i].Tx2, settings.Tx, Tx_Tables.pim_frd_offset2); //} //---------------------------------------- } else { sweepItem1[i].P1 = (float)App_Factors.pim_tx1.ValueWithOffset(sweepItem1[i].Tx1, settings.Tx); sweepItem1[i].P2 = (float)App_Factors.pim_tx2.ValueWithOffset(sweepItem1[i].Tx2, settings.Tx2); sweepItem2[i].P1 = (float)App_Factors.pim_tx1.ValueWithOffset(sweepItem2[i].Tx1, settings.Tx); sweepItem2[i].P2 = (float)App_Factors.pim_tx2.ValueWithOffset(sweepItem2[i].Tx2, settings.Tx2); } } fsp.Items1 = sweepItem1; fsp.Items2 = sweepItem2; return(fsp); }
internal void LoadSettings() { IniFile.SetFileName(fileName); //=======ygq ms_switch_port_count = int.Parse(IniFile.GetString("cnfgs", "ms_switch_port_count", "0")); comaddr_switch = int.Parse(IniFile.GetString("cnfgs", "comaddr_switch", "1")); rxRef = float.Parse(IniFile.GetString("cnfgs", "rxRef", "0")); txRef = float.Parse(IniFile.GetString("cnfgs", "txRef", "0")); openOffset = int.Parse(IniFile.GetString("cnfgs", "openOffset", "1")); qiandanqian_mode = int.Parse(IniFile.GetString("cnfgs", "qiandanqiang_mode", "0")); mode = int.Parse(IniFile.GetString("cnfgs", "mode", "0")); ishigh = int.Parse(IniFile.GetString("cnfgs", "ishigh", "0")); //======ygq macdesc = IniFile.GetString("cnfgs", "macdesc", "JCIMA-II-900P"); macid = int.Parse(IniFile.GetString("cnfgs", "macid", "1")); sn = IniFile.GetString("cnfgs", "sn", "none sn"); cal = IniFile.GetString("cnfgs", "cal", "none cal"); comaddr1 = int.Parse(IniFile.GetString("cnfgs", "comaddr1", "1")); comaddr2 = int.Parse(IniFile.GetString("cnfgs", "comaddr2", "2")); rfclass = int.Parse(IniFile.GetString("cnfgs", "rfclass", "0")); rfformula = int.Parse(IniFile.GetString("cnfgs", "rfformula", "0")); spectrum = int.Parse(IniFile.GetString("cnfgs", "spectrum", "0")); max_vswr = float.Parse(IniFile.GetString("cnfgs", "max_vswr", "2.0")); min_temp = float.Parse(IniFile.GetString("cnfgs", "min_temp", "-20.0")); max_temp = float.Parse(IniFile.GetString("cnfgs", "max_temp", "60.0")); min_curr = float.Parse(IniFile.GetString("cnfgs", "min_curr", "0.1")); max_curr = float.Parse(IniFile.GetString("cnfgs", "max_curr", "3.0")); path_def = IniFile.GetString("cnfgs", "path_def", "settings"); //file_def_pim = IniFile.GetString("cnfgs", "file_def_pim", "Settings_Pim.ini"); //file_def_spc = IniFile.GetString("cnfgs", "file_def_spc", "Settings_Spc.ini"); //file_def_iso = IniFile.GetString("cnfgs", "file_def_iso", "Settings_Iso.ini"); //file_def_vsw = IniFile.GetString("cnfgs", "file_def_vsw", "Settings_Vsw.ini"); //file_def_har = IniFile.GetString("cnfgs", "file_def_har", "Settings_Har.ini"); path_usr = IniFile.GetString("cnfgs", "path_usr", "d:\\usr_settings"); path_usr_pim = IniFile.GetString("cnfgs", "path_usr_pim", "d:\\usr_settings\\pim"); path_usr_spc = IniFile.GetString("cnfgs", "path_usr_spc", "d:\\usr_settings\\spc"); path_usr_iso = IniFile.GetString("cnfgs", "path_usr_iso", "d:\\usr_settings\\iso"); path_usr_vsw = IniFile.GetString("cnfgs", "path_usr_vsw", "d:\\usr_settings\\vsw"); path_usr_har = IniFile.GetString("cnfgs", "path_usr_har", "d:\\usr_settings\\har"); //file_usr_pim = IniFile.GetString("cnfgs", "file_usr_pim", "Settings_Pim.ini"); //file_usr_spc = IniFile.GetString("cnfgs", "file_usr_spc", "Settings_Spc.ini"); //file_usr_iso = IniFile.GetString("cnfgs", "file_usr_iso", "Settings_Iso.ini"); //file_usr_vsw = IniFile.GetString("cnfgs", "file_usr_vsw", "Settings_Vsw.ini"); //file_usr_har = IniFile.GetString("cnfgs", "file_usr_har", "Settings_Har.ini"); path_rpt = IniFile.GetString("cnfgs", "path_rpt", "d:\\report"); path_rpt_pim = IniFile.GetString("cnfgs", "path_rpt_pim", "d:\\report\\pim"); path_rpt_spc = IniFile.GetString("cnfgs", "path_rpt_spc", "d:\\report\\spc"); path_rpt_iso = IniFile.GetString("cnfgs", "path_rpt_iso", "d:\\report\\iso"); path_rpt_vsw = IniFile.GetString("cnfgs", "path_rpt_vsw", "d:\\report\\vsw"); path_rpt_har = IniFile.GetString("cnfgs", "path_rpt_har", "d:\\report\\har"); cal_use_table = int.Parse(IniFile.GetString("cnfgs", "cal_use_table", "0")); lang_pack_path = IniFile.GetString("cnfgs", "lang_pack_path", ""); skin_pack_path = IniFile.GetString("cnfgs", "skin_pack_path", ""); //enable_pim = int.Parse(IniFile.GetString("cnfgs", "enable_pim", "1")); //enable_spc = int.Parse(IniFile.GetString("cnfgs", "enable_spc", "1")); //enable_iso = int.Parse(IniFile.GetString("cnfgs", "enable_iso", "0")); //enable_vsw = int.Parse(IniFile.GetString("cnfgs", "enable_vsw", "0")); //enable_har = int.Parse(IniFile.GetString("cnfgs", "enable_har", "0")); //enable_tst = int.Parse(IniFile.GetString("cnfgs", "enable_tst", "0")); _desc = IniFile.GetString("cnfgs", "desc", "here is no [description]"); _modno = IniFile.GetString("cnfgs", "modno", "here is no [model no.]"); _opeor = IniFile.GetString("cnfgs", "opeor", "here is no [serial no.]"); _serno = IniFile.GetString("cnfgs", "serno", "default user"); csv_checked = int.Parse(IniFile.GetString("cnfgs", "csv_checked", "0")); jpg_checked = int.Parse(IniFile.GetString("cnfgs", "jpg_checked", "0")); pdf_checked = int.Parse(IniFile.GetString("cnfgs", "pdf_checked", "0")); _channel = int.Parse(IniFile.GetString("cnfgs", "channel", "0")); _gpio = int.Parse(IniFile.GetString("cnfgs", "gpio", "0")); _battery = int.Parse(IniFile.GetString("cnfgs", "battery", "0")); _width_pinNum = int.Parse(IniFile.GetString("cnfgs", "width_pinNum", "0")); _power_pinNum = int.Parse(IniFile.GetString("cnfgs", "power_pinNum", "1")); _enableSuperConfig = int.Parse(IniFile.GetString("cnfgs", "enableSuperConfig", "0")); isScroll = IniFile.GetString("cnfgs", "scroll", "1") == "0" ? true : false; switchOrGpio = IniFile.GetString("cnfgs", "SwitchOrGpio", "0") == "0" ? true : false; //_pim_wait = int.Parse(IniFile.GetString("cnfgs", "pimWait", "1000")); _password = IniFile.GetString("cnfgs", "password", "82F8A4F03E18723F"); _switchMode = int.Parse(IniFile.GetString("cnfgs", "switchMode", "0")); _switchO = IniFile.GetString("cnfgs", "switchO", "0"); _switchN = IniFile.GetString("cnfgs", "switchN", "0"); if (_password == "") { _password = "******"; } }