Exemplo n.º 1
0
		public CoverState()
		{
			SaveFolder = new StorageDirectory(AppProfileManager.Instance.AppSaveFolder.RelativePathParts.Merge(new[] { "cover" }));
			TemplatesFolder = new StorageDirectory(AppProfileManager.Instance.AppSaveFolder.RelativePathParts.Merge(new[] { "cover", "templates" }));

			ShowPresentationDate = false;
			AddAsPageOne = true;
			UseGenericCover = false;

			SlideHeader = string.Empty;
			Advertiser = string.Empty;
			DecisionMaker = string.Empty;
			PresentationDate = DateTime.MinValue;
			Quote = new Quote();
		}
Exemplo n.º 2
0
		private void Load()
		{
			var document = new XmlDocument();
			document.Load(ResourceManager.Instance.DataCoverFile.LocalPath);

			var node = document.SelectSingleNode(@"/CoverSlide");
			if (node == null) return;
			foreach (XmlNode childNode in node.ChildNodes)
			{
				switch (childNode.Name)
				{
					case "SlideHeader":
						foreach (XmlAttribute attribute in childNode.Attributes)
						{
							switch (attribute.Name)
							{
								case "Value":
									if (!string.IsNullOrEmpty(attribute.Value))
										Headers.Add(attribute.Value);
									break;
							}
						}
						break;
					case "Quote":
						var quote = new Quote();
						foreach (XmlAttribute attribute in childNode.Attributes)
						{
							switch (attribute.Name)
							{
								case "Value":
									quote.Text = attribute.Value;
									break;
								case "Author":
									quote.Author = attribute.Value;
									break;
							}
						}
						Quotes.Add(quote);
						break;
				}
			}
		}