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


C# Atk.RefAccessibleChild方法代码示例

本文整理汇总了C#中Atk.RefAccessibleChild方法的典型用法代码示例。如果您正苦于以下问题:C# Atk.RefAccessibleChild方法的具体用法?C# Atk.RefAccessibleChild怎么用?C# Atk.RefAccessibleChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Atk的用法示例。


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

示例1: TestInnerTextBoxInComboBox

		protected void TestInnerTextBoxInComboBox (Atk.Object accessible)
		{
			Atk.Object entryChild = accessible.RefAccessibleChild (1);
			Assert.IsNotNull (entryChild, "ComboBox child#1 should not be null");
			Assert.AreEqual (entryChild.Role, Atk.Role.Text, "Role of 2nd child");
			Assert.IsNull (entryChild.Name, "textbox .Name should be null");
			//TODO: send this object to TextBoxEntry () test
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:AtkTests.cs

示例2: GetAccessibleChildren

 IEnumerable<Atk.Object> GetAccessibleChildren(Atk.Object obj)
 {
     var count = obj.NAccessibleChildren;
     for (int i = 0; i < count; i++) {
         var child = obj.RefAccessibleChild (i);
         yield return child;
         foreach (var c in GetAccessibleChildren (child))
             yield return c;
     }
 }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:AutoTestSession.cs

示例3: HSplitter

		public void HSplitter (Atk.Object accessible)
		{
			BasicWidgetType type = BasicWidgetType.HSplitContainer;
			Atk.IComponent atkComponent = CastToAtkInterface <Atk.IComponent> (accessible);
			InterfaceComponent (type, atkComponent);
			
			PropertyRole (type, accessible);
			Parent (type, accessible);

			States (accessible,
			  Atk.StateType.Enabled,
			Atk.StateType.Focusable,
			  Atk.StateType.Horizontal,
			  Atk.StateType.Sensitive,
			  Atk.StateType.Showing,
			  Atk.StateType.Visible);

			Assert.AreEqual (2, accessible.NAccessibleChildren, "HSplitter NAccessibleChildren");

			Atk.Object child1 = accessible.RefAccessibleChild (0);
			Atk.Object child2 = accessible.RefAccessibleChild (1);
			Atk.IValue atkValue = CastToAtkInterface<Atk.IValue> (accessible);
			Atk.IComponent component1 = CastToAtkInterface<Atk.IComponent> (child1);
			Atk.IComponent component2 = CastToAtkInterface<Atk.IComponent> (child2);
			RunInGuiThread (delegate () {
				int x1, x2, y1, y2, w1, w2, h1, h2;
				component1.GetExtents (out x1, out y1, out w1, out h1, Atk.CoordType.Window);
				component2.GetExtents (out x2, out y2, out w2, out h2, Atk.CoordType.Window);
				Atk.IComponent rightComponent = (x2 > x1? component2: component1);
				double minVal = GetMinimumValue (atkValue);
				double maxVal = GetMaximumValue (atkValue);
				SetCurrentValue (atkValue, minVal);
				rightComponent.GetExtents (out x1, out y1, out w1, out h1, Atk.CoordType.Window);
				StartEventMonitor ();
				SetCurrentValue (atkValue, minVal + (maxVal - minVal) / 2);
				System.Threading.Thread.Sleep (1000);
				ExpectEvents (1, Atk.Role.SplitPane, "object:property-change:accessible-value");
				double midVal = GetCurrentValue (atkValue);
				Assert.IsTrue (midVal > minVal && midVal < maxVal, "Mid value should be between min and max");
				rightComponent.GetExtents (out x2, out y2, out w2, out h2, Atk.CoordType.Window);

				Assert.IsTrue (x2 > x1, "Right control moved");
				Assert.AreEqual (y2, y1, "y should not change");
				Assert.IsTrue (w2 < w1, "Right control width decreased");
				Assert.AreEqual (h2, h1, "Height should not change");
			});
		}
开发者ID:mono,项目名称:uia2atk,代码行数:47,代码来源:AtkTests.cs


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