ACAT.Extensions.Default.FunctionalAgents.AbbreviationsAgent.AbbreviationsScanner.Pause C# (CSharp) Method

Pause() public method

Temporary disable keypress, pause animation
public Pause ( ) : void
return void
        public void Pause()
        {
            _keyboardActuator.EvtKeyPress -= _keyboardActuator_EvtKeyPress;
            _scannerCommon.GetAnimationManager().Pause();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Displays the abbreviation dialog box that allows
        /// the user to either edit or delete an abbreviation
        /// </summary>
        /// <param name="operation">type of operation - edit/add/delete</param>
        private void editOrAddAbbreviation(AbbrOperation operation)
        {
            var dlg = Context.AppPanelManager.CreatePanel("AbbreviationEditorForm");

            if (dlg == null)
            {
                return;
            }

            var invoker = (dlg as IExtension).GetInvoker();

            invoker.SetValue("InputAbbreviation", operation.InputAbbreviation);
            invoker.SetValue("Add", operation.Add);

            _abbrForm.Pause();
            Context.AppPanelManager.ShowDialog(Context.AppPanelManager.GetCurrentPanel(), dlg as IPanel);
            _abbrForm.Resume();

            bool?canceled           = invoker.GetBoolValue("Cancel");
            var  outputAbbreviation = invoker.GetValue("OutputAbbreviation") as Abbreviation;

            if (outputAbbreviation != null)
            {
                bool?deleted = invoker.GetBoolValue("Delete");
                if (deleted != null)
                {
                    operation.Cancel = canceled.Value;
                    operation.Delete = deleted.Value;
                }

                operation.OutputAbbreviation = outputAbbreviation;
            }
        }