public void SetWindowPosition(ActionExecutors.Structs.Rect rect)
 {
     if (rect.Left > 0 &&
         rect.Right > 0 &&
         rect.Top > 0 &&
         rect.Bottom > 0)
     {
         SafeNativeMethods.MoveWindow(
             Process.MainWindowHandle,
             rect.Left,
             rect.Top,
             rect.Right - rect.Left,
             rect.Bottom - rect.Top,
             true
             );
     }
 }
 public ActionExecutors.Structs.Rect GetWindowPosition()
 {
     ActionExecutors.Structs.Rect rect = new ActionExecutors.Structs.Rect();
     SafeNativeMethods.GetWindowRect(Process.MainWindowHandle, ref rect);
     return(rect);
 }