本文整理汇总了C#中ActionListener类的典型用法代码示例。如果您正苦于以下问题:C# ActionListener类的具体用法?C# ActionListener怎么用?C# ActionListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionListener类属于命名空间,在下文中一共展示了ActionListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ScrollBar
protected ScrollBar(AutomationElement automationElement, ActionListener actionListener, ScrollBarButtonAutomationIds automationIds)
: base(automationElement, actionListener)
{
this.automationIds = automationIds;
var finder = new AutomationElementFinder(automationElement);
primaryUIItemFactory = new PrimaryUIItemFactory(finder);
}
开发者ID:ritro,项目名称:White,代码行数:7,代码来源:ScrollBar.cs
示例2: GetToolTip
private ToolTip GetToolTip(UIItem uiItem, ActionListener actionListener)
{
mouse.Click(uiItem.Bounds.Center());
actionListener.ActionPerformed(Action.WindowMessage);
Thread.Sleep(CoreAppXmlConfiguration.Instance.TooltipWaitTime);
return ToolTip.GetFrom(uiItem.Bounds.Center());
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:7,代码来源:TooltipSafeMouse.cs
示例3: addActionListener
public void addActionListener(ActionListener actionListener)
{
lock (actionListeners)
{
actionListeners.Add(actionListener);
}
}
开发者ID:Jingtaolu,项目名称:pbpkkb1_for_linux,代码行数:7,代码来源:MSketchControl.cs
示例4: Create
private IUIItem Create(ContainerItemFactory containerItemFactory, SearchCriteria searchCriteria, ActionListener actionListener)
{
IUIItem item = containerItemFactory.Get(searchCriteria, actionListener);
if (item == null) return null;
windowItemsMap.Add(item.Location, searchCriteria);
return item;
}
开发者ID:EricBlack,项目名称:White,代码行数:7,代码来源:WindowSession.cs
示例5: UIItem
public UIItem(AutomationElement automationElement, ActionListener actionListener)
{
if (null == automationElement) throw new NullReferenceException();
this.automationElement = automationElement;
this.actionListener = actionListener;
factory = new PrimaryUIItemFactory(new AutomationElementFinder(automationElement));
}
开发者ID:huangzhichong,项目名称:White,代码行数:7,代码来源:UIItem.cs
示例6: ScrollBars
public ScrollBars(AutomationElement automationElement, ActionListener actionListener,
ScrollBarButtonAutomationIds hScrollBarButtonAutomationIds, ScrollBarButtonAutomationIds vScrollBarButtonAutomationIds) {
this.actionListener = actionListener;
this.hScrollBarButtonAutomationIds = hScrollBarButtonAutomationIds;
this.vScrollBarButtonAutomationIds = vScrollBarButtonAutomationIds;
finder = new AutomationElementFinder(automationElement);
}
开发者ID:EricBlack,项目名称:White,代码行数:7,代码来源:ScrollBars.cs
示例7: WaitTill
private static SuggestionList WaitTill(ActionListener actionListener, string failureMessage, Clock.Matched matched)
{
Clock.Do getSuggestionList = () => Find(actionListener);
Clock.Expired onExpiration = delegate { throw new UIActionException(failureMessage + Constants.BusyMessage); };
return
(SuggestionList) new Clock(CoreAppXmlConfiguration.Instance.SuggestionListTimeout).Perform(getSuggestionList, matched, onExpiration);
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:8,代码来源:SuggestionListView.cs
示例8: CreateBars
internal static IScrollBars CreateBars(AutomationElement parentElement, ActionListener listener)
{
var frameworkId = parentElement.Current.FrameworkId;
if (frameworkId == Constants.WPFFrameworkId)
return new WPFScrollBars(parentElement, listener);
if (frameworkId == Constants.SilverlightFrameworkId)
return new ScrollBars(parentElement, listener, new SilverlightHScrollBarButtonAutomationIds(), new SilverlightVScrollBarButtonAutomationIds());
return new ScrollBars(parentElement, listener, new DefaultScrollBarButtonAutomationIds(), new DefaultScrollBarButtonAutomationIds());
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:9,代码来源:ScrollerFactory.cs
示例9: Get
public virtual IUIItem Get(SearchCriteria searchCriteria, ActionListener uiItemActionListener)
{
IUIItem item = Find(searchCriteria);
if (item == null || item is UIItemContainer)
{
//Cannot create dynamic proxy for class which has methods using generics. Also its not required to intercept methods on UIItem containers
return item;
}
return UIItemProxyFactory.Create(item, uiItemActionListener);
}
开发者ID:EricBlack,项目名称:White,代码行数:10,代码来源:ContainerItemFactory.cs
示例10: Create
public virtual IUIItem Create(SearchCriteria searchCriteria, ActionListener actionListener)
{
if (searchCriteria.IsIndexed)
{
UIItemCollection collection = CreateAll(searchCriteria, actionListener);
return searchCriteria.IndexedItem(collection);
}
return dictionaryMappedItemFactory.Create(Finder.Descendant(searchCriteria.AutomationCondition), actionListener,
searchCriteria.CustomItemType);
}
开发者ID:ritro,项目名称:White,代码行数:10,代码来源:PrimaryUIItemFactory.cs
示例11: TableScrollBars
public TableScrollBars(AutomationElementFinder finder, ActionListener actionListener, TableVerticalScrollOffset tableVerticalScrollOffset)
{
AutomationElement verticalScrollElement = finder.Child(AutomationSearchCondition.ByControlType(ControlType.Pane).OfName(UIItemIdAppXmlConfiguration.Instance.TableVerticalScrollBar));
verticalScrollBar = (verticalScrollElement == null)
? (IVScrollBar) new NullVScrollBar()
: new TableVerticalScrollBar(verticalScrollElement, actionListener, tableVerticalScrollOffset);
AutomationElement horizontalScrollElement = finder.Child(AutomationSearchCondition.ByControlType(ControlType.Pane).OfName(UIItemIdAppXmlConfiguration.Instance.TableHorizontalScrollBar));
horizontalScrollBar = (horizontalScrollElement == null)
? (IHScrollBar) new NullHScrollBar()
: new TableHorizontalScrollBar(horizontalScrollElement, actionListener);
}
开发者ID:EricBlack,项目名称:White,代码行数:11,代码来源:TableScrollBars.cs
示例12: TryGetPopupMenu
private bool TryGetPopupMenu(AutomationSearchCondition[] searchConditions, ActionListener actionListener, out PopUpMenu popUpMenu)
{
var element = Retry.For(() => Finder.Child(searchConditions), CoreAppXmlConfiguration.Instance.PopupTimeout(), TimeSpan.FromMilliseconds(100));
if (element == null)
{
popUpMenu = null;
return false;
}
popUpMenu = new PopUpMenu(element, actionListener);
return true;
}
开发者ID:EricBlack,项目名称:White,代码行数:11,代码来源:PrimaryUIItemFactory.cs
示例13: WPFPopupMenu
public virtual PopUpMenu WPFPopupMenu(ActionListener actionListener)
{
var searchConditions = new[]
{
AutomationSearchCondition.ByControlType(ControlType.Window),
AutomationSearchCondition.ByControlType(ControlType.Menu)
};
PopUpMenu popUpMenu;
TryGetPopupMenu(searchConditions, actionListener, out popUpMenu);
return popUpMenu;
}
开发者ID:EricBlack,项目名称:White,代码行数:11,代码来源:PrimaryUIItemFactory.cs
示例14: WaitTill
private static SuggestionList WaitTill(ActionListener actionListener, string failureMessage, Predicate<SuggestionList> shouldRetry)
{
try
{
return Retry.For(() => Find(actionListener), shouldRetry, CoreAppXmlConfiguration.Instance.SuggestionListTimeout);
}
catch (Exception ex)
{
throw new UIActionException(failureMessage + Constants.BusyMessage, ex);
}
}
开发者ID:huangzhichong,项目名称:White,代码行数:11,代码来源:SuggestionListView.cs
示例15: Find
private static SuggestionList Find(ActionListener actionListener)
{
AutomationElement dropDown =
new AutomationElementFinder(AutomationElement.RootElement).Child(AutomationSearchCondition.ByClassName("Auto-Suggest Dropdown"));
if (dropDown == null) return null;
AutomationElement listViewElement =
new AutomationElementFinder(dropDown).Child(AutomationSearchCondition.ByControlType(ControlType.DataGrid));
if (listViewElement == null) return null;
return new ListView(listViewElement, actionListener);
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:11,代码来源:SuggestionListView.cs
示例16: DoubleClickOutsideToolTip
public virtual void DoubleClickOutsideToolTip(UIItem uiItem, ActionListener actionListener)
{
actionListener.ActionPerforming(uiItem);
ToolTip toolTip = GetToolTip(uiItem, actionListener);
if (toolTip == null)
mouse.DoubleClick(uiItem.Bounds.Center(), actionListener);
else
{
WhiteLogger.Instance.Debug("Found tooltip DoubleClicking outside tooltip bounds");
mouse.DoubleClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
}
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:12,代码来源:TooltipSafeMouse.cs
示例17: ItemsWithin
public virtual UIItemCollection ItemsWithin(Rect bounds, ActionListener actionListener)
{
var collection = new UIItemCollection();
List<AutomationElement> descendants = Finder.Descendants(AutomationSearchCondition.All);
foreach (AutomationElement automationElement in descendants)
{
if (!bounds.Contains(automationElement.Current.BoundingRectangle)) continue;
var factory = new DictionaryMappedItemFactory();
collection.Add(factory.Create(automationElement, actionListener));
}
return collection;
}
开发者ID:ritro,项目名称:White,代码行数:13,代码来源:PrimaryUIItemFactory.cs
示例18: RightClickOutsideToolTip
public virtual void RightClickOutsideToolTip(UIItem uiItem, ActionListener actionListener)
{
actionListener.ActionPerforming(uiItem);
ToolTip toolTip = GetToolTip(uiItem, actionListener);
if (toolTip == null)
{
//Because mouse has already been moved
mouse.RightClickHere(actionListener);
}
else
{
WhiteLogger.Instance.Debug("Found tooltip RightClicking outside tooltip bounds");
mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
}
}
开发者ID:hsteinhilber,项目名称:white-project,代码行数:15,代码来源:TooltipSafeMouse.cs
示例19: Awake
/*public Player owner {
get {
if(mFlockUnit != null) {
int index = Player.GroupToIndex(mFlockUnit.type);
if(index >= 0 && index < Player.playerCount) {
return Player.GetPlayer(index);
}
}
return null;
}
}*/
protected override void Awake()
{
base.Awake();
mFlockUnit = GetComponentInChildren<FlockUnit>();
mListener = GetComponentInChildren<ActionListener>();
if(mFlockUnit != null) {
mFlockUnit.groupMoveEnabled = false;
}
if(mListener != null) {
mListener.enterCallback += OnActionEnter;
mListener.hitEnterCallback += OnActionHitEnter;
mListener.hitExitCallback += OnActionHitExit;
mListener.finishCallback += OnActionFinish;
}
}
开发者ID:andi2,项目名称:ludum-dare-26,代码行数:30,代码来源:UnitEntity.cs
示例20: Get
public virtual IUIItem Get(ContainerItemFactory containerItemFactory, SearchCriteria searchCriteria, ActionListener actionListener)
{
logger.DebugFormat("Finding item based on criteria: ({0}) on ({1})", searchCriteria, initializeOption.Identifier);
Point location = windowItemsMap.GetItemLocation(searchCriteria);
if (location.Equals(RectX.UnlikelyWindowPosition))
{
logger.Debug("[PositionBasedSearch] Could not find based on position, finding using search.");
return Create(containerItemFactory, searchCriteria, actionListener);
}
AutomationElement automationElement = AutomationElementX.GetAutomationElementFromPoint(location);
if (automationElement != null && searchCriteria.AppliesTo(automationElement))
{
IUIItem item = new DictionaryMappedItemFactory().Create(automationElement, actionListener, searchCriteria.CustomItemType);
return UIItemProxyFactory.Create(item, actionListener);
}
logger.DebugFormat("[PositionBasedSearch] UIItem {0} changed its position, finding using search.", searchCriteria);
return Create(containerItemFactory, searchCriteria, actionListener);
}
开发者ID:EricBlack,项目名称:White,代码行数:20,代码来源:WindowSession.cs
注:本文中的ActionListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论