Пример #1
0
        private void RemoveAutomationTextBox(bool update)
        {
            if (_automationTextBox == null)
            {
                return;
            }

            _automationTextBox.Remove(update);
            _automationTextBox.Dispose();
            _automationTextBox = null;
        }
Пример #2
0
        void automation_EditText(object sender, AnnEditTextEventArgs e)
        {
            RemoveAutomationTextBox(true);

            if (e.TextObject == null)
            {
                return;
            }

            _automationTextBox = new AutomationTextBox(_viewer, this._automation, e, RemoveAutomationTextBox);
        }
Пример #3
0
        private void RemoveAutomationTextBox(bool update)
        {
            if (_automationTextBox == null)
            {
                return;
            }

            _automationTextBox.Remove(update);

            if (_automationTextBox != null)
            {
                _automationTextBox.Dispose();
                _automationTextBox = null;
            }

            OnAutomationTextRemoved(EventArgs.Empty);
        }
Пример #4
0
        private void RemoveAutomationTextBox(bool update)
        {
            if (_automationTextBox == null)
            {
                return;
            }

            _automationTextBox.Remove(update);
            _automationTextBox.Dispose();
            _automationTextBox = null;

            var automation = _documentViewer.Annotations.Automation;

            if (automation.CurrentEditObject != null)
            {
                automation.InvalidateObject(automation.CurrentEditObject);
            }
        }
Пример #5
0
        private void automation_EditText(object sender, AnnEditTextEventArgs e)
        {
            var automation = _documentViewer.Annotations.Automation;

            if (automation == null)
            {
                return;
            }

            RemoveAutomationTextBox(true);

            if (e.TextObject == null)
            {
                return;
            }

            var imageViewer = _documentViewer.View.ImageViewer;

            _automationTextBox = new AutomationTextBox(imageViewer, automation, e, RemoveAutomationTextBox);

            // we haven't changed yet
            e.Cancel = true;
        }