Exemplo n.º 1
0
        public void ShowErrorMessagePopup(string errorMessage)
        {
            Form activeForm = Form.ActiveForm;

            _errorPopup = new ErrorPopup(errorMessage);
            int x = scintillaControl1.PointXFromPosition(this.scintillaControl1.CurrentPos) + 200;
            int y = scintillaControl1.PointYFromPosition(this.scintillaControl1.CurrentPos) + 40;
            Point mainWindowOffset = this.PointToScreen(new Point(0, 0));
            _errorPopup.Location = new Point(mainWindowOffset.X + x, mainWindowOffset.Y + y);
            _errorPopup.Show(this);

            // don't allow the popup to steal the focus
            if (activeForm != null)
            {
                activeForm.Activate();
            }
        }
Exemplo n.º 2
0
 public void HideErrorMessagePopup()
 {
     if (_errorPopup != null)
     {
         _errorPopup.Hide();
         _errorPopup.Dispose();
         _errorPopup = null;
     }
 }