public frmNewSubject(Form form) { InitializeComponent(); this.form = form; switch (form.Name) { case "frmSubjects": sub = form as frmSubjects; break; case "frmNewClass": newClass = form as frmNewClass; break; case "frmEditClass": editClass = form as frmEditClass; break; } }
private void btnNewClass_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmNewClass newClass = new frmNewClass(ownerUID, ownerUserlvl, ownerArea, editorUID, editorUserlvl); newClass.ShowDialog(); }