private void RemoveAutomationTextBox(bool update) { if (_automationTextBox == null) { return; } _automationTextBox.Remove(update); _automationTextBox.Dispose(); _automationTextBox = null; }
void automation_EditText(object sender, AnnEditTextEventArgs e) { RemoveAutomationTextBox(true); if (e.TextObject == null) { return; } _automationTextBox = new AutomationTextBox(_viewer, this._automation, e, RemoveAutomationTextBox); }
private void RemoveAutomationTextBox(bool update) { if (_automationTextBox == null) { return; } _automationTextBox.Remove(update); if (_automationTextBox != null) { _automationTextBox.Dispose(); _automationTextBox = null; } OnAutomationTextRemoved(EventArgs.Empty); }
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); } }
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; }