Example #1
0
        public Result OnStartup(UIControlledApplication a)
        {
            _app  = this;
            _form = null;

            return(Result.Succeeded);
        }
Example #2
0
        /// <summary>
        /// Dispose and null out form.
        /// Return true if it was previously not disposed.
        /// </summary>
        static bool CloseForm()
        {
            bool rc = _form != null;

            if (rc)
            {
                if (!_form.IsDisposed)
                {
                    _form.Dispose();
                }
                _form = null;
            }
            return(rc);
        }
Example #3
0
        /// <summary>
        /// Create and show the form,
        /// unless it already exists.
        /// </summary>
        /// <remarks>
        /// The external command invokes
        /// this on end-user request.
        /// </remarks>
        public void ShowForm(UIApplication uiapp)
        {
            // If we do not have a form yet, create and show it

            if (_form == null || _form.IsDisposed)
            {
                // Instantiate JtTooltipForm to use
                // the designer generated form.

                _form = new JtTooltipForm2();

                _form.Show();

                // If we have a form, we need Idling too

                uiapp.Idling += IdlingHandler;
            }
        }