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

ElementProviderFromPoint() 공개 메소드

public ElementProviderFromPoint ( double x, double y ) : IRawElementProviderFragment
x double
y double
리턴 IRawElementProviderFragment
		public override IRawElementProviderFragment ElementProviderFromPoint (double x, double y)
		{
			if (x > form.Width || y > form.Height)
				return null;
			
			Control child = form.GetChildAtPoint (new Point ((int)x, (int)y));
			
			if (child != null) {
				Log.Debug (child.ToString ());
				
				if (componentProviders.ContainsKey (child)) {
					IRawElementProviderSimple provider =
						componentProviders [child];
					IRawElementProviderFragment providerFragment =
						provider as IRawElementProviderFragment;
					if (providerFragment != null)
						return providerFragment;
				}
			} else
				Log.Debug ("ElementProviderFromPoint: Child is null");
			
			return this;
		}