public OfficeWindow getWindow(OFFICE_TYPE type)
 {
     foreach (OfficeWindow window in controls)
     {
         if (window.getType() == type)
         {
             return(window);
         }
     }
     throw new NullReferenceException();
 }
 public void first(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         window.first();
     }
     catch
     {
         throw;
     }
 }
 public void previous(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         window.previous();
     }
     catch
     {
         throw;
     }
 }
 public int getPages(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         return(window.getPages());
     }
     catch
     {
         throw;
     }
 }
 public void marker(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         window.marker();
     }
     catch
     {
         throw;
     }
 }
 public void enableColorPen(OFFICE_TYPE type, bool isEnable)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         window.enableColorPen(isEnable);
     }
     catch
     {
         throw;
     }
 }
 public void stopRun(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         window.stop();
     }
     catch
     {
         throw;
     }
 }
 public int currentPage(OFFICE_TYPE type)
 {
     try
     {
         OfficeWindow window = getWindow(type);
         return(window.currentPage());
     }
     catch
     {
         throw;
     }
 }