|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Refactoring_Switch
{
class Program
{
static void Main(string[] args)
{
DeviceController deviceController = new DeviceController();
Console.WriteLine(deviceController.GetDeviceState().ToString());
deviceController.ChangeDeviceState(DeviceStatesEnum.Active);
Console.WriteLine(deviceController.GetDeviceState().ToString());
deviceController.ChangeDeviceState(DeviceStatesEnum.PowerUp);
Console.WriteLine(deviceController.GetDeviceState().ToString());
Console.Read();
}
}
public enum DeviceStatesEnum
{
PowerUp,
Waiting,
StandBy,
Inactive,
Active,
Start,
Ready,
Equilibrating,
StartRunning,
Running,
ShoutingDown,
ShoutDown,
WarmingUp,
Error
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.