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


C# AccessibleNavigation类代码示例

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


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

示例1: Navigate

 public override AccessibleObject Navigate(AccessibleNavigation navdir)
 {
     if (((navdir == AccessibleNavigation.Up) || (navdir == AccessibleNavigation.Previous)) || ((navdir == AccessibleNavigation.Down) || (navdir == AccessibleNavigation.Next)))
     {
         DesignerNavigationDirection down = DesignerNavigationDirection.Down;
         if ((navdir == AccessibleNavigation.Up) || (navdir == AccessibleNavigation.Previous))
         {
             down = DesignerNavigationDirection.Up;
         }
         else
         {
             down = DesignerNavigationDirection.Down;
         }
         CompositeActivityDesigner parentDesigner = base.ActivityDesigner.ParentDesigner;
         if (parentDesigner != null)
         {
             object nextSelectableObject = parentDesigner.GetNextSelectableObject(base.ActivityDesigner.Activity, down);
             if (nextSelectableObject is ConnectorHitTestInfo)
             {
                 return this.GetChild(((ConnectorHitTestInfo) nextSelectableObject).MapToIndex());
             }
         }
     }
     return base.Navigate(navdir);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:SequenceDesignerAccessibleObject.cs

示例2: Navigate

 public override AccessibleObject Navigate(AccessibleNavigation navdir)
 {
     if ((navdir != AccessibleNavigation.FirstChild) && (navdir != AccessibleNavigation.LastChild))
     {
         return base.Navigate(navdir);
     }
     return this.GetChild(0);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:WorkflowViewAccessibleObject.cs

示例3: Navigate

        public override AccessibleObject Navigate(AccessibleNavigation navdir)
        {
            if (navdir == AccessibleNavigation.Up || navdir == AccessibleNavigation.Previous ||
                navdir == AccessibleNavigation.Down || navdir == AccessibleNavigation.Next)
            {
                DesignerNavigationDirection navigate = default(DesignerNavigationDirection);
                if (navdir == AccessibleNavigation.Up || navdir == AccessibleNavigation.Previous)
                    navigate = DesignerNavigationDirection.Up;
                else
                    navigate = DesignerNavigationDirection.Down;

                CompositeActivityDesigner compositeDesigner = this.ActivityDesigner.ParentDesigner;
                if (compositeDesigner != null)
                {
                    object nextSelectableObj = compositeDesigner.GetNextSelectableObject(this.ActivityDesigner.Activity, navigate);
                    if (nextSelectableObj is ConnectorHitTestInfo)
                        return GetChild(((ConnectorHitTestInfo)nextSelectableObj).MapToIndex());
                }
            }

            return base.Navigate(navdir);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:22,代码来源:SequenceDesignerAccessibleObject.cs

示例4: Navigate

 public override AccessibleObject Navigate(AccessibleNavigation navdir)
 {
     if (navdir == AccessibleNavigation.FirstChild)
     {
         return this.GetChild(0);
     }
     if (navdir == AccessibleNavigation.LastChild)
     {
         return this.GetChild(this.GetChildCount() - 1);
     }
     CompositeActivityDesigner parentDesigner = this.activityDesigner.ParentDesigner;
     if (parentDesigner != null)
     {
         DesignerNavigationDirection down = DesignerNavigationDirection.Down;
         if (navdir == AccessibleNavigation.Left)
         {
             down = DesignerNavigationDirection.Left;
         }
         else if (navdir == AccessibleNavigation.Right)
         {
             down = DesignerNavigationDirection.Right;
         }
         else if ((navdir == AccessibleNavigation.Up) || (navdir == AccessibleNavigation.Previous))
         {
             down = DesignerNavigationDirection.Up;
         }
         else if ((navdir == AccessibleNavigation.Down) || (navdir == AccessibleNavigation.Next))
         {
             down = DesignerNavigationDirection.Down;
         }
         System.Workflow.ComponentModel.Design.ActivityDesigner designer = System.Workflow.ComponentModel.Design.ActivityDesigner.GetDesigner(parentDesigner.GetNextSelectableObject(this.activityDesigner.Activity, down) as Activity);
         if (designer != null)
         {
             return designer.AccessibilityObject;
         }
     }
     return base.Navigate(navdir);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:38,代码来源:ActivityDesignerAccessibleObject.cs

示例5: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navdir) {
                switch (navdir) {
                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.FirstChild:
                    case AccessibleNavigation.LastChild:
                        // TreeNodes don't have children.
                        return null;

                    case AccessibleNavigation.Left:
                    case AccessibleNavigation.Previous:
                        if (Index == 0) {
                            return null;
                        }
                        return _node.TreeView.AccessibilityObject.GetChild(Index - 1);

                    case AccessibleNavigation.Next:
                    case AccessibleNavigation.Right:
                        int count = _node.TreeView.AccessibilityObject.GetChildCount();
                        if (Index == count - 1) {
                            return null;
                        }
                        return _node.TreeView.AccessibilityObject.GetChild(Index + 1);

                    case AccessibleNavigation.Up:
                        return Parent;

                    default:
                        System.Diagnostics.Debug.Assert(false, "What direction is this?");
                        return null;
                }
            }
开发者ID:wenh123,项目名称:PTVS,代码行数:31,代码来源:OptionsTreeView.cs

示例6: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navigationDirection)
            {
                if (this.Owner.OwningColumn == null)
                {
                    return null;
                }

                switch (navigationDirection)
                {
                    case AccessibleNavigation.Right:
                        if (this.Owner.DataGridView.RightToLeft == RightToLeft.No)
                        {
                            return NavigateForward();
                        }
                        else
                        {
                            return NavigateBackward();
                        }
                    case AccessibleNavigation.Next:
                        return NavigateForward();
                    case AccessibleNavigation.Left:
                        if (this.Owner.DataGridView.RightToLeft == RightToLeft.No)
                        {
                            return NavigateBackward();
                        }
                        else
                        {
                            return NavigateForward();
                        }
                    case AccessibleNavigation.Previous:
                        return NavigateBackward();
                    case AccessibleNavigation.FirstChild:
                        // return the top left header cell accessible object
                        return this.Owner.DataGridView.AccessibilityObject.GetChild(0).GetChild(0);
                    case AccessibleNavigation.LastChild:
                        // return the last column header cell in the top row header accessible object
                        AccessibleObject topRowHeaderAccessibleObject = this.Owner.DataGridView.AccessibilityObject.GetChild(0);
                        return topRowHeaderAccessibleObject.GetChild(topRowHeaderAccessibleObject.GetChildCount() - 1);
                    default:
                        return null;
                }
            }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:42,代码来源:DataGridViewColumnHeaderCell.cs

示例7: Navigate

			public override AccessibleObject Navigate (AccessibleNavigation navigationDirection) {
				switch (navigationDirection) {
					case AccessibleNavigation.Right:
						break;
					case AccessibleNavigation.Left:
						break;
					case AccessibleNavigation.Next:
						break;
					case AccessibleNavigation.Previous:
						break;
					case AccessibleNavigation.Up:
						break;
					case AccessibleNavigation.Down:
						break;
					default:
						return null;
				}
				return null;
			}
开发者ID:nlhepler,项目名称:mono,代码行数:19,代码来源:DataGridViewCell.cs

示例8: Navigate

		public virtual AccessibleObject Navigate(AccessibleNavigation navdir) {
			int	index;

			// I'm not throwing exceptions if an object doesn't exist in the specified direction
			// Might not be too helpful to a blind dude trying to navigate. Instead we return
			// our own object

			if (owner.Parent != null) {
				index = owner.Parent.Controls.IndexOf(owner);
			} else {
				index = -1;
			}

			switch (navdir) {
				// Spatial navigation; limited to siblings
				case AccessibleNavigation.Up: {
					if (owner.Parent != null) {
						for (int i=0; i<owner.Parent.Controls.Count; i++) {
							if ((owner != owner.Parent.Controls[i]) && (owner.Parent.Controls[i].Top<owner.Top)) {
								return owner.Parent.Controls[i].AccessibilityObject;
							}
						}
						
					}
					return owner.AccessibilityObject;
				}

				case AccessibleNavigation.Down: {
					if (owner.Parent != null) {
						for (int i=0; i<owner.Parent.Controls.Count; i++) {
							if ((owner != owner.Parent.Controls[i]) && (owner.Parent.Controls[i].Top>owner.Bottom)) {
								return owner.Parent.Controls[i].AccessibilityObject;
							}
						}
						
					}
					return owner.AccessibilityObject;
				}

				case AccessibleNavigation.Left: {
					if (owner.Parent != null) {
						for (int i=0; i<owner.Parent.Controls.Count; i++) {
							if ((owner != owner.Parent.Controls[i]) && (owner.Parent.Controls[i].Left<owner.Left)) {
								return owner.Parent.Controls[i].AccessibilityObject;
							}
						}
						
					}
					return owner.AccessibilityObject;
				}

				case AccessibleNavigation.Right: {
					if (owner.Parent != null) {
						for (int i=0; i<owner.Parent.Controls.Count; i++) {
							if ((owner != owner.Parent.Controls[i]) && (owner.Parent.Controls[i].Left>owner.Right)) {
								return owner.Parent.Controls[i].AccessibilityObject;
							}
						}
						
					}
					return owner.AccessibilityObject;
				}

				// Logical navigation
				case AccessibleNavigation.Next: {
					if (owner.Parent != null) {
						if ((index+1)<owner.Parent.Controls.Count) {
							return owner.Parent.Controls[index+1].AccessibilityObject;
						} else {
							return owner.Parent.Controls[0].AccessibilityObject;
						}
					} else {
						return owner.AccessibilityObject;
					}
				}

				case AccessibleNavigation.Previous: {
					if (owner.Parent != null) {
						if (index>0) {
							return owner.Parent.Controls[index-1].AccessibilityObject;
						} else {
							return owner.Parent.Controls[owner.Parent.Controls.Count-1].AccessibilityObject;
						}
					} else {
						return owner.AccessibilityObject;
					}
				}

				case AccessibleNavigation.FirstChild: {
					if (owner.Controls.Count>0) {
						return owner.Controls[0].AccessibilityObject;
					} else {
						return owner.AccessibilityObject;
					}
				}

				case AccessibleNavigation.LastChild: {
					if (owner.Controls.Count>0) {
						return owner.Controls[owner.Controls.Count-1].AccessibilityObject;
					} else {
//.........这里部分代码省略.........
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:101,代码来源:AccessibleObject.cs

示例9: Navigate

 public override AccessibleObject Navigate(AccessibleNavigation navigationDirection)
 {
     Debug.Assert(this.Owner.DataGridView.RowHeadersVisible, "if the row headers are not visible how did you get the top left header cell acc object?");
     switch (navigationDirection)
     {
         case AccessibleNavigation.Previous:
             return null;
         case AccessibleNavigation.Left:
             if (this.Owner.DataGridView.RightToLeft == RightToLeft.No)
             {
                 return null;
             }
             else
             {
                 return NavigateForward();
             }
         case AccessibleNavigation.Next:
             return NavigateForward();
         case AccessibleNavigation.Right:
             if (this.Owner.DataGridView.RightToLeft == RightToLeft.No)
             {
                 return NavigateForward();
             }
             else
             {
                 return null;
             }
         default:
             return null;
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:31,代码来源:DataGridViewTopLeftHeaderCell.cs

示例10: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navdir) {

                PropertyGridView.PropertyGridViewAccessibleObject parent =
                (PropertyGridView.PropertyGridViewAccessibleObject)Parent;

                switch (navdir) {
                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.Right:
                    case AccessibleNavigation.Next:
                        return parent.Next(this.owner);

                    case AccessibleNavigation.Up:
                    case AccessibleNavigation.Left:
                    case AccessibleNavigation.Previous:
                        return parent.Previous(this.owner);

                    case AccessibleNavigation.FirstChild:
                    case AccessibleNavigation.LastChild:
                        // Fall through and return null,
                        // as this object has no children.
                        break;
                }

                return null;

            }
开发者ID:JianwenSun,项目名称:cc,代码行数:26,代码来源:GridEntry.cs

示例11: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navdir) {

                if (GetChildCount() > 0) {
                    // We're only handling FirstChild and LastChild here
                    switch(navdir) {
                        case AccessibleNavigation.FirstChild:
                            return GetChild(0);
                        case AccessibleNavigation.LastChild:
                            return GetChild(GetChildCount() - 1);
                    }
                }
                return null;    // Perform default behavior
            }
开发者ID:mind0n,项目名称:hive,代码行数:13,代码来源:PropertyGridView.cs

示例12: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navdir)
            {
                System.Windows.Forms.PropertyGridInternal.PropertyGridView.PropertyGridViewAccessibleObject parent = (System.Windows.Forms.PropertyGridInternal.PropertyGridView.PropertyGridViewAccessibleObject) this.Parent;
                switch (navdir)
                {
                    case AccessibleNavigation.Up:
                    case AccessibleNavigation.Left:
                    case AccessibleNavigation.Previous:
                        return parent.Previous(this.owner);

                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.Right:
                    case AccessibleNavigation.Next:
                        return parent.Next(this.owner);
                }
                return null;
            }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:GridEntry.cs

示例13: Navigate

            public override AccessibleObject Navigate(AccessibleNavigation navdir)
            {
                if (navdir == AccessibleNavigation.Previous)
                {
                    int childCount = this.previewWindow.parentDesigner.AccessibilityObject.GetChildCount();
                    if ((childCount - 3) >= 0)
                        return this.previewWindow.parentDesigner.AccessibilityObject.GetChild(childCount - 3);
                }
                else if (navdir == AccessibleNavigation.Next)
                {
                    if (!this.previewWindow.PreviewMode)
                    {
                        int childCount = this.previewWindow.parentDesigner.AccessibilityObject.GetChildCount();
                        if ((childCount - 1) >= 0)
                            return this.previewWindow.parentDesigner.AccessibilityObject.GetChild(childCount - 1);
                    }
                    else
                    {
                        return this.previewWindow.parentDesigner.AccessibilityObject.Navigate(navdir);
                    }
                }

                return base.Navigate(navdir);
            }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:24,代码来源:DesignerWidgets.cs

示例14: Navigate

        public virtual AccessibleObject Navigate(AccessibleNavigation navdir)
        {
            if (this.GetChildCount() >= 0)
            {
                switch (navdir)
                {
                    case AccessibleNavigation.Up:
                    case AccessibleNavigation.Left:
                    case AccessibleNavigation.Previous:
                        if (this.Parent.GetChildCount() <= 0)
                        {
                            break;
                        }
                        return null;

                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.Right:
                    case AccessibleNavigation.Next:
                        if (this.Parent.GetChildCount() <= 0)
                        {
                            break;
                        }
                        return null;

                    case AccessibleNavigation.FirstChild:
                        return this.GetChild(0);

                    case AccessibleNavigation.LastChild:
                        return this.GetChild(this.GetChildCount() - 1);
                }
            }
            if (this.systemIAccessible != null)
            {
                try
                {
                    object retObject = null;
                    if (!this.SysNavigate((int) navdir, 0, out retObject))
                    {
                        retObject = this.systemIAccessible.accNavigate((int) navdir, 0);
                    }
                    return this.WrapIAccessible(retObject);
                }
                catch (COMException exception)
                {
                    if (exception.ErrorCode != -2147352573)
                    {
                        throw exception;
                    }
                }
            }
            return null;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:52,代码来源:AccessibleObject.cs

示例15: GetSysChild

 internal virtual bool GetSysChild(AccessibleNavigation navdir, out AccessibleObject accessibleObject)
 {
     accessibleObject = null;
     return false;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:AccessibleObject.cs


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