private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Equals(string.Empty)) { return; } if (stationform == null) { stationform = new Rmes.DA.Base.ConfigFormEntity(); } try { stationform.FORMID = textBox1.Text; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void dgvStations_SelectionChanged(object sender, EventArgs e) { if (dgvStations.SelectedRows.Count != 1) { return; } string stationid = dgvStations.SelectedRows[0].Cells["RMES_ID"].Value.ToString(); List <Rmes.DA.Base.ConfigFormEntity> config = Rmes.DA.Base.BaseControlFactory.GetFormConfigFromStationCode(stationid); if (config.Count > 0) { stationform = config.First(); textBox1.Text = stationform.FORMID; textBox1.Enabled = false; textBox2.Text = stationform.Left.ToString(); textBox3.Text = stationform.Top.ToString(); textBox5.Text = stationform.Width.ToString(); textBox4.Text = stationform.Height.ToString(); comboBox1.Text = stationform.AssembleFile; comboBox2.Text = stationform.AssembleString; checkBox1.Checked = stationform.FullScreen; checkBox2.Checked = stationform.Resizable; } else { stationform = null; textBox1.Text = ""; textBox1.Enabled = true; textBox2.Text = ""; textBox3.Text = ""; textBox5.Text = ""; textBox4.Text = ""; comboBox1.SelectedIndex = -1; comboBox2.SelectedIndex = -1; checkBox1.Checked = false; checkBox2.Checked = false; } //throw new NotImplementedException(); }