Esempio n. 1
0
        protected void LoadFromXml(string path)
        {
            RscStore store = new RscStore();

            System.IO.Stream strm = store.GetReaderStream(path);

            XDocument xDoc = XDocument.Load(strm, LoadOptions.None);

            strm.Close();

            try
            {
                XElement xRoot = xDoc.Element("ThemeColors");

                ListZebraBack1 = RscDecode.HexaStringToColor(xRoot.Element("ListZebraBack1").Value);
                ListZebraBack2 = RscDecode.HexaStringToColor(xRoot.Element("ListZebraBack2").Value);
                ListZebraFore  = RscDecode.HexaStringToColor(xRoot.Element("ListZebraFore").Value);

                TreeDescBack      = RscDecode.HexaStringToColor(xRoot.Element("TreeDescBack").Value);
                TreeDescFore      = RscDecode.HexaStringToColor(xRoot.Element("TreeDescFore").Value);
                TreeLeafBack      = RscDecode.HexaStringToColor(xRoot.Element("TreeLeafBack").Value);
                TreeLeafFore      = RscDecode.HexaStringToColor(xRoot.Element("TreeLeafFore").Value);
                TreeContainerBack = RscDecode.HexaStringToColor(xRoot.Element("TreeContainerBack").Value);
                TreeContainerFore = RscDecode.HexaStringToColor(xRoot.Element("TreeContainerFore").Value);

                TextDarkBack  = RscDecode.HexaStringToColor(xRoot.Element("TextDarkBack").Value);
                TextDarkFore  = RscDecode.HexaStringToColor(xRoot.Element("TextDarkFore").Value);
                TextLightBack = RscDecode.HexaStringToColor(xRoot.Element("TextLightBack").Value);
                TextLightFore = RscDecode.HexaStringToColor(xRoot.Element("TextLightFore").Value);

                GalleryItemBack   = RscDecode.HexaStringToColor(xRoot.Element("GalleryItemBack").Value);
                GalleryItemBorder = RscDecode.HexaStringToColor(xRoot.Element("GalleryItemBorder").Value);
                GalleryItemFore   = RscDecode.HexaStringToColor(xRoot.Element("GalleryItemFore").Value);

                DialogLightBack = RscDecode.HexaStringToColor(xRoot.Element("DialogLightBack").Value);

                ToolBarLightBack = RscDecode.HexaStringToColor(xRoot.Element("ToolBarLightBack").Value);
                ToolBarLightFore = RscDecode.HexaStringToColor(xRoot.Element("ToolBarLightFore").Value);

                AppTitleBack = RscDecode.HexaStringToColor(xRoot.Element("AppTitleBack").Value);
                AppTitleFore = RscDecode.HexaStringToColor(xRoot.Element("AppTitleFore").Value);

                AppStatusBack = RscDecode.HexaStringToColor(xRoot.Element("AppStatusBack").Value);
                AppStatusFore = RscDecode.HexaStringToColor(xRoot.Element("AppStatusFore").Value);

                IconBack   = RscDecode.HexaStringToColor(xRoot.Element("IconBack").Value);
                IconBorder = RscDecode.HexaStringToColor(xRoot.Element("IconBorder").Value);
                IconFore   = RscDecode.HexaStringToColor(xRoot.Element("IconFore").Value);

                ThemeBack = RscDecode.HexaStringToColor(xRoot.Element("ThemeBack").Value);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }