using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Xml; namespace DarkWynter.App { public class CutscenePanel { // Init vars public string panelName = ""; public Panel panel = new Panel(); public List attributeNodes = new List(); /// /// /// public CutscenePanel(){} /// /// /// public CutscenePanel(XmlNode node, Point location, Size size) { panel = CreatePanel(location, size); // Reset carriage return to top of page AttributeNode.rowLocation = 16; #region Panel Header Label // Save Parent Element Name panelName = node.Name; // Create label from Xml Element Name AttributeNode labelNode = new AttributeNode(panel, panelName); // Add to panel panel.Controls.Add(labelNode.label); #endregion // Create Property Boxes for (int i = 0; i < node.Attributes.Count; i++) { // Create a participle node AttributeNode formNode = new AttributeNode(panel, node.Attributes[i]); // Save to the List attributeNodes.Add(formNode); } } private Panel CreatePanel(Point location, Size size) { Panel myPanel = new Panel(); myPanel.Location = location; myPanel.Size = size; myPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; myPanel.AutoScroll = true; return myPanel; } } }