Пример #1
0
 public void SetMode()
 {
     if (ModiList.ContainsKey(PluginConfig.Instance.Modus))
     {
         this.ActiveMode = ModiList[PluginConfig.Instance.Modus];
     }
     else
     {
         this.ActiveMode = new DefaultModus();
     }
 }
Пример #2
0
 public void LoadModes()
 {
     foreach (string obj in Utilities.GetAllClasses("LovenseBSControl.Classes.Modus"))
     {
         if (obj.Equals("Modus") || obj.Equals("DefaultModus"))
         {
             continue;
         }
         Type modi = Type.GetType("LovenseBSControl.Classes.Modus." + obj);
         if (modi != null)
         {
             DefaultModus activeObj = Activator.CreateInstance(modi) as DefaultModus;
             AvailableModi.Add(activeObj.GetModusName());
             ModiList.Add(activeObj.GetModusName(), activeObj);
         }
     }
 }