示例#1
0
        private void SetCurrentColor(Color c)
        {
            FieldInfo toEdit = typeof(VisualsSettings).GetRuntimeField(SelectedColorParameter);

            toEdit?.SetValue(editSettings.VisualSettings, c);
            VisualsSettings.ApplyVisuals(editSettings.VisualSettings);
        }
示例#2
0
 private static void LoadSettings()
 {
     try
     {
         RuntimeSettings = JsonUtilities.Deserialize <ProgramSettings>(File.ReadAllText(ProgramSettings.SaveSettingsDirectory + @"\settings.txt"));
         VisualsSettings.ApplyVisuals(RuntimeSettings.VisualSettings);
     }
     catch { Reset(); }
 }
示例#3
0
 public static void Reset()
 {
     RuntimeSettings = new ProgramSettings();
     VisualsSettings.ApplyVisuals(RuntimeSettings.VisualSettings);
     SaveSettings();
 }