Beispiel #1
0
 public AllUpProcessor(IMutator mutator, IPnLConsumer pnLConsumer, ISourcer sourcer, IReducer reducer, IScenarioGenerator scenarioGenerator, IEventReceiver eventReceiver)
 {
     this.mutator           = mutator;
     this.pnLConsumer       = pnLConsumer;
     this.sourcer           = sourcer;
     this.reducer           = reducer;
     this.scenarioGenerator = scenarioGenerator;
     this.eventReceiver     = eventReceiver;
 }
        public MainViewModel()
        {
            var defaultbrush  = BrushHelper.BuildBrush(255, 0, 0);
            var defaultColors = new List <Brush>();

            for (int i = 0; i < AbstractScenario.TOTAL_LED; i++)
            {
                defaultColors.Add(defaultbrush);
            }
            UpdateAllLeds(defaultColors);


            OnMyButtonClick        = new RelayCommand(cmd => OnMyButtonClickImpl());
            OnRecordScenearioClick = new RelayCommand(cmd => OnRecordScenearioClickImpl());

            _scenario = new ScenarioGenerator();

            var scenariiList = new ObservableCollection <string>();

            Enum.GetValues(typeof(EScenario)).Cast <EScenario>().ToList().ForEach(x => scenariiList.Add(x.ToString()));
            this.ScenarioCollection = scenariiList;
        }