/////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// If the AllMappingsForm is already open, it is brought to the front. /// Otherwise, a new AllMappingsForm is opened and shown. /// </summary> /// <returns> /// The AllMappingsForm that was displayed. /// </returns> public static AllMappingsForm ShowAllMappingsForm() { foreach (Form form in Application.OpenForms) { if (form is AllMappingsForm) { form.BringToFront(); return (AllMappingsForm)form; } } AllMappingsForm newForm = new AllMappingsForm(); newForm.Show(); return newForm; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// #endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// #region Add Mapping Form /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// If the AllMappingsForm is already open, it is brought to the front. /// Otherwise, a new AllMappingsForm is opened and shown. /// </summary> /// <returns> /// The AllMappingsForm that was displayed. /// </returns> public static AllMappingsForm ShowAllMappingsForm() { foreach (Form form in Application.OpenForms) { if (form is AllMappingsForm) { form.BringToFront(); return((AllMappingsForm)form); } } AllMappingsForm newForm = new AllMappingsForm(); newForm.Show(); return(newForm); }