Mono.UIAutomation.Winforms.FormProvider.GetFocus C# (CSharp) 메소드

GetFocus() 공개 메소드

public GetFocus ( ) : IRawElementProviderFragment
리턴 IRawElementProviderFragment
		public override IRawElementProviderFragment GetFocus ()
		{
			foreach (Control control in form.Controls) {
				if (control.Focused) {
					// TODO: Necessary to delve into child control
					// for focused element?
					
					if (componentProviders.ContainsKey (control)) {
						IRawElementProviderSimple provider =
							componentProviders [control];
						IRawElementProviderFragment providerFragment =
							provider as IRawElementProviderFragment;
						if (providerFragment != null)
							return providerFragment;
					}
				}
			}
			
			return null;
		}