当前位置: 首页>>代码示例>>C#>>正文


C# Provider.IRawElementProviderSimple类代码示例

本文整理汇总了C#中System.Windows.Automation.Provider.IRawElementProviderSimple的典型用法代码示例。如果您正苦于以下问题:C# IRawElementProviderSimple类的具体用法?C# IRawElementProviderSimple怎么用?C# IRawElementProviderSimple使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IRawElementProviderSimple类属于System.Windows.Automation.Provider命名空间,在下文中一共展示了IRawElementProviderSimple类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TreeItem

		public TreeItem (IRawElementProviderSimple provider) : base (provider)
		{
			invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id);
			selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id);

			expandCollapseProvider = provider.GetPatternProvider (
				ExpandCollapsePatternIdentifiers.Pattern.Id) as IExpandCollapseProvider;

			textExpert = TextImplementorFactory.GetImplementor (this, provider);
			actionExpert = new ActionImplementorHelper ();

			// TODO: Localize the name?s
			actionExpert.Add ("click", "click", null, DoClick);
			if (ToggleProvider != null)
				actionExpert.Add ("toggle", "toggle", null, DoToggle);
			if (invokeProvider != null)
				actionExpert.Add ("invoke", "invoke", null, DoInvoke);

			IRawElementProviderFragment fragment = Provider as IRawElementProviderFragment;
			if (fragment != null && fragment.Navigate (NavigateDirection.FirstChild) != null)
				AddExpandContractAction ();

			Role = (ToggleProvider != null? Atk.Role.CheckBox: Atk.Role.TableCell);

			imageExpert = new ImageImplementorHelper (this);
			editableTextExpert = new EditableTextImplementorHelper (this, this, textExpert);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:27,代码来源:TreeItem.cs

示例2: ComponentAdapter

		public ComponentAdapter (IRawElementProviderSimple provider) : base (provider)
		{
			if (provider == null)
				throw new ArgumentNullException ("provider");

			componentExpert = new ComponentImplementorHelper (this);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:ComponentAdapter.cs

示例3: ExpandCollapseButton

		public ExpandCollapseButton (IRawElementProviderSimple provider) : base (provider)
		{
			ec_prov = (IExpandCollapseProvider)provider.GetPatternProvider (
				ExpandCollapsePatternIdentifiers.Pattern.Id);

			Role = Atk.Role.ToggleButton;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:ExpandCollapseButton.cs

示例4: RemoveAutomationPropertyChangedEventHandler

		public static void RemoveAutomationPropertyChangedEventHandler (IRawElementProviderSimple provider, AutomationPropertyChangedEventHandler eventHandler)
		{
			lock (propertyChangedEventEntries)
				propertyChangedEventEntries.RemoveAll (e =>
					e.Provider == provider &&
					e.Handler == eventHandler);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:ClientEventManager.cs

示例5: MenuItem

		public MenuItem (IRawElementProviderSimple provider) : base (provider)
		{
			if (provider == null)
				throw new ArgumentNullException ("provider");

			if ((provider as IRawElementProviderFragment) == null)
				throw new ArgumentException ("Provider for ParentMenu should be IRawElementProviderFragment");

			textExpert = TextImplementorFactory.GetImplementor (this, provider);

			Role = Atk.Role.MenuItem;

			string name = (string) provider.GetPropertyValue (AutomationElementIdentifiers.NameProperty.Id);
			if (!String.IsNullOrEmpty (name))
				Name = name;

			invokeProvider = (IInvokeProvider)
				provider.GetPatternProvider (InvokePatternIdentifiers.Pattern.Id);
			toggleProvider = (IToggleProvider)
				provider.GetPatternProvider (TogglePatternIdentifiers.Pattern.Id);
			selectionItemProvider = (ISelectionItemProvider)
				provider.GetPatternProvider (SelectionItemPatternIdentifiers.Pattern.Id);
			expandCollapseProvider = (IExpandCollapseProvider)
				provider.GetPatternProvider (ExpandCollapsePatternIdentifiers.Pattern.Id);

			actionExpert.Add ("click", "click", null, DoClick);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:27,代码来源:MenuItem.cs

示例6: Slider

		public Slider (IRawElementProviderSimple provider) : base (provider)
		{
			Role = Atk.Role.Slider;
			rangeValueProvider = (IRangeValueProvider)provider.GetPatternProvider (RangeValuePatternIdentifiers.Pattern.Id);
			textExpert = TextImplementorFactory.GetImplementor (this, provider);
			oldText = textExpert.Text;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:Slider.cs

示例7: SimpleTreeItem

		public SimpleTreeItem (IRawElementProviderSimple provider) : base (provider)
		{
			actionExpert.Clear ();
			actionExpert.Add (EXPAND_OR_CONTRACT_ACTION_NAME,
			                  EXPAND_OR_CONTRACT_ACTION_NAME,
			                  EXPAND_OR_CONTRACT_ACTION_DESC,
			                  DoInvoke);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:SimpleTreeItem.cs

示例8: AddStructureChangedEventHandler

		public static void AddStructureChangedEventHandler (
			IRawElementProviderSimple provider, TreeScope scope,
			StructureChangedEventHandler eventHandler)
		{
			var entry = new StructureChangedEventEntry (provider, scope, eventHandler);
			lock (structureChangedEventEntries)
				structureChangedEventEntries.Add (entry);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:ClientEventManager.cs

示例9: AddAutomationEventHandler

		public static void AddAutomationEventHandler (AutomationEvent eventId,
			IRawElementProviderSimple provider, TreeScope scope,
			AutomationEventHandler eventHandler)
		{
			var entry = new AutomationEventEntry (eventId, provider, scope, eventHandler);
			lock (automationEventEntries)
				automationEventEntries.Add (entry);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:ClientEventManager.cs

示例10: RemoveAutomationEventHandler

		public static void RemoveAutomationEventHandler (AutomationEvent eventId, IRawElementProviderSimple provider, AutomationEventHandler eventHandler)
		{
			lock (automationEventEntries)
				automationEventEntries.RemoveAll (e =>
					e.EventId == eventId &&
					e.Provider == provider &&
					e.Handler == eventHandler);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:ClientEventManager.cs

示例11: ComboBoxDropDown

		public ComboBoxDropDown (IRawElementProviderSimple provider) : base (provider)
		{
			this.provider = provider as IRawElementProviderFragmentRoot;
			if (this.provider == null)
				throw new ArgumentException ("Provider should be IRawElementProviderFragmentRoot");
			
			expandCollapseProvider = (IExpandCollapseProvider)provider.GetPatternProvider (ExpandCollapsePatternIdentifiers.Pattern.Id);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:ComboBoxDropDown.cs

示例12: CheckBoxButton

		public CheckBoxButton (IRawElementProviderSimple provider) : base (provider)
		{
			toggleProvider = (IToggleProvider) provider.GetPatternProvider (TogglePatternIdentifiers.Pattern.Id);
			imageImplementor = new ImageImplementorHelper (this);
			if (toggleProvider == null)
				throw new ArgumentException ("The provider for CheckBox should implement the Toggle pattern");

			Role = Atk.Role.CheckBox;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:CheckBoxButton.cs

示例13: RangeFromChild

        public ITextRangeProvider RangeFromChild(IRawElementProviderSimple childElement)
        {
            if (!(childElement is ElementProxy)) 
            {
                throw new ArgumentException(SR.Get(SRID.TextProvider_InvalidChild, "childElement")); 
            } 

            return (ITextRangeProvider)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(RangeFromChild), childElement); 
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:9,代码来源:TextProviderWrapper.cs

示例14: TabPage

		public TabPage (IRawElementProviderSimple provider): base (provider)
		{
			Role = Atk.Role.PageTab;
			selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider (
			  SelectionItemPatternIdentifiers.Pattern.Id);
			if (selectionItemProvider == null)
				throw new ArgumentException (
				  "Provider for TabPage should implement ISelectionItemProvider");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:TabPage.cs

示例15: AddAutomationPropertyChangedEventHandler

		public static void AddAutomationPropertyChangedEventHandler (
			IRawElementProviderSimple provider, TreeScope scope,
			AutomationPropertyChangedEventHandler eventHandler,
			int [] properties)
		{
			var entry = new PropertyChangedEventEntry (provider, scope, properties, eventHandler);
			lock (propertyChangedEventEntries)
				propertyChangedEventEntries.Add (entry);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:ClientEventManager.cs


注:本文中的System.Windows.Automation.Provider.IRawElementProviderSimple类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。