本文整理汇总了C#中ScrollDirection.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# ScrollDirection.Equals方法的具体用法?C# ScrollDirection.Equals怎么用?C# ScrollDirection.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScrollDirection
的用法示例。
在下文中一共展示了ScrollDirection.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetermineValidPosition
//.........这里部分代码省略.........
try
{
priorPosition = pattern_getVerticalScrollPercent;
pattern_ScrollWithEvent(ScrollAmount.NoAmount, ScrollAmount.SmallDecrement, TIMEOUT, CheckType.Verification);
if (priorPosition != pattern_getVerticalScrollPercent)
{
_verticalSmallDecrement = _HUNDRED - pattern_getVerticalScrollPercent;
ArrayListAdd(array, pattern_getVerticalScrollPercent, false);
}
}
catch (TestErrorException)
{
}
// Get LargeDecrement from 100
pattern_SetScrollPercent(_NEGONE, _HUNDRED, null, CheckType.Verification);
try
{
priorPosition = pattern_getVerticalScrollPercent;
pattern_ScrollWithEvent(ScrollAmount.NoAmount, ScrollAmount.LargeDecrement, TIMEOUT, CheckType.Verification);
if (priorPosition != pattern_getVerticalScrollPercent)
{
_verticalLargeDecrement = _HUNDRED - pattern_getVerticalScrollPercent;
ArrayListAdd(array, pattern_getVerticalScrollPercent, false);
}
}
catch (TestErrorException)
{
}
break;
default:
throw new Exception("Unhandled argument");
}
// Now get x random elements between SmallDecrement and SmallIncrement
if (array.Count > 3)
{
array.Sort();
double min = (double)array[0];
double max = (double)array[array.Count - 1];
double loc = -1, loc2 = -1;
for (int i = 0; i < 5; i++)
{
loc = (double)Helpers.RandomValue(min, max);
if (direction.Equals(ScrollDirection.Horizontal))
{
// WCP: HorizontalScrollPercent = loc;
pattern_SetScrollPercent(loc, _NEGONE, null, CheckType.Verification);
if (_notifiedEvent.WaitOne(TIMEOUT, false))
loc = pattern_getHorizontalScrollPercent; //patternScroll may jump to near position
// Make sure we can duplicate this.
pattern_SetScrollPercent(loc, _NEGONE, null, CheckType.Verification);
if (_notifiedEvent.WaitOne(TIMEOUT, false))
loc2 = pattern_getHorizontalScrollPercent;
if (loc == loc2)
{
if (array.IndexOf(loc).Equals(-1))
{
System.Diagnostics.Trace.WriteLine("H:" + loc);
ArrayListAdd(array, loc, false);
}
}
}
else
{
// WCP: VerticalScrollPercent = loc;
_notifiedEvent.Reset();
pattern_SetScrollPercent(_NEGONE, loc, null, CheckType.Verification);
if (_notifiedEvent.WaitOne(TIMEOUT, false))
loc = pattern_getVerticalScrollPercent; //patternScroll may jump to near position
// Make sure we can duplicate this.
_notifiedEvent.Reset();
pattern_SetScrollPercent(_NEGONE, loc, null, CheckType.Verification);
if (_notifiedEvent.WaitOne(TIMEOUT, false))
loc2 = pattern_getVerticalScrollPercent; //patternScroll may jump to near position
if (loc == loc2)
if (array.IndexOf(loc).Equals(-1))
{
System.Diagnostics.Trace.WriteLine("V:" + loc);
ArrayListAdd(array, loc, false);
}
}
}
}
array.Sort();
foreach (object l in array)
{
Comment(" Found : " + l.ToString());
}
if (horzhandler != null)
Automation.RemoveAutomationPropertyChangedEventHandler(m_le, horzhandler);
if (verthandler != null)
Automation.RemoveAutomationPropertyChangedEventHandler(m_le, verthandler);
}