Beispiel #1
0
        public LayerPropertiesViewModel(IProfileEditorService profileEditorService,
                                        ICoreService coreService,
                                        ISettingsService settingsService,
                                        ILayerPropertyVmFactory layerPropertyVmFactory,
                                        DataBindingsViewModel dataBindingsViewModel)
        {
            _layerPropertyVmFactory = layerPropertyVmFactory;

            ProfileEditorService = profileEditorService;
            CoreService          = coreService;
            SettingsService      = settingsService;

            LayerPropertyGroups = new BindableCollection <LayerPropertyGroupViewModel>();
            PropertyChanged    += HandlePropertyTreeIndexChanged;

            // Left side
            TreeViewModel    = _layerPropertyVmFactory.TreeViewModel(this, LayerPropertyGroups);
            EffectsViewModel = _layerPropertyVmFactory.EffectsViewModel(this);
            Items.Add(TreeViewModel);
            Items.Add(EffectsViewModel);

            // Right side
            StartTimelineSegmentViewModel = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.Start, LayerPropertyGroups);
            MainTimelineSegmentViewModel  = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.Main, LayerPropertyGroups);
            EndTimelineSegmentViewModel   = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.End, LayerPropertyGroups);
            TimelineViewModel             = _layerPropertyVmFactory.TimelineViewModel(this, LayerPropertyGroups);
            DataBindingsViewModel         = dataBindingsViewModel;
            Items.Add(StartTimelineSegmentViewModel);
            Items.Add(MainTimelineSegmentViewModel);
            Items.Add(EndTimelineSegmentViewModel);
            Items.Add(TimelineViewModel);
            Items.Add(DataBindingsViewModel);
        }
        public LayerPropertiesViewModel(IProfileEditorService profileEditorService,
                                        ICoreService coreService,
                                        ISettingsService settingsService,
                                        ILayerPropertyVmFactory layerPropertyVmFactory,
                                        DataBindingsViewModel dataBindingsViewModel)
        {
            _layerPropertyVmFactory = layerPropertyVmFactory;

            ProfileEditorService = profileEditorService;
            CoreService          = coreService;
            SettingsService      = settingsService;

            PropertyChanged += HandlePropertyTreeIndexChanged;

            // Left side
            TreeViewModel = _layerPropertyVmFactory.TreeViewModel(this, Items);
            TreeViewModel.ConductWith(this);
            EffectsViewModel = _layerPropertyVmFactory.EffectsViewModel(this);
            EffectsViewModel.ConductWith(this);

            // Right side
            StartTimelineSegmentViewModel = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.Start, Items);
            StartTimelineSegmentViewModel.ConductWith(this);
            MainTimelineSegmentViewModel = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.Main, Items);
            MainTimelineSegmentViewModel.ConductWith(this);
            EndTimelineSegmentViewModel = _layerPropertyVmFactory.TimelineSegmentViewModel(SegmentViewModelType.End, Items);
            EndTimelineSegmentViewModel.ConductWith(this);
            TimelineViewModel = _layerPropertyVmFactory.TimelineViewModel(this, Items);
            TimelineViewModel.ConductWith(this);
            DataBindingsViewModel = dataBindingsViewModel;
            DataBindingsViewModel.ConductWith(this);
        }