Пример #1
0
        /// <summary>
        /// Shows the form modally and returns the address selected, or null if cancelled.
        /// </summary>
        public static string ShowAndGetAddress( IWin32Window parent )
        {
            var form = new NewSessionForm( );

            if ( form.ShowDialog( parent ) == DialogResult.OK )
                return form.tbServerAddress.Text;
            else
                return null;
        }
Пример #2
0
        //=================================================================================
        //
        //  PRIVATE METHODS
        //
        //=================================================================================

        /// <summary>Prompts the user to enter an address, then creates a tab.</summary>
        private void PromptForNewSession( )
        {
            var address = NewSessionForm.ShowAndGetAddress(this);

            if (!string.IsNullOrEmpty(address))
            {
                Add(new MongoSession(address));
            }
        }
Пример #3
0
        /// <summary>
        /// Shows the form modally and returns the address selected, or null if cancelled.
        /// </summary>
        public static string ShowAndGetAddress(IWin32Window parent)
        {
            var form = new NewSessionForm( );

            if (form.ShowDialog(parent) == DialogResult.OK)
            {
                return(form.tbServerAddress.Text);
            }
            else
            {
                return(null);
            }
        }