private void titlebar_MouseMove(object sender, MouseEventArgs e) { if (Resizing == true) { int left = 0; int top = 0; if (e.X < LastMouseX) { left = -1; } else if (e.X > LastMouseX) { left = 1; } if (e.Y < LastMouseY) { top = -1; } else if (e.Y > LastMouseY) { top = 1; } if (API.CurrentSkin.DragAnimation == WindowDragEffect.Shake) { WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); } else { ParentForm.Left += left; ParentForm.Top += top; ParentForm.Tag = ParentForm.Location; } } if (Viruses.InfectedWith("windowspazzer")) { int left = 0; int top = 0; if (e.X < LastMouseX) { left = -1; } else if (e.X > LastMouseX) { left = 1; } if (e.Y < LastMouseY) { top = -1; } else if (e.Y > LastMouseY) { top = 1; } WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); } }
private void titlebar_MouseDown(object sender, MouseEventArgs e) { // Handle Draggable Windows if (API.Upgrades["draggablewindows"] == true) { if (e.Button == MouseButtons.Left) { WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true); LastMouseX = e.X; LastMouseY = e.Y; Resizing = true; } //ShiftOSDesktop.log = //ShiftOSDesktop.log + My.Computer.Clock.LocalTime + " User dragged " + this.Name + " to " + this.Location.ToString + Environment.NewLine; } }
private void titlebar_MouseUp(object s, MouseEventArgs e) { WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, false); Resizing = false; }