/// <summary> /// Displays the form and aligns it to the center of the <paramref name="form"/>. /// </summary> /// <param name="form">The form .</param> public static void Execute(Form form) { if (formPsycho != null) { return; } formPsycho = new FormPsycho(); formPsycho.Left = form.Left + (form.Width - formPsycho.Width) / 2; formPsycho.Top = form.Top + (form.Height - formPsycho.Height) / 2; formPsycho.Show(); formPsycho.Refresh(); }
/// <summary> /// Closes an instance of this form a and sets it to null. /// </summary> public static void UnExecute() { formPsycho.Close(); formPsycho = null; }