Ejemplo n.º 1
0
        public void LoadSettings()
        {
            using (Settings xmlreader = new MPSettings())
            {
                string strTmp = "";
                _fontName   = xmlreader.GetValueAsString("subtitles", "fontface", "Arial");
                m_iFontSize = xmlreader.GetValueAsInt("subtitles", "fontsize", 18);
                m_bBold     = xmlreader.GetValueAsBool("subtitles", "bold", true);
                strTmp      = xmlreader.GetValueAsString("subtitles", "color", "ffffff");
                m_iColor    = Convert.ToInt64(strTmp, 16);

                m_iShadow = xmlreader.GetValueAsInt("subtitles", "shadow", 5);

                FontStyle style = FontStyle.Regular;
                if (m_bBold)
                {
                    style = FontStyle.Bold;
                }
                m_font = new GUIFont("subFont", _fontName, m_iFontSize, style);
                m_font.Load();
                m_font.InitializeDeviceObjects();
            }
        }