public static int Open() { if (form == null) { form = new SettingForm(); form.Closing += Closing; form.Show(); return(1); } else { form.Activate(); form.Show(); return(0); } }
private static void Closing(object sender, System.ComponentModel.CancelEventArgs e) { form = null; }