protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); Debug.Print("Drag Begin"); dragBegin = new Point(e.Location.X, e.Location.Y); this.MouseMove += MoveHandler; FileDockForm.UnregisterAppBar(this.ParentForm.Handle); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); this.previewForm.Hide(); this.littlePreviewForm.Hide(); FileDockForm.RegisterAppBar(this.ParentForm.Handle); FileDockForm.SetPos(this.ParentForm.Handle, dragResult); this.MouseMove -= MoveHandler; Debug.Print("Drag End"); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.previewForm = new FileDockForm(); this.previewForm.dockOnLoad = false; this.previewForm.BackColor = Color.DarkGray; this.previewForm.Opacity = 0.75; this.previewForm.FormBorderStyle = FormBorderStyle.None; this.previewForm.Hide(); this.littlePreviewForm = new Form(); this.littlePreviewForm.Size = this.ParentForm.Size; this.littlePreviewForm.BackColor = Color.DarkGray; this.littlePreviewForm.FormBorderStyle = FormBorderStyle.FixedToolWindow; this.littlePreviewForm.Hide(); }
void MoveHandler(object sender, MouseEventArgs args) { Point delta = new Point(args.Location.X - dragBegin.X, args.Location.Y - dragBegin.Y); //Debug.Print("Moved: " + delta.ToString()); Point draggedTo = new Point(this.ParentForm.Left + delta.X, this.ParentForm.Top); // this.littlePreviewForm.Location = draggedTo; this.ParentForm.Location = draggedTo; this.ParentForm.Size = this.littlePreviewForm.Size; dragResult = FileDockForm.QueryPos(this.ParentForm.Handle, draggedTo, this.ParentForm.Size); this.previewForm.Bounds = dragResult.rc; if (!this.previewForm.Visible) { this.previewForm.Show(); } // if ( !this.littlePreviewForm.Visible ) // this.littlePreviewForm.Show(); }
public ConfigForm(FileDockForm parent) { this.parent = parent; InitializeComponent(); }
public TogglePanel(FileDockForm Owner) { this.Owner = Owner; TogglePanel.Instances.Add(this); }