Ejemplo n.º 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="PropertyItem" /> class.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="component">The component property belongs to.</param>
        /// <param name="descriptor">The property descriptor</param>
        public PropertyItem(EffectPropertyEditorGrid owner, object component, PropertyDescriptor descriptor)
            : this(null)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }
            if (descriptor == null)
            {
                throw new ArgumentNullException("descriptor");
            }

            Owner       = owner;
            Name        = descriptor.Name;
            _component  = component;
            _descriptor = descriptor;

            IsBrowsable   = descriptor.IsBrowsable;
            _isReadOnly   = descriptor.IsReadOnly;
            _description  = descriptor.Description;
            CategoryName  = descriptor.Category;
            IsLocalizable = descriptor.IsLocalizable;

            Metadata = new AttributesContainer(descriptor.Attributes);
            _descriptor.AddValueChanged(component, ComponentValueChanged);
        }
Ejemplo n.º 2
0
        public FormEffectEditor(TimedSequenceEditorForm sequenceEditorForm)
        {
            if (Application.Current == null)
            {
                // create the Application object
                new Application();
            }
            ResourceDictionary dict = new ResourceDictionary
            {
                Source = new Uri("/EffectEditor;component/Themes/Theme.xaml", UriKind.Relative)
            };

            Application.Current.Resources.MergedDictionaries.Add(dict);
            InitializeComponent();

            _sequenceEditorForm = sequenceEditorForm;
            host = new ElementHost { Dock = DockStyle.Fill };

            _effectPropertyEditorGridEffectEffectPropertiesEditor = new EffectPropertyEditorGrid
            {
                ShowReadOnlyProperties = true,
                PropertyFilterVisibility = Visibility.Hidden
            };

            _effectPropertyEditorGridEffectEffectPropertiesEditor.KeyDown += Editor_OnKeyDown;

            host.Child = _effectPropertyEditorGridEffectEffectPropertiesEditor;

            Controls.Add(host);

            sequenceEditorForm.TimelineControl.SelectionChanged += timelineControl_SelectionChanged;
            _effectPropertyEditorGridEffectEffectPropertiesEditor.PropertyValueChanged += EffectPropertyEditorValueChanged;
            _effectPropertyEditorGridEffectEffectPropertiesEditor.PreviewChanged += EditorPreviewStateChanged;
            _previewLoopTimer.Elapsed += PreviewLoopTimerOnElapsed;
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="CategoryItem" /> class.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="name">The name.</param>
        public CategoryItem(EffectPropertyEditorGrid owner, string name)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }

            Owner = owner;
            Name  = name;
        }
Ejemplo n.º 4
0
		/// <summary>
		///     Initializes a new instance of the <see cref="CategoryItem" /> class.
		/// </summary>
		/// <param name="owner">The owner.</param>
		/// <param name="category">The category.</param>
		public CategoryItem(EffectPropertyEditorGrid owner, CategoryAttribute category)
			: this(owner, category.Category)
		{
			Attribute = category;
		}
Ejemplo n.º 5
0
		/// <summary>
		///     Initializes a new instance of the <see cref="CategoryItem" /> class.
		/// </summary>
		/// <param name="owner">The owner.</param>
		/// <param name="name">The name.</param>
		public CategoryItem(EffectPropertyEditorGrid owner, string name)
		{
			if (owner == null) throw new ArgumentNullException("owner");
			if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name");

			Owner = owner;
			Name = name;
		}
Ejemplo n.º 6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="CategoryItem" /> class.
 /// </summary>
 /// <param name="owner">The owner.</param>
 /// <param name="category">The category.</param>
 public CategoryItem(EffectPropertyEditorGrid owner, CategoryAttribute category)
     : this(owner, category.Category)
 {
     Attribute = category;
 }