protected BinaryStateActuator(ComponentId id, IBinaryStateEndpoint endpoint) : base(id) { if (endpoint == null) throw new ArgumentNullException(nameof(endpoint)); AddState(new StateMachineState(BinaryStateId.Off).WithAction(endpoint.TurnOff)); AddState(new StateMachineState(BinaryStateId.On).WithAction(endpoint.TurnOn)); }
protected BinaryStateActuator(ComponentId id, IBinaryStateEndpoint endpoint) : base(id) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } AddState(new StateMachineState(BinaryStateId.Off).WithAction(endpoint.TurnOff)); AddState(new StateMachineState(BinaryStateId.On).WithAction(endpoint.TurnOn)); }
public async Task <IBinaryStateEndpoint> CreateDemoBinaryComponent(string caption) { IBinaryStateEndpoint result = null; await Dispatcher.RunAsync( CoreDispatcherPriority.Normal, () => { var checkBox = new CheckBox(); checkBox.IsEnabled = false; checkBox.Content = caption; var endpoint = new CheckBoxBinaryStateEndpoint(checkBox); DemoLampsStackPanel.Children.Add(checkBox); result = endpoint; }); return(result); }
public Socket(ComponentId id, IBinaryStateEndpoint endpoint) : base(id, endpoint) { }
public CustomBinaryStateActuator(ComponentId id, IBinaryStateEndpoint endpoint) : base(id, endpoint) { }
public Lamp(ComponentId id, IBinaryStateEndpoint endpoint) : base(id, endpoint) { }