private void FontSkinManager()
        {
            if (!File.Exists(VarGlobale.SkinFontPath))
            {
                Dictionary <string, Font> ResXData = new Dictionary <string, Font>();
                foreach (ToolStripMenuItem item in menuStrip1.Items)
                {
                    ResXData.Add(item.Name, item.Font);
                }
                RessManager.SaveRess(ResXData, VarGlobale.SkinFontPath);
            }
            else
            {
                Dictionary <string, Font> Result = RessManager.LoadRess(VarGlobale.SkinFontPath);
                string Key = string.Empty;

                /* foreach (KeyValuePair<string, Font> item in Result)
                 * {
                 *   menuStrip1.Items[item.Key.ToString()].Font = item.Value;
                 * }
                 *
                 * SetFontFam(this, menuStrip1.Items[0].Font.FontFamily);*/
                if (Result.Count > 0)
                {
                    foreach (ToolStripItem item in menuStrip1.Items)
                    {
                        item.Font = Result[menuStrip1.Items[0].Name];
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private void LoadFont()
 {
     if (File.Exists(VarGlobale.SkinFontPath))
     {
         BtnChangeFont.Enabled = true;
         Dictionary <string, Font> Result = RessManager.LoadRess(VarGlobale.SkinFontPath);
         ResXData.Clear();
         foreach (KeyValuePair <string, Font> item in Result)
         {
             ResXData.Add(item.Key.ToString(), item.Value);
             fontDialog1.Font   = item.Value;
             LblFontChoice.Font = item.Value;
             LblFontChoice.Text = item.Value.ToString();
         }
     }
 }