private void button1_Click(object sender, EventArgs e) { Sec_Measures temp = new Sec_Measures(); temp.Where = tBoxWhere.Text; string[] ts = { "" }; string[] ss = tBoxWhat.Lines; ///Убираем пустые строки if (ss[ss.Length - 1] == "") { ts = new string[ss.Length - 1]; for (int i = 0; i < ss.Length - 1; i++) { ts[i] = ss[i]; } } /// else { ts = new string[ss.Length]; for (int i = 0; i < ss.Length; i++) { ts[i] = ss[i]; } } for (int i = 0; i < ts.Length; i++) { temp.What.Add(ts[i]); } sList.Add(temp); onRewrite(); tBoxWhat.Text = ""; tBoxWhere.Text = ""; }
private void button13_Click(object sender, EventArgs e) { fProgram fp = new fProgram(); fp.ShowDialog(); if (fp.isOK) { CurrentAttire.Estr = fp.OUT_Estr; CurrentAttire.Spec_Insrtrucion = fp.OUT_Instr; Sec_Measures S_M = new Sec_Measures(); S_M.What.Add(Const.FORMAT_MEASURE_PROGRAM); S_M.Where = Const.FORMAT_MEASURE_PROGRAM; meas_l.Clear(); meas_r.Clear(); meas_l.Add(Const.FORMAT_MEASURE_PROGRAM); meas_r.Add(Const.FORMAT_MEASURE_PROGRAM); CurrentAttire.Sec_Meas.Clear(); CurrentAttire.Sec_Meas.Add(S_M); onRewrite(); } }