public void closeCreatePopupWindow()
 {
     if (!this.createPopupWindowClosing)
     {
         this.createPopupWindowClosing = true;
         if (this.isPopupWindowOpenAndClose(this.m_createPopupWindow))
         {
             GameEngine.Instance.EnableMouseClicks();
             this.closeGreyOut();
             this.showDXCardBar(9);
             Instance.closeParishPanel();
         }
         this.m_createPopupWindow = null;
         this.createPopupWindowClosing = false;
         Program.profileLogin.TopMost = true;
         Program.profileLogin.BringToFront();
         Program.profileLogin.TopMost = false;
     }
 }
 public CreatePopupWindow openCreatePopupWindow()
 {
     this.openGreyOutWindowLogin(true);
     this.closePopupWindow(this.m_createPopupWindow);
     this.m_createPopupWindow = new CreatePopupWindow();
     this.positionWindow(this.m_createPopupWindow, true, false);
     this.m_createPopupWindow.init();
     this.m_createPopupWindow.Show(this.getGreyOutWindow());
     GameEngine.Instance.DisableMouseClicks();
     this.m_createPopupWindow.Location = new Point(Program.profileLogin.Location.X + ((Program.profileLogin.Width - this.m_createPopupWindow.Width) / 2), Program.profileLogin.Location.Y + ((Program.profileLogin.Height - this.m_createPopupWindow.Height) / 2));
     Program.profileLogin.TopMost = false;
     this.m_greyOutWindow.BringToFront();
     this.m_createPopupWindow.BringToFront();
     this.m_createPopupWindow.TopMost = true;
     this.m_createPopupWindow.Focus();
     this.m_createPopupWindow.TopMost = false;
     return this.m_createPopupWindow;
 }