Exemple #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;
         }
     }
 }