public void LockClick(bool e, BusStatusModel bus) { Log.Verbose("name: {@bus.Name} toggle: {@e}", bus.Name, e); var lockDTO = new LockModel(); lockDTO.Name = bus.Name; lockDTO.IsStateLocked = e; SigR !.SetLock(lockDTO); }
public void UpdateActiveBuses(ActiveBusesModel bus) { int index = BusStatusList.FindIndex(item => item.Name.Equals(bus.Name)); if (index != -1) { BusStatusList[index].ActiveBus = bus; } else { var activeBbus = new BusStatusModel(); activeBbus.Name = bus.Name; activeBbus.State = bus.State; activeBbus.ActiveBus = bus; BusStatusList.Add(activeBbus); } }
public void UpdateState(RigState state) { int index = BusStatusList.FindIndex(item => item.Name == state.Name); if (index != -1) { BusStatusList[index].State = state; } else { var bus = new BusStatusModel { Name = state.Name, State = state }; BusStatusList.Add(bus); } }
public string FormatFreq(BusStatusModel busName) { var f = busName.State.Freq / 1000000m; return(f.ToString()); }
public void SettingsClick(BusStatusModel bus) { navMgr !.NavigateTo($"/RigSettings/{bus.Name}"); }