private void ToolStripButton3_Click(object sender, EventArgs e) { StationForm frm = new StationForm(); frm.Text = "New Station"; frm.TopLevel = false; frm.MdiParent = this.MdiParent; frm.Show(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { var rowIndex = dgvStationList.SelectedRows[0].Index; Station station = Get(rowIndex); if (station != null) { StationForm frm = new StationForm(station); frm.Text = "Edit Station"; frm.TopLevel = false; frm.MdiParent = this.MdiParent; frm.Show(); } }
private void dgvStationList_CellContentClick(object sender, DataGridViewCellEventArgs e) { var rowIndex = e.RowIndex; if (rowIndex >= 0) { Station station = Get(rowIndex); if (station != null) { StationForm frm = new StationForm(station); frm.Name = "Edit Station"; frm.TopLevel = false; frm.MdiParent = this.MdiParent; frm.Show(); } } }