Ejemplo n.º 1
0
 public static bool RegisterSettings(SettingsBase settingsClass, string uniqueID)
 {
     if (!AllSettingsDict.ContainsKey(uniqueID))
     {
         AllSettingsDict.Add(uniqueID, settingsClass);
         _modSettingsVMs = null;
         return(true);
     }
     else
     {
         //TODO:: When debugging log is finished, show a message saying that the key already exists
         return(false);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers the settings class with the SettingsDatabase for use in the settings menu.
 /// </summary>
 /// <param name="settings">Intance of the settings object to be registered with the SettingsDatabase.</param>
 /// <returns>Returns true if successful. Returns false if the object's ID key is already present in the SettingsDatabase.</returns>
 public static bool RegisterSettings(SettingsBase settings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
     if (!AllSettingsDict.ContainsKey(settings.ID))
     {
         AllSettingsDict.Add(settings.ID, settings);
         _modSettingsVMs = null;
         return(true);
     }
     else
     {
         //TODO:: When debugging log is finished, show a message saying that the key already exists
         return(false);
     }
 }