Example #1
0
		/// <summary>
		/// Merge LabelLayout's items inside this
		/// </summary>
		/// <param name="doc">Xml document</param>
		/// <param name="designMode">If on design mode</param>
		public void MergeFromXml(XmlDocument doc, bool designMode)
		{
			// Imports printable items settings
			foreach (XmlElement element in doc["LabelLayout"].GetElementsByTagName("ItemLayout"))
			{
				ItemLayout importedItem;

				importedItem = new ItemLayout(this.components);
				importedItem.DesignMode = designMode;
				importedItem.LoadFromXml(element, typeDictionary);

				items.Add(importedItem);
			}
		}
Example #2
0
		/// <summary>
		/// Load settings from Xml
		/// </summary>
		/// <param name="doc">Xml document</param>
		/// <param name="designMode">If on design mode</param>
		public override void LoadFromXml(XmlDocument doc, bool designMode)
		{
			XmlElement paperSizeElement;

			ImportPageAttributes(doc["LabelLayout"]);

			// Imports printable items settings
			foreach (XmlElement element in doc["LabelLayout"].GetElementsByTagName("ItemLayout"))
			{
				ItemLayout importedItem;

				importedItem = new ItemLayout(this.components);
				importedItem.DesignMode = designMode;
				importedItem.LoadFromXml(element, typeDictionary);

				items.Add(importedItem);
			}

			paperSizeElement = doc["LabelLayout"]["PaperSize"];

			if (paperSizeElement != null)
				paperSize = CreatePaperSizeFromXml(paperSizeElement, metric);
		}