本文整理汇总了C#中Screen.Exists方法的典型用法代码示例。如果您正苦于以下问题:C# Screen.Exists方法的具体用法?C# Screen.Exists怎么用?C# Screen.Exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Screen
的用法示例。
在下文中一共展示了Screen.Exists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Exists
public bool Exists(string pattern_path, Point offset, double similar = 0.5, int timeout = 15)
{
Pattern pattern = new Pattern(pattern_path, offset, similar);
Screen scrn = new Screen();
try
{
return scrn.Exists(pattern, timeout);
}
catch
{
return false;
}
}
示例2: DroppedImageIsPresent
/// <summary>
/// This Method performs Image verification by Sikuli4net (Asserts that Image of Chosen Element Exists on Workfield)
/// </summary>
/// <param name="scrollElement">Scroll Element class</param>
public void DroppedImageIsPresent(ScrollElement scrollElement)
{
Pattern pattern_Element = new Pattern(Configuration.PathToImgs() + scrollElement.GetImageDropPatern());
Screen scrn = new Screen();
Assert.IsTrue(scrn.Exists(pattern_Element));
}