Inheritance: System.Windows.Forms.Form
Ejemplo n.º 1
0
        private void ShowCodePopup(Point point)
        {
            if (!WindowHelper.ApplicationIsActivated())
                return;

            var position = this.PositionFromPoint(point.X, point.Y);
            var line = this.LineFromPosition(position);

            var controlPosition = this.PointToScreen(new Point(this.Left, this.Top));
            point = this.PointToScreen(point);

            _codePopup = new CodePreview(this);
            _codePopup.CenterEditor(line);

            if (this.Parent.Dock == DockStyle.Right)
                _codePopup.Left = controlPosition.X - _codePopup.Width;
            else
                _codePopup.Left = controlPosition.X + this.Width;

            _codePopup.Top = point.Y - (_codePopup.Height / 2);
            _codePopup.TopMost = true;
            _codePopup.Show(PluginCore.PluginBase.MainForm);
        }
Ejemplo n.º 2
0
 private void CloseCodePopup()
 {
     if (_codePopup != null)
     {
         _codePopup.Close();
         _codePopup.Dispose();
         _codePopup = null;
     }
 }