Ejemplo n.º 1
0
        public static void SaveSettings(Form form, XmlNode parentNode, string key)
        {
            var emptyNodeAlways = Xml.GetEmptyNodeAlways(Xml.GetNodeAlways(parentNode, "ToolStripConfiguration"), key);

            Xml.SetNewValue(emptyNodeAlways, "Size", IconSize.ToString(CultureInfo.InvariantCulture));
            Xml.SetNewValue(emptyNodeAlways, "Locked", Locked.ToString());
            Xml.SetNewValue(emptyNodeAlways, "Crosshairs", Crosshairs.ToString());
            Xml.SetNewValue(emptyNodeAlways, "WaveformShown", WaveformShown.ToString());
            foreach (Control control in form.Controls)
            {
                var stripContainer = control as ToolStripContainer;
                if (stripContainer == null)
                {
                    continue;
                }
                WritePanel(emptyNodeAlways, stripContainer.TopToolStripPanel, "TopToolStripPanel");
                WritePanel(emptyNodeAlways, stripContainer.LeftToolStripPanel, "LeftToolStripPanel");
                WritePanel(emptyNodeAlways, stripContainer.RightToolStripPanel, "RightToolStripPanel");
                WritePanel(emptyNodeAlways, stripContainer.BottomToolStripPanel, "BottomToolStripPanel");
                break;
            }
        }