コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        public string FormatFreq(BusStatusModel busName)
        {
            var f = busName.State.Freq / 1000000m;

            return(f.ToString());
        }
コード例 #5
0
 public void SettingsClick(BusStatusModel bus)
 {
     navMgr !.NavigateTo($"/RigSettings/{bus.Name}");
 }