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

C# Automation.AutomationProperty类代码示例

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

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



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

示例1: WindowPatternIdentifiers

		static WindowPatternIdentifiers ()
		{
			Pattern =
				new AutomationPattern (PatternId,
				                       "WindowPatternIdentifiers.Pattern");
			CanMaximizeProperty =
				new AutomationProperty (CanMaximizePropertyId,
				                        "WindowPatternIdentifiers.CanMaximizeProperty");
			CanMinimizeProperty =
				new AutomationProperty (CanMinimizePropertyId,
				                        "WindowPatternIdentifiers.CanMinimizeProperty");
			IsModalProperty =
				new AutomationProperty (IsModalPropertyId,
				                        "WindowPatternIdentifiers.IsModalProperty");
			IsTopmostProperty =
				new AutomationProperty (IsTopmostPropertyId,
				                        "WindowPatternIdentifiers.IsTopmostProperty");
			WindowInteractionStateProperty =
				new AutomationProperty (WindowInteractionStatePropertyId,
				                        "WindowPatternIdentifiers.WindowInteractionStateProperty");
			WindowVisualStateProperty =
				new AutomationProperty (WindowVisualStatePropertyId,
				                        "WindowPatternIdentifiers.WindowVisualStateProperty");
			WindowClosedEvent =
				new AutomationEvent (WindowClosedEventId,
				                     "WindowPatternIdentifiers.WindowClosedProperty");
			WindowOpenedEvent =
				new AutomationEvent (WindowOpenedEventId,
				                     "WindowPatternIdentifiers.WindowOpenedProperty");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:30,代码来源:WindowPatternIdentifiers.cs


示例2: FindDescendantsBy

 public static IEnumerable<AutomationElement> FindDescendantsBy(this AutomationElement ae, AutomationProperty property, object value)
 {
     return ae.FindAll(
     TreeScope.Descendants,
     new PropertyCondition(property, value))
     .Cast<AutomationElement>();
 }
开发者ID:softek,项目名称:WinUIScraper,代码行数:7,代码来源:AutomationExtensions.cs


示例3: GetAllChildNodes

 public AutomationElementCollection GetAllChildNodes(AutomationElement element, AutomationProperty automationProperty, object value, TreeScope treeScope)
 {
     var allChildNodes = element.FindAll(treeScope, GetPropertyCondition(automationProperty, value));
     if (allChildNodes == null)
         throw new ElementNotAvailableException("Not able to find the child nodes of the element");
     return allChildNodes;
 }
开发者ID:prasannarhegde2015,项目名称:MySQLBackupCsharpScript,代码行数:7,代码来源:SampleUIAAutoamtion.cs


示例4: GetElementProperty

        // Process all the Element Properties
        internal override object GetElementProperty(AutomationProperty idProp)
        {
            if (idProp == AutomationElement.IsOffscreenProperty)
            {
                Rect parentRect = GetParent().BoundingRectangle;
                NativeMethods.Win32Rect itemRect = ListViewCheckBoxRect(_hwnd, _listviewItem);
                if (itemRect.IsEmpty || parentRect.IsEmpty)
                {
                    return true;
                }

                if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect))
                {
                    return true;
                }
            }
            // EventManager.DispatchEvent() genericaly uses GetElementProperty()
            // to get properties during a property change event.  Proccess ToggleStateProperty
            // so the ToggleStateProperty Change Event can get the correct state.
            else if (idProp == TogglePattern.ToggleStateProperty)
            {
                return ((IToggleProvider)this).ToggleState;
            }

            return base.GetElementProperty(idProp);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:27,代码来源:WindowsListViewItemCheckBox.cs


示例5: RaisePropertyChangedEvent

		public void RaisePropertyChangedEvent (AutomationPeer peer, 
		                                       AutomationProperty property, 
		                                       object oldValue, 
						       object newValue)
		{
			if (!AccessibilityEnabled || peer == null)
				return;

			if (object.Equals (newValue, oldValue))
				return;

			// We are going to raise changes only when the value ACTUALLY CHANGES
			IAutomationCacheProperty cachedProperty = peer.GetCachedProperty (property);
			if (cachedProperty != null) {
				if (object.Equals (newValue, cachedProperty.OldValue))
					return;
				cachedProperty.OldValue = newValue;
			}

			if (AutomationPropertyChanged != null)
				AutomationPropertyChanged (this, 
				                           new AutomationPropertyChangedEventArgs (peer, 
							                                           property, 
												   oldValue, 
												   newValue));
		}
开发者ID:dfr0,项目名称:moon,代码行数:26,代码来源:AutomationSingleton.cs


示例6: GridItemPatternIdentifiers

		static GridItemPatternIdentifiers ()
		{
			Pattern =
				new AutomationPattern (PatternId,
						"GridItemPatternIdentifiers.Pattern");

			RowProperty =
				new AutomationProperty (RowPropertyId,
						"GridItemPatternIdentifiers.RowProperty");

			ColumnProperty =
				new AutomationProperty (ColumnPropertyId,
						"GridItemPatternIdentifiers.ColumnProperty");

			RowSpanProperty =
				new AutomationProperty (RowSpanPropertyId,
						"GridItemPatternIdentifiers.RowSpanProperty");

			ColumnSpanProperty =
				new AutomationProperty (ColumnSpanPropertyId,
						"GridItemPatternIdentifiers.ColumnSpanProperty");

			ContainingGridProperty =
				new AutomationProperty (ContainingGridPropertyId,
						"GridItemPatternIdentifiers.ContainingGridProperty");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:26,代码来源:GridItemPatternIdentifiers.cs


示例7: AdviseEventAdded

        //------------------------------------------------------
        //
        //  Patterns Implementation
        //
        //------------------------------------------------------

        #region ProxyHwnd Methods

        // ------------------------------------------------------
        //
        // Internal Methods
        //
        // ------------------------------------------------------

        // Advises proxy that an event has been added.
        // Maps the Automation Events into WinEvents and add those to the list of WinEvents notification hooks
        internal virtual void AdviseEventAdded (AutomationEvent eventId, AutomationProperty [] aidProps)
        {
            // No RawElementBase creation callback, exit from here
            if (_createOnEvent == null)
            {
                return;
            }

            int cEvents = 0;
            WinEventTracker.EvtIdProperty [] aEvents;

            // Gets an Array of WinEvents to trap on a per window handle basis
            if (eventId == AutomationElement.AutomationPropertyChangedEvent)
            {
                aEvents = PropertyToWinEvent (aidProps, out cEvents);
            }
            else
            {
                aEvents = EventToWinEvent (eventId, out cEvents);
            }

            // If we have WinEvents to trap, add those to the list of WinEvent
            // notification list
            if (cEvents > 0)
            {
                WinEventTracker.AddToNotificationList (_hwnd, _createOnEvent, aEvents, cEvents);
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:44,代码来源:ProxyHwnd.cs


示例8: AutomationPropertyChangedEventArgs

		public AutomationPropertyChangedEventArgs (AutomationProperty property, object oldValue, object newValue) :
            base (AutomationElementIdentifiers.AutomationPropertyChangedEvent)
		{
			Property = property;
			OldValue = oldValue;
			NewValue = newValue;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:AutomationPropertyChangedEventArgs.cs


示例9: BaseAutomationPropertyEvent

		protected BaseAutomationPropertyEvent (SimpleControlProvider provider,
		                                       AutomationProperty property)
			: base (provider)
		{
			this.property = property;
			OldValue = Provider.GetPropertyValue (Property.Id);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:BaseAutomationPropertyEvent.cs


示例10: CreateConditionPathForPropertyValues

        public static IEnumerable<Condition> CreateConditionPathForPropertyValues(AutomationProperty property, 
            IEnumerable<object> values)
        {
            IEnumerable<PropertyCondition> conditions = values.Select(value => new PropertyCondition(property, value));

            return conditions.Cast<Condition>();
        }
开发者ID:GraemeF,项目名称:Fluid,代码行数:7,代码来源:AutomationExtensions.cs


示例11: ClickTabItem

 public static void ClickTabItem(this TestBase @this, AutomationProperty searchBy, object value, AutomationElement retrievedControl = null)
 {
     Dictionary<AutomationProperty, object> searchCretia = new Dictionary<AutomationProperty, object>();
     searchCretia.Add(SearchBy.ByControlType, ControlType.TabItem);
     searchCretia.Add(searchBy, value);
     var target = @this.App.FindDescendant(searchCretia, retrievedControl);
     ControlProvider.Transfer<AETabItem>(target).Select();
 }
开发者ID:Gnail-nehc,项目名称:Black,代码行数:8,代码来源:CommonAction.cs


示例12: SupportsProperty

		public bool SupportsProperty (AutomationProperty property)
		{
			try {
				return dbusElement.SupportsProperty (property.Id);
			} catch (Exception ex) {
					throw DbusExceptionTranslator.Translate (ex);
			}
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:UiaDbusElement.cs


示例13: GetPropertyValue

 public object GetPropertyValue(AutomationProperty property)
 {
     if (TestOfMoreThanTwoPatternPropertiesPattern.Standalone1Property.Equals(property))
         return 42;
     if (TestOfMoreThanTwoPatternPropertiesPattern.NullStringStandaloneProperty.Equals(property))
         return null;
     return null;
 }
开发者ID:TestStack,项目名称:uia-custom-pattern-managed,代码行数:8,代码来源:TestControlAutomationPeer.cs


示例14: TogglePatternIdentifiers

		static TogglePatternIdentifiers ()
		{
			Pattern =
				new AutomationPattern (PatternId,
				                       "TogglePatternIdentifiers.Pattern");
			ToggleStateProperty =
				new AutomationProperty (ToggleStatePropertyId,
				                        "TogglePatternIdentifiers.ToggleStateProperty");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:TogglePatternIdentifiers.cs


示例15:

 // threadsafe
 private object this[AutomationProperty property] {
 	get {
 		return STAHelper.Invoke(
 			delegate() {
 		    	return element.GetCurrentPropertyValue(property);
 			}
 		);
 	}
 }
开发者ID:kevtham,项目名称:twin,代码行数:10,代码来源:Element.cs


示例16: DockPatternIdentifiers

		static DockPatternIdentifiers ()
		{
			Pattern =
				new AutomationPattern (PatternId,
				                       "DockPatternIdentifiers.Pattern");
			DockPositionProperty = 
				new AutomationProperty (DockPositionPropertyId,
				                        "DockPatternIdentifiers.DockPositionProperty");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:DockPatternIdentifiers.cs


示例17: GetElementProperty

        //------------------------------------------------------
        //
        //  Patterns Implementation
        //
        //------------------------------------------------------

        #region ProxySimple Interface

        // Process all the Logical and Raw Element Properties
        internal override object GetElementProperty (AutomationProperty idProp)
        {
            if (idProp == AutomationElement.IsControlElementProperty)
            {
                return false;
            }

            return base.GetElementProperty (idProp);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:18,代码来源:WindowsNonControl.cs


示例18: AutomationPatternInfo

        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------
 
        #region Constructors

        public AutomationPatternInfo( 
            AutomationPattern id,
            AutomationProperty [ ] properties,
            WrapObjectClientSide clientSideWrapper )
        {
            _id = id;
            _properties = properties;
            _clientSideWrapper = clientSideWrapper;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:17,代码来源:AutomationPatternInfo.cs


示例19: Add

 public void Add(AutomationProperty property)
 {
     Utility.ValidateArgumentNonNull(property, "property");
     lock (this._lock)
     {
         this.CheckAccess();
         this._obj.AddProperty(property.Id);
     }
 }
开发者ID:apetrovskiy,项目名称:STUPS,代码行数:9,代码来源:CacheRequest.cs


示例20: ExpandCollapsePatternIdentifiers

		static ExpandCollapsePatternIdentifiers ()
		{
			Pattern =
				new AutomationPattern (PatternId,
				                       "ExpandCollapsePatternIdentifiers.Pattern");
			
			ExpandCollapseStateProperty =
				new AutomationProperty (ExpandCollapseStatePropertyId, 
			                        "ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty");
		}
开发者ID:mono,项目名称:uia2atk,代码行数:10,代码来源:ExpandCollapsePatternIdentifiers.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Automation.CacheRequest类代码示例发布时间:2022-05-26
下一篇:
C# Automation.AutomationPattern类代码示例发布时间: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