Ejemplo n.º 1
0
 /// <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));
 }
Ejemplo n.º 3
0
 public override object Visit(IEcosCommandStation entity, ContextMenuStrip data)
 {
     data.Items.Add("Read...", null, (s, x) => OnReadEcos(entity));
     return(base.Visit(entity, data));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public EcosReaderForm(IPackage package, IEcosCommandStation entity)
 {
     this.package = package;
     this.entity  = entity;
     InitializeComponent();
 }
Ejemplo n.º 5
0
 public virtual TReturn Visit(IEcosCommandStation entity, TData data)
 {
     return(Visit((ICommandStation)entity, data));
 }
Ejemplo n.º 6
0
 public override object Visit(IEcosCommandStation entity, GridContext data)
 {
     return(new EcosCommandStationSettings(entity, data));
 }
Ejemplo n.º 7
0
 public override IEntityState Visit(IEcosCommandStation entity, RailwayState data)
 {
     return(new EcosCommandStationState(entity, data, Empty <string> .Array));
 }