Esempio n. 1
0
        private void OnNameChanged(NameChangedMessage obj)
        {
            switch (obj.ObjectType)
            {
            case TLCGenObjectTypeEnum.Fase:
                AllSignalGroupStrings.Remove(obj.OldName);
                AllSignalGroupStrings.Add(obj.NewName);
                AllSignalGroups.BubbleSort();
                AllSignalGroupStrings.BubbleSort();
                break;

            case TLCGenObjectTypeEnum.Detector:
                AllDetectorStrings.Remove(obj.OldName);
                AllDetectorStrings.Add(obj.NewName);
                AllDetectors.BubbleSort();
                AllDetectorStrings.BubbleSort();
                RefreshVecomDetectors();
                break;

            case TLCGenObjectTypeEnum.Input:
                AllIngangen.BubbleSort();
                break;

            case TLCGenObjectTypeEnum.SelectieveDetector:
                AllSelectiveDetectorStrings.Remove(obj.OldName);
                AllSelectiveDetectorStrings.Add(obj.NewName);
                AllSelectiveDetectorStrings.BubbleSort();
                break;
            }
            foreach (var detectorsCollectionView in _detectorsCollectionViews)
            {
                detectorsCollectionView.Value.Refresh();
            }
        }
Esempio n. 2
0
 private void OnSelectieveDetectorenChanged(SelectieveDetectorenChangedMessage obj)
 {
     AllSelectiveDetectors.Clear();
     AllSelectiveDetectorStrings.Clear();
     foreach (var seld in DataAccess.TLCGenControllerDataProvider.Default.Controller.SelectieveDetectoren)
     {
         AllSelectiveDetectors.Add(new SelectieveDetectorViewModel(seld));
         AllSelectiveDetectorStrings.Add(seld.Naam);
     }
 }
Esempio n. 3
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));
            }
        }