Exemplo n.º 1
0
 /// <summary>
 /// LoadSkin
 /// </summary>
 /// <param name="name"></param>
 public static void LoadSkin(string name)
 {
     Skin skin = new Skin(name);
     lock (Configuration.SL)
     {
         Configuration.SL.Add(skin);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Load skin
 /// </summary>
 /// <returns></returns>
 public static bool LoadSkin()
 {
     Configuration.SL.Clear();
     Configuration.SL.Add(new Skin());
     if (Configuration.Kernel.Safe)
     {
         DebugLog("Skipping load of skins because of safe mode");
     }
     else
     {
         DebugLog("Loading skins");
         if (Directory.Exists(System.Windows.Forms.Application.StartupPath + Path.DirectorySeparatorChar + SkinPath))
         {
             string[] skin = Directory.GetFiles(System.Windows.Forms.Application.StartupPath + Path.DirectorySeparatorChar + SkinPath);
             {
                 foreach (string file in skin)
                 {
                     if (file.EndsWith(".ps", StringComparison.Ordinal))
                     {
                         Skin curr = new Skin(file);
                         if (curr == null)
                         {
                             continue;
                         }
                         Configuration.SL.Add(curr);
                     }
                 }
             }
         }
     }
     return true;
 }