Esempio n. 1
0
 public ProfileLayerViewModel(Layer layer, PanZoomViewModel panZoomViewModel, IProfileEditorService profileEditorService, ILayerEditorService layerEditorService)
 {
     _panZoomViewModel     = panZoomViewModel;
     _profileEditorService = profileEditorService;
     _layerEditorService   = layerEditorService;
     Layer = layer;
 }
Esempio n. 2
0
 public EditToolViewModel(PanZoomViewModel panZoomViewModel, IProfileEditorService profileEditorService, ILayerEditorService layerEditorService)
     : base(panZoomViewModel, profileEditorService)
 {
     _layerEditorService = layerEditorService;
     Cursor = Cursors.Arrow;
     Update();
 }
Esempio n. 3
0
        public ProfileViewModel(IProfileEditorService profileEditorService,
                                ILayerEditorService layerEditorService,
                                ISurfaceService surfaceService,
                                ISettingsService settingsService,
                                IEventAggregator eventAggregator,
                                IProfileLayerViewModelFactory profileLayerViewModelFactory)
        {
            _profileEditorService         = profileEditorService;
            _layerEditorService           = layerEditorService;
            _surfaceService               = surfaceService;
            _settingsService              = settingsService;
            _profileLayerViewModelFactory = profileLayerViewModelFactory;

            Execute.OnUIThreadSync(() =>
            {
                CanvasViewModels = new ObservableCollection <CanvasViewModel>();
                DeviceViewModels = new ObservableCollection <ProfileDeviceViewModel>();
                PanZoomViewModel = new PanZoomViewModel {
                    LimitToZero = false
                };
            });

            ApplySurfaceConfiguration(surfaceService.ActiveSurface);
            ApplyActiveProfile();
            CreateUpdateTrigger();
            ActivateToolByIndex(0);

            _profileEditorService.SelectedProfileChanged        += OnSelectedProfileChanged;
            _profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
            _profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
            eventAggregator.Subscribe(this);
        }
Esempio n. 4
0
 public SelectionToolViewModel(ProfileViewModel profileViewModel, IProfileEditorService profileEditorService, ILayerEditorService layerEditorService)
     : base(profileViewModel, profileEditorService)
 {
     _layerEditorService = layerEditorService;
     using (var stream = new MemoryStream(Resources.aero_crosshair))
     {
         Cursor = new Cursor(stream);
     }
 }
Esempio n. 5
0
        public EditToolViewModel(ProfileViewModel profileViewModel, IProfileEditorService profileEditorService, ILayerEditorService layerEditorService)
            : base(profileViewModel, profileEditorService)
        {
            _layerEditorService = layerEditorService;
            Cursor = Cursors.Arrow;
            Update();

            profileEditorService.SelectedProfileChanged        += (sender, args) => Update();
            profileEditorService.SelectedProfileElementUpdated += (sender, args) => Update();
            profileEditorService.ProfilePreviewUpdated         += (sender, args) => Update();
        }
Esempio n. 6
0
        public ProfileLayerViewModel(Layer layer, IProfileEditorService profileEditorService, ILayerEditorService layerEditorService)
        {
            _profileEditorService = profileEditorService;
            _layerEditorService   = layerEditorService;
            Layer = layer;

            Update();
            Layer.RenderPropertiesUpdated += LayerOnRenderPropertiesUpdated;
            _profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
            _profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
            _profileEditorService.ProfilePreviewUpdated         += ProfileEditorServiceOnProfilePreviewUpdated;
        }