void HandleControlStyle(XmlNode xnode) { string name = GetStrParam(xnode, "name", "DefaultControl"); ControlStyle ct = GetControlStyle(name); if (ct == null) { ct = new ControlStyle(); ct.Name = name; ControlStyles[name] = ct; ct.SetDefault(); } UpdateStyle(xnode, ct); if (name == "DefaultControl") { //foreach (KeyValuePair<String, ctlUserPanel> pair in Controls) foreach (KeyValuePair <String, Control> pair in Controls) { if (pair.Value is ctlUserPanel) { ctlUserPanel ctl = (ctlUserPanel)pair.Value; ctl.ApplyStyle(DefaultControlStyle); } else { // apply the style by recursing through the object ApplyStyleRecurse(pair.Value, DefaultControlStyle); } } } }
public GuiConfig() { BgndDecorList = new List <DecorItem>(); FgndDecorList = new List <DecorItem>(); //Controls = new Dictionary<string, ctlUserPanel>(); Controls = new Dictionary <string, Control>(); Buttons = new Dictionary <string, ctlImageButton>(); ControlStyles = new Dictionary <string, ControlStyle>(); DecorItems = new Dictionary <string, DecorItem>(); Res = global::UV_DLP_3D_Printer.Properties.Resources.ResourceManager; Plugin = null; DefaultControlStyle = new ControlStyle(); DefaultControlStyle.Name = "DefaultControl"; DefaultControlStyle.SetDefault(); ControlStyles[DefaultControlStyle.Name] = DefaultControlStyle; }
void HandleButtonStyle(XmlNode xnode) { string name = GetStrParam(xnode, "name", "DefaultButton"); ControlStyle bt = GetControlStyle(name); if (bt == null) { bt = new ControlStyle(); bt.Name = name; ControlStyles[name] = bt; bt.SetDefault(); } UpdateStyle(xnode, bt); if (name == "DefaultButton") { foreach (KeyValuePair <String, ctlImageButton> pair in Buttons) { ctlImageButton butt = pair.Value; butt.ApplyStyle(bt); } } }
void HandleControlStyle(XmlNode xnode) { string name = GetStrParam(xnode, "name", "DefaultControl"); ControlStyle ct = GetControlStyle(name); if (ct == null) { ct = new ControlStyle(); ct.Name = name; ControlStyles[name] = ct; ct.SetDefault(); } UpdateStyle(xnode, ct); if (name == "DefaultControl") { //foreach (KeyValuePair<String, ctlUserPanel> pair in Controls) foreach (KeyValuePair<String, Control> pair in Controls) { if (pair.Value is ctlUserPanel) { ctlUserPanel ctl = (ctlUserPanel)pair.Value; ctl.ApplyStyle(DefaultControlStyle); } else { // apply the style by recursing through the object ApplyStyleRecurse(pair.Value, DefaultControlStyle); } } } }
void HandleButtonStyle(XmlNode xnode) { string name = GetStrParam(xnode, "name", "DefaultButton"); ControlStyle bt = GetControlStyle(name); if (bt == null) { bt = new ControlStyle(); bt.Name = name; ControlStyles[name] = bt; bt.SetDefault(); } UpdateStyle(xnode, bt); if (name == "DefaultButton") { foreach (KeyValuePair<String, ctlImageButton> pair in Buttons) { ctlImageButton butt = pair.Value; butt.ApplyStyle(bt); } } }
public GuiConfig() { BgndDecorList = new List<DecorItem>(); FgndDecorList = new List<DecorItem>(); //Controls = new Dictionary<string, ctlUserPanel>(); Controls = new Dictionary<string, Control>(); Buttons = new Dictionary<string, ctlImageButton>(); ControlStyles = new Dictionary<string, ControlStyle>(); DecorItems = new Dictionary<string,DecorItem>(); Res = global::UV_DLP_3D_Printer.Properties.Resources.ResourceManager; Plugin = null; DefaultControlStyle = new ControlStyle(); DefaultControlStyle.Name = "DefaultControl"; DefaultControlStyle.SetDefault(); ControlStyles[DefaultControlStyle.Name] = DefaultControlStyle; }
void HandleControlStyle(XmlNode xnode) { string name = GetStrParam(xnode, "name", "DefaultControl"); ControlStyle ct = GetControlStyle(name); if (ct == null) { ct = new ControlStyle(); ct.Name = name; ControlStyles[name] = ct; ct.SetDefault(); } UpdateStyle(xnode, ct); if (name == "DefaultControl") { foreach (KeyValuePair<String, ctlUserPanel> pair in Controls) { ctlUserPanel ctl = pair.Value; ctl.ApplyStyle(DefaultControlStyle); } } }