Ejemplo n.º 1
0
        public override void Init()
        {
            IUIAutomation4 uia4 = this.IUIAutomation4;

            if (uia4 != null)
            {
                uia4.AddChangesEventHandler(this.Element, this.Scope, ref ChangeTypes[0], ChangeTypes.Length, null, this);
                this.IsHooked = true;
            }
        }
        public override void Init()
        {
            IUIAutomation4 uia4 = this.IUIAutomation4;

            if (uia4 != null)
            {
                uia4.AddTextEditTextChangedEventHandler(this.Element, this.Scope, TextEditChangeType.TextEditChangeType_AutoComplete, null, this);
                uia4.AddTextEditTextChangedEventHandler(this.Element, this.Scope, TextEditChangeType.TextEditChangeType_AutoCorrect, null, this);
                uia4.AddTextEditTextChangedEventHandler(this.Element, this.Scope, TextEditChangeType.TextEditChangeType_Composition, null, this);
                uia4.AddTextEditTextChangedEventHandler(this.Element, this.Scope, TextEditChangeType.TextEditChangeType_CompositionFinalized, null, this);
                this.IsHooked = true;
            }
        }
 protected override void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             if (this.IsHooked)
             {
                 IUIAutomation4 uia4 = this.IUIAutomation4;
                 if (uia4 != null)
                 {
                     uia4.RemoveTextEditTextChangedEventHandler(this.Element, this);
                 }
             }
         }
     }
     base.Dispose(disposing);
 }