Наследование: ACAT.Lib.Extension.MenuPanel
Пример #1
0
        /// <summary>
        /// Handle quit by asking the user if there is a need
        /// to ask.  Close forms
        /// </summary>
        /// <param name="showPrompt">Should we prompt the user?</param>
        private void handleQuit(bool showPrompt = true)
        {
            bool confirmQuit = true;

            if (showPrompt)
            {
                confirmQuit = confirm(Resources.ExitWithoutCreating);
                if (confirmQuit)
                {
                    ExitCode = CompletionCode.None;
                }
            }

            if (confirmQuit)
            {
                if (_newFileNameForm != null)
                {
                    _newFileNameForm.EvtDone -= _newFileNameForm_EvtDone;
                    Windows.CloseForm(_newFileNameForm);
                }

                _fileChoiceMenu = null;
                _scannerShown   = false;
                CreateTextFile  = false;
                CreateWordDoc   = false;

                Close();
            }
        }
Пример #2
0
        /// <summary>
        /// Displays a menu to let the user to select whether to
        /// create a text file or a word doc
        /// </summary>
        private String showFileChoices()
        {
            _fileChoiceMenu = Context.AppPanelManager.CreatePanel("FileChoiceMenu", Resources.CreateNew) as FileChoiceMenu;
            _scannerShown   = false;
            Context.AppPanelManager.ShowDialog(_fileChoiceMenu as IPanel);

            return(_fileChoiceMenu.Choice);
        }
Пример #3
0
        /// <summary>
        /// Displays a menu to let the user to select whether to
        /// create a text file or a word doc
        /// </summary>
        private String showFileChoices()
        {
            _fileChoiceMenu = Context.AppPanelManager.CreatePanel("NewFileChoiceMenu", R.GetString("CreateNew")) as FileChoiceMenu;
            _scannerShown   = false;
            Context.AppPanelManager.ShowDialog(_fileChoiceMenu);

            return(_fileChoiceMenu.Choice);
        }
Пример #4
0
        /// <summary>
        /// Displays a menu to let the user to select whether to
        /// create a text file or a word doc
        /// </summary>
        private String showFileChoices()
        {
            _fileChoiceMenu = Context.AppPanelManager.CreatePanel("FileChoiceMenu", "Create New") as FileChoiceMenu;
            _scannerShown = false;
            Context.AppPanelManager.ShowDialog(_fileChoiceMenu as IPanel);

            return _fileChoiceMenu.Choice;
        }
Пример #5
0
        /// <summary>
        /// Handle quit by asking the user if there is a need
        /// to ask.  Close forms
        /// </summary>
        /// <param name="showPrompt">Should we prompt the user?</param>
        private void handleQuit(bool showPrompt = true)
        {
            bool confirmQuit = true;
            if (showPrompt)
            {
                confirmQuit = confirm("Exit without creating?");
                if (confirmQuit)
                {
                    ExitCode = CompletionCode.None;
                }
            }

            if (confirmQuit)
            {
                if (_newFileNameForm != null)
                {
                    _newFileNameForm.EvtDone -= _newFileNameForm_EvtDone;
                    Windows.CloseForm(_newFileNameForm);
                }

                _fileChoiceMenu = null;
                _scannerShown = false;
                CreateTextFile = false;
                CreateWordDoc = false;

                Close();
            }
        }