public void OnMouseClick(IMouse mouse, Point location)
        {
            switch (_state)
            {
                case State.WaitLineBeginPoint:
                    _begin = location;
                    _state = State.WaitLineEndPoint;
                    break;

                case State.WaitLineEndPoint:
                    _end = location;
                    _state = State.WaitLineBeginPoint;
                    mouse.DrawPad.Add(new Line(_begin, _end));
                    break;
            }
        }
Beispiel #2
0
 public Context(State state)
 {
     this.State = state;
     Console.WriteLine("Initial state!");
 }
Beispiel #3
0
 public Context(State state)
 {
     State = state;
 }