Beispiel #1
0
        private void Initialize()
        {
            // We are starting up for the first time.
            _modeState = new ModePowerUpState(this);

            _door = new Door(this);

            // The initial configuration setting for the
            // device. This initial configuration can come
            // from an external configuration file, for
            // example.
            _configurationState = new ProductionConfigurationState(this);

            // The door is initially closed
            _door.DoorState = new DoorClosedState(_door);

            // We are ready
            _modeState.SetModeToIdle();
        }
Beispiel #2
0
 public ProductionConfigurationState(ConfigurationState configurationState)
 {
     this.Device = configurationState.Device;
     Initialize();
 }
Beispiel #3
0
 public TestConfigurationState(ConfigurationState configurationState)
 {
     this.Device = configurationState.Device;
     Initialize();
 }