/// /// Copyright (c) 2021 Sensus Slovensko a.s. /// using System; namespace TBF.BenchControl.DataEntry.DataStream { public class OpenConnectionEventArgs : EventArgs { public int WMNr0; /// 0-based water meter position public bool IsLast; public Results.Entities.WaterMeter Wm; public bool Connected; public string WaterMeterID; public OpenConnectionEventArgs(int wmNr0, bool isLast, Results.Entities.WaterMeter wm = null, bool connected = false, string waterMeterID = null) { this.WMNr0 = wmNr0; this.IsLast = isLast; this.Wm = wm; this.Connected = connected; this.WaterMeterID = connected ? waterMeterID : null; } public override string ToString() { return string.Format("WMNr0={0} Last={1} WMPos={2} connected={3} S/N={4}", WMNr0, IsLast, Wm.WMPosition, Connected, string.IsNullOrEmpty(WaterMeterID) ? string.Empty : WaterMeterID); } } }