/// <summary> /// Read all data from the given command station. /// </summary> private void OnReadEcos(IEcosCommandStation entity) { using (var dialog = new EcosReaderForm(package, entity)) { dialog.ShowDialog(); context.ReloadPackage(); } }
/// <summary> /// Default ctor /// </summary> public EcosCommandStationState(IEcosCommandStation entity, RailwayState railwayState, string[] addressSpaces) : base(entity, railwayState, addressSpaces) { connection = new EcosConnection(entity.HostName, railwayState); // Request to be notified connection.SendCommand(new Command(Constants.CmdRequest, Constants.IdEcos, Constants.OptView)); // Get status connection.SendCommand(new Command(Constants.CmdGet, Constants.IdEcos, Constants.OptStatus)).ContinueWith(t => OnStatusReply(t.Result)); }
public override object Visit(IEcosCommandStation entity, ContextMenuStrip data) { data.Items.Add("Read...", null, (s, x) => OnReadEcos(entity)); return(base.Visit(entity, data)); }
/// <summary> /// Default ctor /// </summary> public EcosReaderForm(IPackage package, IEcosCommandStation entity) { this.package = package; this.entity = entity; InitializeComponent(); }
public virtual TReturn Visit(IEcosCommandStation entity, TData data) { return(Visit((ICommandStation)entity, data)); }
public override object Visit(IEcosCommandStation entity, GridContext data) { return(new EcosCommandStationSettings(entity, data)); }
public override IEntityState Visit(IEcosCommandStation entity, RailwayState data) { return(new EcosCommandStationState(entity, data, Empty <string> .Array)); }