コード例 #1
0
        public ProfileViewModel(IProfileEditorService profileEditorService,
                                ISurfaceService surfaceService,
                                ISettingsService settingsService,
                                IEventAggregator eventAggregator,
                                IVisualizationToolVmFactory visualizationToolVmFactory,
                                IProfileLayerVmFactory profileLayerVmFactory)
        {
            _profileEditorService       = profileEditorService;
            _surfaceService             = surfaceService;
            _settingsService            = settingsService;
            _visualizationToolVmFactory = visualizationToolVmFactory;
            _profileLayerVmFactory      = profileLayerVmFactory;

            Execute.OnUIThreadSync(() =>
            {
                PanZoomViewModel = new PanZoomViewModel {
                    LimitToZero = false
                };

                CanvasViewModels = new BindableCollection <CanvasViewModel>();
                Devices          = new BindableCollection <ArtemisDevice>();
                HighlightedLeds  = new BindableCollection <ArtemisLed>();
                SelectedLeds     = new BindableCollection <ArtemisLed>();
            });

            ApplySurfaceConfiguration(_surfaceService.ActiveSurface);
            ActivateToolByIndex(0);

            eventAggregator.Subscribe(this);
        }
コード例 #2
0
        public ProfileViewModel(IProfileEditorService profileEditorService,
                                IRgbService rgbService,
                                ICoreService coreService,
                                ISettingsService settingsService,
                                IEventAggregator eventAggregator,
                                IVisualizationToolVmFactory visualizationToolVmFactory,
                                IProfileLayerVmFactory profileLayerVmFactory)
        {
            _profileEditorService       = profileEditorService;
            _rgbService                 = rgbService;
            _coreService                = coreService;
            _settingsService            = settingsService;
            _visualizationToolVmFactory = visualizationToolVmFactory;
            _profileLayerVmFactory      = profileLayerVmFactory;

            eventAggregator.Subscribe(this);
        }