예제 #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);
            }
        }