예제 #1
0
    public static void UI_ConsoleToggle()
    {
        IUIItem i = Stack.Peek();

        if (i.GetType() == typeof(Console))
        {
            UIManager.Close();
        }
        else
        {
            Open(Console);
        }
    }
예제 #2
0
 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());
 }
예제 #4
0
 public static IUIItem Create(IUIItem item, ActionListener actionListener)
 {
     return((IUIItem)DynamicProxyGenerator.Instance.CreateProxy(item.GetType(), new CoreInterceptor(item, actionListener)));
 }