Example #1
0
 public IHttpActionResult GetDisplaySettings()
 {
     try
     {
         var displaySettings = SettingsInit.GetDisplaySettings(context.Server.MapPath(DISPLAY_SETTINGS_PATH));
         if (displaySettings == null)
         {
             return(NotFound());
         }
         return(Ok(displaySettings));
     }
     catch (Exception ex)
     {
         return(BadRequest(string.Concat(ex.ToString(), " ____ ", ex.StackTrace)));
     }
 }
Example #2
0
        private void ApplySettings_()
        {
            //in case there is no mod configuration to load we initialize the settings here, so that the mod menu can be used without errors.
            SettingsInit.init();
            if (settings == null)
            {
                return;
            }

            SettingsStorage.ApplySettings();

            foreach (Action <Mod> listener in applySettingsListeners)
            {
                listener(this);
            }
        }
Example #3
0
 public override void ExposeData()
 {
     base.ExposeData();
     SettingsInit.init();
     SettingsStorage.ExposeData();
 }