private void Btn_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn.Text == "") { return; } if (btn.Tag is Project) { f_Project f = new f_Project(); f.ShowDialog(); } else if (btn.Tag is Task) { Task t = btn.Tag as Task; f_TaskEdit f = new f_TaskEdit(Convert.ToInt32(t.IDProject.ToString())); f.ShowDialog(); } }
private void mt_Project_Click(object sender, EventArgs e) { f_Project f = new f_Project(); f.ShowDialog(); }