예제 #1
0
 private void RefreshVecomDetectors()
 {
     AllVecomDetectors.Clear();
     foreach (var d in AllDetectors.Where(x2 => x2.Type == DetectorTypeEnum.VecomDetector))
     {
         AllVecomDetectors.Add(d);
     }
 }
예제 #2
0
        private void OnControllerLoaded(ControllerLoadedMessage obj)
        {
            AllIngangen.Clear();
            AllSignalGroups.Clear();
            AllSignalGroupStrings.Clear();
            AllDetectors.Clear();
            AllDetectorStrings.Clear();
            AllSelectiveDetectors.Clear();
            AllSelectiveDetectorStrings.Clear();
            AllVecomDetectors.Clear();
            AllVecomDetectorStrings.Clear();

            Controller = obj.Controller;

            if (obj.Controller == null)
            {
                return;
            }

            foreach (var sg in obj.Controller.Fasen)
            {
                AllSignalGroups.Add(new FaseCyclusViewModel(sg));
                AllSignalGroupStrings.Add(sg.Naam);
                foreach (var d in sg.Detectoren)
                {
                    AllDetectors.Add(new DetectorViewModel(d)
                    {
                        FaseCyclus = sg.Naam
                    });
                    AllDetectorStrings.Add(d.Naam);
                }
            }

            foreach (var d in obj.Controller.Detectoren)
            {
                AllDetectors.Add(new DetectorViewModel(d));
                AllDetectorStrings.Add(d.Naam);
            }
            foreach (var seld in obj.Controller.SelectieveDetectoren)
            {
                AllSelectiveDetectors.Add(new SelectieveDetectorViewModel(seld));
                AllSelectiveDetectorStrings.Add(seld.Naam);
            }
            foreach (var ingang in obj.Controller.Ingangen)
            {
                AllIngangen.Add(new IngangViewModel(ingang));
            }
        }