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