mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Work on project panel, trees, added settings
This commit is contained in:
		@@ -3,6 +3,7 @@ using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Xml.Serialization;
 | 
			
		||||
using RainmeterStudio.Storage;
 | 
			
		||||
 | 
			
		||||
namespace RainmeterStudio.Model
 | 
			
		||||
{
 | 
			
		||||
@@ -170,9 +171,26 @@ namespace RainmeterStudio.Model
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Gets or sets the root node
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        [XmlElement("root")]
 | 
			
		||||
        [XmlIgnore]
 | 
			
		||||
        public Tree<Reference> Root { get; set; }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Gets or sets the serializable root node
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <remarks>Warning: not efficient</remarks>
 | 
			
		||||
        [XmlElement("root")]
 | 
			
		||||
        public SerializableTree<Reference> SerializableRoot
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return Root.AsSerializableTree();
 | 
			
		||||
            }
 | 
			
		||||
            set
 | 
			
		||||
            {
 | 
			
		||||
                Root = value.AsTree();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        #region Constructor
 | 
			
		||||
 
 | 
			
		||||
@@ -7,13 +7,11 @@ using System.Xml.Serialization;
 | 
			
		||||
 | 
			
		||||
namespace RainmeterStudio.Model
 | 
			
		||||
{
 | 
			
		||||
    public class Tree<T>
 | 
			
		||||
    public class Tree<T> : IList<Tree<T>>
 | 
			
		||||
    {
 | 
			
		||||
        [XmlElement("data")]
 | 
			
		||||
        public T Data { get; set; }
 | 
			
		||||
 | 
			
		||||
        [XmlArray("children"), XmlArrayItem("child")]
 | 
			
		||||
        public ObservableCollection<Tree<T>> Children { get; set; }
 | 
			
		||||
        public ObservableCollection<Tree<T>> Children { get; private set; }
 | 
			
		||||
 | 
			
		||||
        public Tree()
 | 
			
		||||
        {
 | 
			
		||||
@@ -150,5 +148,10 @@ namespace RainmeterStudio.Model
 | 
			
		||||
 | 
			
		||||
            return hash;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
 | 
			
		||||
        {
 | 
			
		||||
            return Children.GetEnumerator();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user