public frmEditPC(Form form,string pcName) { pc = form as frmPC; this.pcName = pcName; InitializeComponent(); InitializeForm(); }
public frmNewPC(Form form,string mode) { switch (form.Name) { case "frmPC": pc = form as frmPC; break; case "frmAssignTo": assign = form as frmAssignTo; break; } this.mode = mode; InitializeComponent(); }
private void btnPC_Click(object sender, EventArgs e) { frmPC pc = new frmPC(uid); pc.ShowDialog(); }