public void closeBPPopupWindow()
 {
     if (!this.BPPopupWindowClosing)
     {
         this.BPPopupWindowClosing = true;
         if (this.isPopupWindowOpenAndClose(this.m_BPPopupWindow))
         {
             GameEngine.Instance.EnableMouseClicks();
             this.closeGreyOut();
             this.showDXCardBar(9);
             Instance.closeParishPanel();
         }
         this.m_BPPopupWindow = null;
         this.BPPopupWindowClosing = false;
         Program.profileLogin.TopMost = true;
         Program.profileLogin.BringToFront();
         Program.profileLogin.TopMost = false;
     }
 }
 public BPPopupWindow openBPPopupWindow(ProfileLoginWindow parentForm)
 {
     this.openGreyOutWindowLogin(true);
     this.closePopupWindow(this.m_BPPopupWindow);
     this.m_BPPopupWindow = new BPPopupWindow();
     this.positionWindow(this.m_BPPopupWindow, true, false);
     this.m_BPPopupWindow.init(parentForm);
     this.m_BPPopupWindow.Show(this.getGreyOutWindow());
     GameEngine.Instance.DisableMouseClicks();
     this.m_BPPopupWindow.Location = new Point(Program.profileLogin.Location.X + ((Program.profileLogin.Width - this.m_BPPopupWindow.Width) / 2), (Program.profileLogin.Location.Y + ((Program.profileLogin.Height - this.m_BPPopupWindow.Height) / 2)) + 10);
     Program.profileLogin.TopMost = false;
     this.m_greyOutWindow.BringToFront();
     this.m_BPPopupWindow.BringToFront();
     this.m_BPPopupWindow.TopMost = true;
     this.m_BPPopupWindow.Focus();
     this.m_BPPopupWindow.TopMost = false;
     return this.m_BPPopupWindow;
 }