Esempio n. 1
0
 public int MaximizeWindow(String windowName)
 {
     if (String.IsNullOrEmpty(windowName))
     {
         String[] windowList = null;
         Generic  generic    = new Generic(this.utils);
         try
         {
             windowList = generic.GetWindowList();
             foreach (String window in windowList)
             {
                 ArrayList menuList = new ArrayList();
                 try
                 {
                     if (utils.InternalGuiExist(window, "mnuSystem") == 1)
                     {
                         generic.GrabFocus(window);
                         InternalMenuHandler(window, "mnuSystem;mnuMaximize",
                                             ref menuList, "Window");
                     }
                 }
                 catch (Exception ex)
                 {
                     LogMessage(ex);
                 }
                 finally
                 {
                     menuList = null;
                 }
             }
             return(1);
         }
         finally
         {
             generic    = null;
             windowList = null;
         }
     }
     else
     {
         ArrayList menuList = new ArrayList();
         try
         {
             // FIXME: Verify this for i18n / l10n
             return(InternalMenuHandler(windowName, "mnuSystem;mnuMaximize",
                                        ref menuList, "Window"));
         }
         finally
         {
             menuList = null;
         }
     }
 }
Esempio n. 2
0
 public int CloseWindow(String windowName)
 {
     if (String.IsNullOrEmpty(windowName))
     {
         String[] windowList = null;
         Generic generic = new Generic(this.utils);
         try
         {
             windowList = generic.GetWindowList();
             foreach (String window in windowList)
             {
                 ArrayList menuList = new ArrayList();
                 try
                 {
                     if (utils.InternalGuiExist(window, "mnuSystem") == 1)
                     {
                         generic.GrabFocus(window);
                         InternalMenuHandler(window, "mnuSystem;mnuClose",
                             ref menuList, "Window");
                     }
                 }
                 catch (Exception ex)
                 {
                     LogMessage(ex);
                 }
                 finally
                 {
                     menuList = null;
                 }
             }
             return 1;
         }
         finally
         {
             generic = null;
             windowList = null;
         }
     }
     else
     {
         ArrayList menuList = new ArrayList();
         try
         {
             return InternalMenuHandler(windowName, "mnuSystem;mnuClose",
                 ref menuList, "Window");
         }
         finally
         {
             menuList = null;
         }
     }
 }
Esempio n. 3
0
        public int GrabFocus(String windowName, String objName = null)
        {
            Generic generic = new Generic(this);

            try
            {
                return(generic.GrabFocus(windowName, objName));
            }
            finally
            {
                generic = null;
            }
        }
Esempio n. 4
0
 public int GrabFocus(String windowName, String objName = null)
 {
     Generic generic = new Generic(this);
     try
     {
         return generic.GrabFocus(windowName, objName);
     }
     finally
     {
         generic = null;
     }
 }
Esempio n. 5
0
 public int ActivateWindow(String windowName)
 {
     Generic generic = new Generic(this);
     try
     {
         return generic.GrabFocus(windowName);
     }
     finally
     {
         generic = null;
     }
 }