/// <summary> /// move the selected window to the default position /// </summary> private void MoveSelectedToDefault() { WindowItemViewModel selected = this.Selected; if (selected != null) { WindowUtils.MoveWindowToPosition(selected.hWnd, Properties.Settings.Default.DefaultXPosition, Properties.Settings.Default.DefaultYPosition); } }
/// <summary> /// move selected window to cursor's current position /// </summary> private void MoveSelectedToCursor() { WindowItemViewModel selected = this.Selected; //get cursor's position if (selected != null) { Point point = base.getCursorPosition(); int X = (int)point.X; int Y = (int)point.Y; WindowUtils.MoveWindowToPosition(selected.hWnd, X, Y); } }