コード例 #1
0
        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;
            }
        }
コード例 #2
0
ファイル: Context.cs プロジェクト: GoranGit/High-Quality-Code
 public Context(State state)
 {
     this.State = state;
     Console.WriteLine("Initial state!");
 }
コード例 #3
0
ファイル: Context.cs プロジェクト: master-vk/Tasks-ITVDN
 public Context(State state)
 {
     State = state;
 }