public void Apply() { if (last_selection != null) { last_selection.mask_name = this.textBoxMask.Text; last_selection.depressed_name = this.textBoxNormal.Text; last_selection.pressed_name = this.textBoxPressed.Text; last_selection.glare_name = this.textBoxGlare.Text; last_selection.highlight_depressed_name = this.textBoxHighlightNormal.Text; last_selection.highlight_pressed_name = this.textBoxHighlightPressed.Text; if (this.radioButton1.Checked) { last_selection.glare_type = GlareSetData.GlareType.noshade; } else if (this.radioButton2.Checked) { last_selection.glare_type = GlareSetData.GlareType.monoshade; } else if (this.radioButton3.Checked) { last_selection.glare_type = GlareSetData.GlareType.multishade; } last_selection.SetGlareMulticolor(); } }
internal static bool Load(XPathNavigator r) { if (r.NodeType == XPathNodeType.Element) { switch (r.Name) { case "glareset": bool everokay = false; bool okay; GlareSetData gsd = null; for (okay = r.MoveToFirstAttribute(); okay; okay = r.MoveToNextAttribute()) { switch (r.Name) { case "name": gsd = core_common.GetGlareSetData(r.Value); break; case "mask": if (gsd != null) { gsd.mask_name = r.Value; } break; case "pressed": if (gsd != null) { gsd.pressed_name = r.Value; } break; case "depressed": if (gsd != null) { gsd.depressed_name = r.Value; } break; case "highlight_pressed": if (gsd != null) { gsd.highlight_pressed_name = r.Value; } break; case "highlight_depressed": if (gsd != null) { gsd.highlight_depressed_name = r.Value; } break; case "glare": if (gsd != null) { gsd.glare_name = r.Value; } break; case "shade": switch (r.Value) { case "multi": gsd.glare_type = GlareType.multishade; break; case "mono": gsd.glare_type = GlareType.monoshade; break; case "none": gsd.glare_type = GlareType.noshade; break; } break; } everokay = true; } gsd.SetGlareMulticolor(); if (everokay) { r.MoveToParent(); } return(true); } } return(false); }