• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Provider.IRawElementProviderSimple类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Hyperlink

		public Hyperlink (IRawElementProviderSimple provider) : base (provider)
		{
			invokeProvider = (IInvokeProvider)provider.GetPatternProvider (InvokePatternIdentifiers.Pattern.Id);
			hypertext = (IHypertext)invokeProvider;
			links = new List<HyperlinkObject> ();
			Role = Atk.Role.Label;
			
			textExpert = TextImplementorFactory.GetImplementor (this, provider);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:Hyperlink.cs


示例17: Image

		public Image (IRawElementProviderSimple provider) : base (provider)
		{		
			// Perhaps we should use Atk.Role.Image instead,
			// but gail uses Atk.Role.Icon
			// If we decide to use Image instead, we may need to
			// separate BalloonWindow handling, since it should
			// have Atk.Role.Icon.
			Role = Atk.Role.Icon;
			
			imageImplementor = new ImageImplementorHelper (this);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:11,代码来源:Image.cs


示例18: Container

		public Container (IRawElementProviderSimple provider): base (provider)
		{
			int controlTypeId = (int) Provider.GetPropertyValue (
			  AutomationElementIdentifiers.ControlTypeProperty.Id);
			
			if (controlTypeId == ControlType.Group.Id ||
			         controlTypeId == ControlType.Pane.Id)
				Role = Atk.Role.Panel;
			else
				Role = Atk.Role.Filler;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:11,代码来源:Container.cs


示例19: HeaderItem

		public HeaderItem (IRawElementProviderSimple provider) : base (provider)
		{
			Role = Atk.Role.TableColumnHeader;

			invokeProvider = (IInvokeProvider) provider.GetPatternProvider (InvokePatternIdentifiers.Pattern.Id);		
			imageExpert = new ImageImplementorHelper (this); 

			actionExpert = new ActionImplementorHelper ();
			if (invokeProvider != null)
				actionExpert.Add ("click", "click", null, DoClick);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:11,代码来源:HeaderItem.cs


示例20: Spinner

		public Spinner (IRawElementProviderSimple provider) : base (provider)
		{
			Role = Atk.Role.SpinButton;
			rangeValueProvider = (IRangeValueProvider)provider.GetPatternProvider (RangeValuePatternIdentifiers.Pattern.Id);
			
			editableRange
				= provider.GetPatternProvider (EditableRangePatternIdentifiers.Pattern.Id) as IEditableRangeProvider;

			valueProvider = (IValueProvider)provider.GetPatternProvider (ValuePatternIdentifiers.Pattern.Id);
			textExpert = TextImplementorFactory.GetImplementor (this, provider);
			oldText = textExpert.Text;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:12,代码来源:Spinner.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Baml2006.WpfKnownMember类代码示例发布时间:2022-05-26
下一篇:
C# Peers.AutomationPeer类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap