//implenting singelton pattern to this class public static AllLoansForm Instance(Member member) { if (instance == null) { instance = new AllLoansForm(); } instance.SetAsNewWindow(member); return(instance); }
private void button1_Click(object sender, EventArgs e) { Utils.SwitchBetweenWindows(this, AllLoansForm.Instance(member)); }