Esempio n. 1
0
		public LibraryLink(LibraryFolder parent)
		{
			Parent = parent;
			RootId = Guid.Empty;
			Identifier = Guid.NewGuid();
			RelativePath = string.Empty;
			Type = FileTypes.Other;
			AddDate = DateTime.Now;
			ExtendedProperties = new LinkExtendedProperties(this);
			SearchTags = new LibraryFileSearchTags();
			ExpirationDateOptions = new ExpirationDateOptions();
			CustomKeywords = new CustomKeywords();
			SuperFilters = new List<SuperFilter>();
			SetProperties();
		}
Esempio n. 2
0
		public LibraryFolderLink(LibraryFolder parent)
			: base(parent)
		{
			FolderContent = new List<LibraryLink>();
		}
Esempio n. 3
0
		public void Deserialize(XmlNode node)
		{
			foreach (XmlNode childNode in node.ChildNodes)
			{
				bool tempBool;
				switch (childNode.Name)
				{
					case "Name":
						_name = childNode.InnerText;
						break;
					case "Identifier":
						Guid tempGuid;
						if (Guid.TryParse(childNode.InnerText, out tempGuid))
							Identifier = tempGuid;
						break;
					case "Order":
						int tempInt = 0;
						if (int.TryParse(childNode.InnerText, out tempInt))
							_order = tempInt;
						break;
					case "EnableColumnTitles":
						if (bool.TryParse(childNode.InnerText, out tempBool))
							_enableColumnTitles = tempBool;
						break;
					case "ApplyForAllColumnTitles":
						if (bool.TryParse(childNode.InnerText, out tempBool))
							_applyForAllColumnTitles = tempBool;
						break;
					case "LastChanged":
						DateTime tempDateTime;
						if (DateTime.TryParse(childNode.InnerText, out tempDateTime))
							LastChanged = tempDateTime;
						break;
					case "Folders":
						Folders.Clear();
						foreach (XmlNode folderNode in childNode.ChildNodes)
						{
							var folder = new LibraryFolder(this);
							folder.Deserialize(folderNode);
							Folders.Add(folder);
						}
						break;
					case "ColumnTitles":
						ColumnTitles.Clear();
						foreach (XmlNode columnTitleNode in childNode.ChildNodes)
						{
							var columnTitle = new ColumnTitle(this);
							columnTitle.Deserialize(columnTitleNode);
							ColumnTitles.Add(columnTitle);
						}
						break;
				}
			}
		}