Ejemplo n.º 1
0
 public void NextState(IRemoteControl control)
 {
     if (control.CurrentFeature == FeatureType.Fan)
     {
         control.CurrentFeature = FeatureType.Dehumidify;
         Console.WriteLine("目前轉成除濕模式");
     }
     else
     {
         control.FeatureState = new DehumidifyState();
         control.ChangeFeatures();
     }
 }
Ejemplo n.º 2
0
 public void NextState(IRemoteControl control)
 {
     if (control.CurrentFeature == FeatureType.Sleep)
     {
         control.CurrentFeature = FeatureType.Condition;
         Console.WriteLine("目前轉成冷氣模式");
     }
     else
     {
         control.FeatureState = new ConditionState();
         control.ChangeFeatures();
     }
 }
Ejemplo n.º 3
0
 public void ChangeFeatures()
 {
     remoteControl.ChangeFeatures();
 }