Exemple #1
0
    public void a(string A_0, bool A_1)
    {
        this.h();
        string[] strArray = A_0.Split(new char[] { '.' });
        string   str      = strArray[strArray.Length - 1].ToLowerInvariant();
        dy       dy       = null;

        foreach (dy dy2 in this.c)
        {
            if (dy2.b.a == str)
            {
                dy = dy2;
                break;
            }
        }
        if (dy != null)
        {
            this.a = dy;
            try
            {
                this.a.a.LoadProfile(A_0, A_1);
            }
            catch
            {
            }
        }
    }
Exemple #2
0
 public void h()
 {
     if (this.a != null)
     {
         this.k();
         try
         {
             this.a.a.UnloadProfile();
         }
         catch
         {
         }
         this.a = null;
     }
 }
Exemple #3
0
    public void g()
    {
        RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Decal\LootPlugins");

        if (key != null)
        {
            foreach (string str in key.GetSubKeyNames())
            {
                LootPluginBase base2;
                string         str2     = "";
                string         path     = "";
                string         str4     = "";
                Assembly       assembly = null;
                try
                {
                    RegistryKey key2 = key.OpenSubKey(str);
                    if (((key2.GetValueKind("") != RegistryValueKind.String) || (key2.GetValueKind("Assembly") != RegistryValueKind.String)) || ((key2.GetValueKind("Object") != RegistryValueKind.String) || (key2.GetValueKind("Path") != RegistryValueKind.String)))
                    {
                        continue;
                    }
                    path = Path.Combine((string)key2.GetValue("Path"), (string)key2.GetValue("Assembly"));
                    str4 = (string)key2.GetValue("");
                    str2 = (string)key2.GetValue("Object");
                    if (!File.Exists(path))
                    {
                        continue;
                    }
                    AssemblyName assemblyRef = new AssemblyName {
                        CodeBase = path
                    };
                    assembly = Assembly.Load(assemblyRef);
                    if (assembly == null)
                    {
                        continue;
                    }
                    Type type = assembly.GetType(str2);
                    if ((type == null) || !type.IsSubclassOf(typeof(LootPluginBase)))
                    {
                        continue;
                    }
                    base2 = (LootPluginBase)Activator.CreateInstance(type);
                    if (base2 == null)
                    {
                        continue;
                    }
                }
                catch
                {
                    continue;
                }
                dy item = new dy();
                this.c.Add(item);
                item.d    = str4;
                item.e    = path;
                item.c    = assembly;
                item.a    = base2;
                base2.b   = new VTHost();
                base2.b.a = item;
                base2.a   = new FlexibleViewSystem();
                base2.a.a = item;
                try
                {
                    item.b = base2.Startup();
                    if (item.b == null)
                    {
                        throw new Exception();
                    }
                }
                catch
                {
                    try
                    {
                        base2.Shutdown();
                    }
                    catch
                    {
                    }
                    this.c.Remove(item);
                    item.a.b.a = null;
                    item.a.a.a = null;
                }
            }
        }
    }