Exemple #1
0
        private void OnPropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs args)
        {
            if (args.ChangedItem.Label == "References")
            {
                _controller.OnReferencesModified();
            }

            // TODO: This is the multi-select case which needs to be handled somehow to support undo.
            if (args.OldValue == null)
            {
                return;
            }

            var obj = _propertyGrid.SelectedObject;

            if (obj is ContentItem)
            {
                var item   = obj as ContentItem;
                var action = new UpdateContentItemAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);
                _controller.OnProjectModified();
            }
            else
            {
                var item   = (PipelineProject)_controller.GetItem((obj as PipelineProjectProxy).OriginalPath);
                var action = new UpdateProjectAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);

                _controller.OnProjectModified();
            }
        }
        private void OnPropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs args)
        {
            if (args.ChangedItem.Label == "References")
            {
                _controller.OnReferencesModified();
            }

            var obj = _propertyGrid.SelectedObject as PipelineProjectProxy;

            if (obj != null)
            {
                var item   = (PipelineProject)_controller.GetItem(obj.OriginalPath);
                var action = new UpdateProjectAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);

                _controller.OnProjectModified();
            }
            else
            {
                var action = new UpdateContentItemAction(this, _controller, _oldValues);
                _controller.AddAction(action);
                _controller.OnProjectModified();
            }
        }
Exemple #3
0
        private void OnPropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs args)
        {
            if (args.ChangedItem.Label == "References")
                _controller.OnReferencesModified();

            var obj = _propertyGrid.SelectedObject as PipelineProjectProxy;

            if (obj != null)
            {
                var item = (PipelineProject)_controller.GetItem(obj.OriginalPath);
                var action = new UpdateProjectAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);

                _controller.OnProjectModified();
            }
            else
            {
                var action = new UpdateContentItemAction(this, _controller, _oldValues);
                _controller.AddAction(action);                
                _controller.OnProjectModified();
            }
        }
Exemple #4
0
        private void OnPropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs args)
        {
            if (args.ChangedItem.Label == "References")
                _controller.OnReferencesModified();

            // TODO: This is the multi-select case which needs to be handled somehow to support undo.
            if (args.OldValue == null)
                return;

            var obj = _propertyGrid.SelectedObject;

            if (obj is ContentItem)
            {
                var item = obj as ContentItem;
                var action = new UpdateContentItemAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);                
                _controller.OnProjectModified();
            }
            else
            {
                var item = (PipelineProject)_controller.GetItem((obj as PipelineProjectProxy).OriginalPath);
                var action = new UpdateProjectAction(this, _controller, item, args.ChangedItem.PropertyDescriptor, args.OldValue);
                _controller.AddAction(action);

                _controller.OnProjectModified();
            }                
        }