Inheritance: Caliburn.Micro.Screen
示例#1
0
        public LayerDynamicPropertiesViewModel(string property, LayerEditorViewModel layerEditorViewModel)
        {
            _property             = property;
            _layerEditorViewModel = layerEditorViewModel;

            // Look for the existing property model
            Proposed = new DynamicPropertiesModel();
            var original = layerEditorViewModel
                           .ProposedLayer
                           .Properties
                           .DynamicProperties
                           .FirstOrDefault(lp => lp.LayerProperty == _property);

            if (original == null)
            {
                Proposed.LayerProperty     = property;
                Proposed.LayerPropertyType = LayerPropertyType.PercentageOf;
            }
            else
            {
                Proposed = GeneralHelpers.Clone(original);
            }

            PropertyChanged += OnPropertyChanged;
            SetupControls();
        }
        protected LayerPropertiesViewModel(LayerEditorViewModel layerEditorViewModel)
        {
            LayerEditorViewModel = layerEditorViewModel;
            LayerModel = layerEditorViewModel.ProposedLayer;

            Brush = LayerModel.Properties.Brush.Clone();
        }
 public LayerTweenViewModel(LayerEditorViewModel editorViewModel)
 {
     LayerModel    = editorViewModel.ProposedLayer;
     EaseFunctions = new BindableCollection <string> {
         "Linear", "In", "Out", "In/out"
     };
 }
示例#4
0
 public LayerPropertiesViewModel SetupViewModel(LayerEditorViewModel layerEditorViewModel,
     LayerPropertiesViewModel layerPropertiesViewModel)
 {
     if (layerPropertiesViewModel is FolderPropertiesViewModel)
         return layerPropertiesViewModel;
     return new FolderPropertiesViewModel(layerEditorViewModel);
 }
        public GenericPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
        {
            LayerAnimations = new BindableCollection<ILayerAnimation>(editorVm.LayerAnimations);
            OpacityProperties = new LayerDynamicPropertiesViewModel("Opacity", editorVm);

            SelectedLayerAnimation =
                LayerAnimations.FirstOrDefault(l => l.Name == editorVm.ProposedLayer.LayerAnimation?.Name) ??
                LayerAnimations.First(l => l.Name == "None");
        }
        public LayerKeybindViewModel(LayerEditorViewModel editorViewModel, LayerKeybindModel layerKeybindModel)
        {
            _editorViewModel  = editorViewModel;
            LayerKeybindModel = layerKeybindModel;
            CanToggleType     = !editorViewModel.ProposedLayer.IsEvent;

            PropertyChanged += MapViewToModel;
            editorViewModel.PropertyChanged += EditorViewModelOnPropertyChanged;
            MapModelToView();
        }
示例#7
0
        public LayerConditionViewModel(LayerEditorViewModel editorViewModel, LayerConditionModel conditionModel)
        {
            _editorViewModel = editorViewModel;

            ConditionModel = conditionModel;
            DataModelProps = editorViewModel.DataModelProps;
            Operators      = new BindableCollection <NamedOperator>();
            Enums          = new BindableCollection <string>();

            PropertyChanged += MapViewToModel;
            MapModelToView();
        }
        public LayerConditionViewModel(LayerEditorViewModel editorViewModel, LayerConditionModel conditionModel)
        {
            _editorViewModel = editorViewModel;

            ConditionModel = conditionModel;
            Operators      = new BindableCollection <NamedOperator>();
            DropdownValues = new BindableCollection <string>();
            DataModelProps = new BindableCollection <GeneralHelpers.PropertyCollection>();
            DataModelProps.AddRange(editorViewModel.DataModelProps);

            PropertyChanged += MapViewToModel;
            MapModelToView();
        }
示例#9
0
        public LayerPropertiesViewModel SetupViewModel(LayerEditorViewModel layerEditorViewModel,
            LayerPropertiesViewModel layerPropertiesViewModel)
        {
            var model = layerPropertiesViewModel as KeyboardPropertiesViewModel;
            if (model == null)
                return new KeyboardPropertiesViewModel(layerEditorViewModel)
                {
                    IsGif = false
                };

            model.IsGif = false;
            return layerPropertiesViewModel;
        }
示例#10
0
        public LayerConditionViewModel(LayerEditorViewModel conditionModel, LayerConditionModel layerConditionModel)
        {
            _conditionModel = conditionModel;
            _preselecting   = false;

            LayerConditionModel = layerConditionModel;
            DataModelProps      = conditionModel.DataModelProps;
            Operators           = new BindableCollection <NamedOperator>();
            Enums = new BindableCollection <string>();

            PropertyChanged += UpdateModel;
            PropertyChanged += UpdateForm;

            PreSelect();
        }
        public LayerConditionViewModel(LayerEditorViewModel conditionModel, LayerConditionModel layerConditionModel)
        {
            _conditionModel = conditionModel;
            _preselecting = false;

            LayerConditionModel = layerConditionModel;
            DataModelProps = conditionModel.DataModelProps;
            Operators = new BindableCollection<NamedOperator>();
            Enums = new BindableCollection<string>();

            PropertyChanged += UpdateModel;
            PropertyChanged += UpdateForm;

            PreSelect();
        }
        public LayerDynamicPropertiesViewModel(string property, LayerEditorViewModel layerEditorViewModel)
        {
            _property = property;
            _layerEditorViewModel = layerEditorViewModel;

            // Look for the existing property model
            Proposed = new DynamicPropertiesModel();
            var original = layerEditorViewModel
                .ProposedLayer
                .Properties
                .DynamicProperties
                .FirstOrDefault(lp => lp.LayerProperty == _property);

            if (original == null)
            {
                Proposed.LayerProperty = property;
                Proposed.LayerPropertyType = LayerPropertyType.PercentageOf;
            }
            else
                Proposed = GeneralHelpers.Clone(original);

            PropertyChanged += OnPropertyChanged;
            SetupControls();
        }
示例#13
0
 public LayerPropertiesViewModel SetupViewModel(LayerEditorViewModel layerEditorViewModel,
     LayerPropertiesViewModel layerPropertiesViewModel)
 {
     if (layerPropertiesViewModel is KeyPressPropertiesViewModel)
         return layerPropertiesViewModel;
     return new KeyPressPropertiesViewModel(layerEditorViewModel);
 }
 public KeyPressPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
 {
 }
 public AudioPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
 {
 }
 public FolderPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
 {
 }