예제 #1
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public Cooler(bool state, int beerQuantity, FrostLevel frost)
 {
     this.state = state;
     this.beerQuantity = beerQuantity;
     this.frost = frost;
     this.stateMessage = " ";
 }
 public void FrostMode()
 {
     frostMode++;
     if ((int)frostMode >= Enum.GetNames(typeof(MusicCenterMode)).Length)
     {
         frostMode = 0;
     }
 }
예제 #3
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetUkrainianWinterFrost()
 {
     frost = FrostLevel.UkrainianWinter;
 }
예제 #4
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetNormalFrost()
 {
     frost = FrostLevel.Normal;
 }
예제 #5
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetArcticIceFrost()
 {
     frost = FrostLevel.ArcticIce;
 }
예제 #6
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public Cooler(bool state, int beerQuantity, FrostLevel frost)
 {
     this.state = state;
     this.beerQuantity = beerQuantity;
     this.level = frost;
 }
예제 #7
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void On()
 {
     if (!state)
     {
         state = true;
         stateMessage = " ";
         frost = FrostLevel.Normal;
     }
 }
예제 #8
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void Off()
 {
     state = false;
     frost = FrostLevel.Warmy;
 }
예제 #9
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetUkrainianWinterFrost()
 {
     if (state)
     {
         frost = FrostLevel.UkrainianWinter;
     }
     else
     {
         stateMessage = "Режим не меняется, холодильник выключен";
     }
 }
예제 #10
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetNormalFrost()
 {
     if (state)
     {
         frost = FrostLevel.Normal;
     }
     else
     {
         stateMessage = "Режим не меняется, холодильник выключен";
     }
 }
예제 #11
0
파일: Cooler.cs 프로젝트: eastyman/Lesson5
 public void SetArcticIceFrost()
 {
     if (state)
     {
         frost = FrostLevel.ArcticIce;
     }
     else
     {
         stateMessage = "Режим не меняется, холодильник выключен";
     }
 }