public static void UI_ConsoleToggle() { IUIItem i = Stack.Peek(); if (i.GetType() == typeof(Console)) { UIManager.Close(); } else { Open(Console); } }
public virtual void Intercept(IInvocation invocation) { if (uiItem == null) { uiItem = window.Get(searchCriteria); if (uiItem == null) { throw new UIItemSearchException("Could not find UIItem with, " + searchCriteria); } } try { invocation.ReturnValue = invocation.Method.Invoke(uiItem, invocation.Arguments); } catch (Exception e) { sessionReport.Act(); throw new WhiteException(string.Format("Error Invoking {0}.{1}", uiItem.GetType().Name, invocation.Method.Name), e.InnerException); } }
public static IUIItem Create(IUIItem item, ActionListener actionListener) { return (IUIItem) DynamicProxyGenerator.Instance.CreateProxy(new CoreInterceptor(item, actionListener), item.GetType()); }
public static IUIItem Create(IUIItem item, ActionListener actionListener) { return((IUIItem)DynamicProxyGenerator.Instance.CreateProxy(item.GetType(), new CoreInterceptor(item, actionListener))); }