コード例 #1
0
        public override void ExecuteSample()
        {
            base.ExecuteSample();

            var smartphone = new Smartphone();

            smartphone.ChangeState(new LockedState(smartphone));

            smartphone.PowerButtonClick();
            smartphone.PowerButtonClick();
            smartphone.PressButton();
            smartphone.PressButton();
            smartphone.PowerButtonClick();
            smartphone.VolumeButtonClick(30);
            smartphone.PressButton();
            smartphone.VolumeButtonClick(10);
        }
コード例 #2
0
 public UnlockedState(Smartphone smartphone) : base(smartphone)
 {
 }
コード例 #3
0
 public State(Smartphone smartphone)
 {
     _smartphone = smartphone;
 }
コード例 #4
0
 public LowBatteryState(Smartphone smartphone) : base(smartphone)
 {
 }