Пример #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <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;
        }
Пример #2
0
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
        #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);
        }