public TimelineSegmentViewModel(SegmentViewModelType segment, BindableCollection <LayerPropertyGroupViewModel> layerPropertyGroups, IProfileEditorService profileEditorService, IDialogService dialogService) { _dialogService = dialogService; ProfileEditorService = profileEditorService; Segment = segment; LayerPropertyGroups = layerPropertyGroups; if (Segment == SegmentViewModelType.Start) { ToolTip = "This segment is played when a layer starts displaying because it's conditions are met"; } else if (Segment == SegmentViewModelType.Main) { ToolTip = "This segment is played while a condition is met, either once or on a repeating loop"; } else if (Segment == SegmentViewModelType.End) { ToolTip = "This segment is played once a condition is no longer met"; } IsMainSegment = Segment == SegmentViewModelType.Main; ProfileEditorService.PixelsPerSecondChanged += ProfileEditorServiceOnPixelsPerSecondChanged; ProfileEditorService.ProfileElementSelected += ProfileEditorServiceOnProfileElementSelected; if (ProfileEditorService.SelectedProfileElement != null) { ProfileEditorService.SelectedProfileElement.PropertyChanged += SelectedProfileElementOnPropertyChanged; } Update(); }
public TimelineSegmentViewModel(SegmentViewModelType segment, IObservableCollection <LayerPropertyGroupViewModel> layerPropertyGroups, IProfileEditorService profileEditorService, IDialogService dialogService) { _dialogService = dialogService; ProfileEditorService = profileEditorService; Segment = segment; LayerPropertyGroups = layerPropertyGroups; if (Segment == SegmentViewModelType.Start) { ToolTip = "This segment is played when a layer starts displaying because it's conditions are met"; } else if (Segment == SegmentViewModelType.Main) { ToolTip = "This segment is played while a condition is met, either once or on a repeating loop"; } else if (Segment == SegmentViewModelType.End) { ToolTip = "This segment is played once a condition is no longer met"; } IsMainSegment = Segment == SegmentViewModelType.Main; }