Пример #1
0
 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);
 }
Пример #2
0
 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");
 }
Пример #3
0
        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();
        }
Пример #4
0
        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();
        }
Пример #5
0
 public ConfigForm(FileDockForm parent)
 {
     this.parent = parent;
     InitializeComponent();
 }
Пример #6
0
 public TogglePanel(FileDockForm Owner)
 {
     this.Owner = Owner;
     TogglePanel.Instances.Add(this);
 }