Example #1
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     this._isDragging    = false;
     this._dragStartZone = Rectangle.Empty;
     if (e.Button == MouseButtons.Left)
     {
         this._dragStartZone = new Rectangle(e.Location, Size.Empty);
         this._dragStartZone.Inflate(SystemInformation.DragSize);
         this._dragPage = this.GetPageAtPoint(e.Location);
     }
     else
     {
         TabPage pageAtPoint;
         if (e.Button == MouseButtons.Right)
         {
             pageAtPoint = this.GetPageAtPoint(e.Location);
             if (pageAtPoint != null)
             {
                 base.SelectedTab = pageAtPoint;
                 _contextItem     = this;
                 _cm.Show(this, e.Location);
             }
         }
         else if (e.Button == MouseButtons.Middle)
         {
             pageAtPoint = this.GetPageAtPoint(e.Location);
             if (pageAtPoint != null)
             {
                 LINQPad.UI.QueryControl queryControl = this.MainForm.GetQueryControl(pageAtPoint);
                 if (queryControl.Query.IsModified)
                 {
                     base.SelectedTab = pageAtPoint;
                 }
                 queryControl.TryClose();
             }
         }
     }
 }
Example #2
0
 public QueryControlToStringWrapper(LINQPad.UI.QueryControl qc)
 {
     this.QueryControl = qc;
 }