SetString() 공개 메소드

public SetString ( string section, string key, string define_value ) : void
section string
key string
define_value string
리턴 void
예제 #1
0
 public static void Save()
 {
     UserSetting.SaveSettings();
     using (ConfigFile file = new ConfigFile(Application.dataPath + "/Configuration/Settings.ini", ' ', false))
     {
         file.Load();
         file.SetString("profile", ProfileName);
     }
 }
예제 #2
0
 public static void Save()
 {
     if (!wasLoaded)
     {
         return;
     }
     TryApplyPublicSettings();
     using (ConfigFile config = new ConfigFile(Application.dataPath + "/Configuration/Visuals.ini", ':', false))
     {
         config.SetString("font", FontName);
         config.SetString("background", BackgroundHex);
         config.SetInt("backgroundTransparency", BackgroundTransparency);
         config.SetString("textNormal", TextColors[0]);
         config.SetString("textHover", TextColors[1]);
         config.SetString("textActive", TextColors[2]);
         config.SetString("textOnNormal", TextColors[3]);
         config.SetString("textOnHover", TextColors[4]);
         config.SetString("textOnActive", TextColors[5]);
         config.SetString("normalVector", TextureDeltas[0].Vector3ToString());
         config.SetString("hoverVector", TextureDeltas[1].Vector3ToString());
         config.SetString("activeVector", TextureDeltas[2].Vector3ToString());
         config.SetString("onNormalVector", TextureDeltas[3].Vector3ToString());
         config.SetString("onHoverVector", TextureDeltas[4].Vector3ToString());
         config.SetString("onActiveVector", TextureDeltas[5].Vector3ToString());
         config.SetBool("useVectors", UseVectors);
         config.SetString("colorNormal", TextureColors[0].ColorToString());
         config.SetString("colorHover", TextureColors[1].ColorToString());
         config.SetString("colorActive", TextureColors[2].ColorToString());
         config.SetString("colorOnNormal", TextureColors[3].ColorToString());
         config.SetString("colorOnHover", TextureColors[4].ColorToString());
         config.SetString("colorOnActive", TextureColors[5].ColorToString());
     }
 }