/// <summary> /// Set up the all the *Listener classes to winforms /// events that will allow the correct UIA providers to be /// created and the correct UIA events to be fired. /// /// This method is called via reflection from the /// System.Windows.Forms.Application class. /// </summary> public static void Initialize() { Application.PreRun += new EventHandler(OnPreRun); FormListener.Initialize(); ToolTipListener.Initialize(); HelpProviderListener.Initialize(); ErrorProviderListener.Initialize(); }
protected SimpleControlProvider(Component component) { this.component = component ?? new DummyComponent(); control = component as SWF.Control; events = new Dictionary <ProviderEventType, IConnectable> (); providerBehaviors = new Dictionary <AutomationPattern, IProviderBehavior> (); if (Control != null) { ErrorProvider = ErrorProviderListener.GetErrorProviderFromControl(Control); ToolTip = ToolTipListener.GetToolTipFromControl(Control); } }