private void InitiateWindowSelectionSequence() { // Visualization pause owningWorkspace.OnDragSelectionStarted(this, EventArgs.Empty); // The state machine must be in idle state. if (this.currentState != State.None) { throw new InvalidOperationException(); } // Clear existing selection set. var selectNothing = new DynCmd.SelectModelCommand(Guid.Empty, ModifierKeys.None.AsDynamoType()); owningWorkspace.DynamoViewModel.ExecuteCommand(selectNothing); // Update the selection box and make it visible // but with an initial dimension of zero. SelectionBoxUpdateArgs args = null; args = new SelectionBoxUpdateArgs(mouseDownPos.X, mouseDownPos.Y, 0, 0); args.SetVisibility(Visibility.Visible); this.owningWorkspace.RequestSelectionBoxUpdate(this, args); SetCurrentState(State.WindowSelection); }
private void InitiateWindowSelectionSequence() { // Visualization pause owningWorkspace.OnDragSelectionStarted(this, EventArgs.Empty); // The state machine must be in idle state. if (this.currentState != State.None) throw new InvalidOperationException(); // Clear existing selection set. var selectNothing = new DynCmd.SelectModelCommand(Guid.Empty, ModifierKeys.None.AsDynamoType()); owningWorkspace.DynamoViewModel.ExecuteCommand(selectNothing); // Update the selection box and make it visible // but with an initial dimension of zero. SelectionBoxUpdateArgs args = null; args = new SelectionBoxUpdateArgs(mouseDownPos.X, mouseDownPos.Y, 0, 0); args.SetVisibility(Visibility.Visible); this.owningWorkspace.RequestSelectionBoxUpdate(this, args); SetCurrentState(State.WindowSelection); }