public void open_timer(string id_session) { Timer_Menu tm = new Timer_Menu(id_session); tm.MdiParent = this.MdiParent; tm.Show(); }
private void fileToolStripMenuItem_Click(object sender, EventArgs e) { Timer_Menu tm = new Timer_Menu(""); tm.MdiParent = this; tm.Show(); }
private void selectSessionAndOpenTimerToolStripMenuItem_Click(object sender, EventArgs e) { try { string session = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); Timer_Menu tm = new Timer_Menu(session); tm.MdiParent = this.MdiParent; tm.Show(); } catch (System.ArgumentOutOfRangeException ex) { } }
private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { try { string session = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); Timer_Menu tm = new Timer_Menu(session); tm.MdiParent = this.MdiParent; tm.Show(); } catch (System.ArgumentOutOfRangeException ex) { } } }