public void Open_method() { if (GlobeVal.UserControlMain1.btnmtest.Visible == true) { tlpback.Enabled = false; } else { tlpback.Enabled = true; } mtempoutput = null; lstinclude.Items.Clear(); lstinclude.mlist.Clear(); lstavail.Items.Clear(); lstavail.mlist.Clear(); for (int i = 0; i < CComLibrary.GlobeVal.filesave.moutput.Count; i++) { if (CComLibrary.GlobeVal.filesave.moutput[i].check == true) { lstinclude.Items.Add(CComLibrary.GlobeVal.filesave.moutput[i].formulaname); lstinclude.mlist.Add(CComLibrary.GlobeVal.filesave.moutput[i]); } else { lstavail.Items.Add(CComLibrary.GlobeVal.filesave.moutput[i].formulaname); lstavail.mlist.Add(CComLibrary.GlobeVal.filesave.moutput[i]); } } }
private void lstinclude_MouseClick(object sender, MouseEventArgs e) { if (lstinclude.SelectedIndex >= 0) { mtempoutput = lstinclude.mlist[lstinclude.SelectedIndex]; if (mtempoutput.myitemsignal.cUnitKind == 19) { tlpitem.Visible = false; } else { tlpitem.Visible = true; } lblcaption.Text = lstinclude.mlist[lstinclude.SelectedIndex].formulaname; this.cbocolunit.Items.Clear(); for (int i = 0; i < lstinclude.mlist[lstinclude.SelectedIndex].myitemsignal.cUnitCount; i++) { this.cbocolunit.Items.Add(lstinclude.mlist[lstinclude.SelectedIndex].myitemsignal.cUnits[i]); } this.cbocolunit.SelectedIndex = lstinclude.mlist[lstinclude.SelectedIndex].myitemsignal.cUnitsel; this.editcolprecise.Value = lstinclude.mlist[lstinclude.SelectedIndex].myitemsignal.precise; this.editcolup.Value = lstinclude.mlist[lstinclude.SelectedIndex].limitup; this.editcoldown.Value = lstinclude.mlist[lstinclude.SelectedIndex].limitdown; this.cbomode.Items.Clear(); if (GlobeVal.mysys.language == 0) { cbomode.Items.Add("公式名称"); cbomode.Items.Add("公式说明"); } else { cbomode.Items.Add("Formula name"); cbomode.Items.Add("Formula description"); } if (lstinclude.mlist[lstinclude.SelectedIndex].apply == false) { cbomode.SelectedIndex = 0; } else { cbomode.SelectedIndex = 1; } } }
private void lstavail_MouseClick(object sender, MouseEventArgs e) { if (lstavail.SelectedIndex >= 0) { lblcaption.Text = lstavail.mlist[lstavail.SelectedIndex].formulaname; mtempoutput = lstavail.mlist[lstavail.SelectedIndex]; this.txtExplain.Text = lstavail.mlist[lstavail.SelectedIndex].formulaexplain; this.cbounit.Items.Clear(); for (int i = 0; i < lstavail.mlist[lstavail.SelectedIndex].myitemsignal.cUnitCount; i++) { this.cbounit.Items.Add(lstavail.mlist[lstavail.SelectedIndex].myitemsignal.cUnits[i]); } this.cbounit.SelectedIndex = lstavail.mlist[lstavail.SelectedIndex].myitemsignal.cUnitsel; this.txtprecise.Text = lstavail.mlist[lstavail.SelectedIndex].myitemsignal.precise.ToString(); this.chkshow.Checked = lstavail.mlist[lstavail.SelectedIndex].show; } }