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


C# AutomationProxies.ProxySimple类代码示例

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


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

示例1: HandleExpandCollapseStateProperty

 private static void HandleExpandCollapseStateProperty(ProxySimple el, IntPtr hwnd, int eventId)
 {
     IExpandCollapseProvider expandCollapse = el.GetPatternProvider(ExpandCollapsePattern.Pattern) as IExpandCollapseProvider;
     if (expandCollapse == null)
         return;
     
     RaisePropertyChangedEvent(el, ExpandCollapsePattern.ExpandCollapseStateProperty, expandCollapse.ExpandCollapseState);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例2: PreviousSibling

            // Returns the previous sibling element in the raw hierarchy.
            // Peripheral controls have always negative values.
            // Returns null is no previous.
            private ProxySimple PreviousSibling (ProxySimple child)
            {
                IntPtr hPrev = WindowsTreeView.GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem);

                return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null;
            }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:9,代码来源:WindowsTreeView.cs

示例3: GetPreviousSibling

        // Returns the previous sibling element in the raw hierarchy.
        // Peripheral controls have always negative values.
        // Returns null is no previous
        internal override ProxySimple GetPreviousSibling (ProxySimple child)
        {
            // start with the scrollbars
            ProxySimple ret = base.GetPreviousSibling (child);

            if (ret != null)
            {
                return ret;
            }

            // top level Treeview return the prev
            TVItem item = (TVItem)child._item;

            if (item == TVItem.TopLevel)
            {
                IntPtr hPrev = GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem);

                return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null;
            }

            // either scroll bar or nothing as prev
            IntPtr hChild = GetRoot (_hwnd);

            if (hChild != IntPtr.Zero)
            {
                // First Child found, now retrieve the last one (no specific msg, need to walk thru all of them)
                IntPtr temp;

                for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild))
                {
                    hChild = temp;
                }

                return new TreeViewItem (_hwnd, this, hChild, (int) TVItem.TopLevel);
            }

            return null;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:41,代码来源:WindowsTreeView.cs

示例4: GetPreviousSibling

 // Returns the previous sibling element in the raw hierarchy.
 // Peripheral controls have always negative values.
 // Returns null is no previous.
 internal override ProxySimple GetPreviousSibling(ProxySimple child)
 {
     return _elUpDown.GetPreviousSibling(child);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:7,代码来源:WindowsSpinner.cs

示例5: Compare

        // Compares 2 raw elements and returns true if equal, false otherwise
        internal static bool Compare(ProxySimple el1, ProxySimple el2)
        {
            int[] a1 = el1.GetRuntimeId();
            int[] a2 = el2.GetRuntimeId();
            int l = a1.Length;

            if (l != a2.Length)
                return false;

            for (int i = 0; i < l; i++)
            {
                if (a1[i] != a2[i])
                {
                    return false;
                }
            }

            return true;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:20,代码来源:Misc.cs

示例6: GetPreviousSibling

 // Returns the previous sibling element in the raw hierarchy.
 // Peripheral controls have always negative values.
 // Returns null is no previous
 internal override ProxySimple GetPreviousSibling (ProxySimple child)
 {
     // If the index of the previous node would be out of range...
     int item = child._item;
     if (item > 0 && item < Count)
     {
         return CreateRebarItem (item - 1);
     }
     return null;
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:13,代码来源:WindowsRebar.cs

示例7: HandleToggleStateProperty

        private static void HandleToggleStateProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IToggleProvider toggle = el.GetPatternProvider(TogglePattern.Pattern) as IToggleProvider;
            if (toggle == null)
                return;

            RaisePropertyChangedEvent(el, TogglePattern.ToggleStateProperty, toggle.ToggleState);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例8: HandleScrollInvokedEvent

        private static void HandleScrollInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IInvokeProvider invoke = el.GetPatternProvider(InvokePattern.Pattern) as IInvokeProvider;
            if (invoke == null)
                return;

            if (eventId == NativeMethods.EventObjectStateChange)
            {
                AutomationInteropProvider.RaiseAutomationEvent(InvokePattern.InvokedEvent, el, new AutomationEventArgs(InvokePattern.InvokedEvent));
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:EventManager.cs

示例9: HandleIsSelectionRequiredProperty

        private static void HandleIsSelectionRequiredProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            ISelectionProvider selection = el.GetPatternProvider(SelectionPattern.Pattern) as ISelectionProvider;
            if (selection == null)
                return;

            RaisePropertyChangedEvent(el, SelectionPattern.IsSelectionRequiredProperty, selection.IsSelectionRequired);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例10: HandleVerticalViewSizeProperty

        private static void HandleVerticalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IScrollProvider scroll = el.GetPatternProvider(ScrollPattern.Pattern) as IScrollProvider;
            if (scroll == null)
                return;

            RaisePropertyChangedEvent(el, ScrollPattern.VerticalViewSizeProperty, scroll.VerticalViewSize);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例11: HandleRowHeadersProperty

        private static void HandleRowHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            ITableProvider table = el.GetPatternProvider(TablePattern.Pattern) as ITableProvider;
            if (table == null)
                return;

            RaisePropertyChangedEvent(el, TablePattern.RowHeadersProperty, table.GetRowHeaders());
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例12: HandleRowProperty

        private static void HandleRowProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IGridItemProvider gridItem = el.GetPatternProvider(GridItemPattern.Pattern) as IGridItemProvider;
            if (gridItem == null)
                return;

            RaisePropertyChangedEvent(el, GridItemPattern.RowProperty, gridItem.Row);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例13: HandleColumnCountProperty

        private static void HandleColumnCountProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IGridProvider grid = el.GetPatternProvider(GridPattern.Pattern) as IGridProvider;
            if (grid == null)
                return;

            RaisePropertyChangedEvent(el, GridPattern.ColumnCountProperty, grid.ColumnCount);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:EventManager.cs

示例14: HandleTextSelectionChangedEvent

        private static void HandleTextSelectionChangedEvent(ProxySimple el, IntPtr hwnd, int eventId)
        {
            ITextProvider textProvider = el.GetPatternProvider(TextPattern.Pattern) as ITextProvider;
            if (textProvider == null)
                return;

            if (eventId == NativeMethods.EventObjectLocationChange)
            {
                // We do not want to raise the EventObjectLocationChange when it is caused by a scroll.  To do this
                // store the previous range and compare it to the current range.  The range will not change when scrolling.
                ITextRangeProvider[] currentRanges = textProvider.GetSelection();
                ITextRangeProvider currentRange = null;
                if (currentRanges != null && currentRanges.Length > 0)
                    currentRange = currentRanges[0];

                if (hwnd == _hwndLast && currentRange != null)
                {
                    if (_lastSelection != null && !currentRange.Compare(_lastSelection))
                    {
                        AutomationInteropProvider.RaiseAutomationEvent(TextPattern.TextSelectionChangedEvent, el, new AutomationEventArgs(TextPattern.TextSelectionChangedEvent));
                    }
                }
                else
                {
                    AutomationInteropProvider.RaiseAutomationEvent(TextPattern.TextSelectionChangedEvent, el, new AutomationEventArgs(TextPattern.TextSelectionChangedEvent));
                }

                //store the current range and window handle.
                _hwndLast = hwnd;
                _lastSelection = currentRange;
            }
            else if (eventId == NativeMethods.EventObjectTextSelectionChanged)
            {
                AutomationInteropProvider.RaiseAutomationEvent(
                    TextPattern.TextSelectionChangedEvent, el,
                    new AutomationEventArgs(TextPattern.TextSelectionChangedEvent));
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:38,代码来源:EventManager.cs

示例15: HandleWindowInvokedEvent

        private static void HandleWindowInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId)
        {
            IInvokeProvider invoke = el.GetPatternProvider(InvokePattern.Pattern) as IInvokeProvider;
            if (invoke == null)
                return;

            if (eventId == NativeMethods.EventSystemCaptureEnd )
            {
                AutomationInteropProvider.RaiseAutomationEvent(InvokePattern.InvokedEvent, el, new AutomationEventArgs(InvokePattern.InvokedEvent));
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:EventManager.cs


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