Exemplo n.º 1
0
 public static void Initialize()
 {
     IntValue    = new SettingsValueKey <int>("Test/Simple/IntValue", 10);
     DoubleValue = new SettingsValueKey <double>("Test/Simple/DoubleValue", 3.14);
     StringValue = new SettingsValueKey <string>("Test/Simple/StringValue", "Test string");
     Console.WriteLine(@"Static settings keys initialized (ValueSettingsKeys)");
 }
Exemplo n.º 2
0
 public static void Initialize()
 {
     IntValue = new SettingsValueKey<int>("Test/Simple/IntValue", 10);
     DoubleValue = new SettingsValueKey<double>("Test/Simple/DoubleValue", 3.14);
     StringValue = new SettingsValueKey<string>("Test/Simple/StringValue", "Test string");
     Console.WriteLine(@"Static settings keys initialized (ValueSettingsKeys)");
 }
Exemplo n.º 3
0
 public static void Initialize()
 {
     IntList    = new SettingsValueKey <List <int> >("Test/Lists/IntList", TestSettings.SettingsGroup, Enumerable.Empty <int>().ToList());
     DoubleList = new SettingsValueKey <List <double> >("Test/Lists/DoubleList", TestSettings.SettingsGroup, new[] { 2.0, 6.0, 9.0 }.ToList());
     StringList = new SettingsValueKey <List <string> >("Test/Lists/StringList", TestSettings.SettingsGroup, new[] { "String 1", "String 2", "String 3" }.ToList());
     Console.WriteLine(@"Static settings keys initialized (ListSettingsKeys)");
 }
Exemplo n.º 4
0
 public static void Initialize()
 {
     IntList = new SettingsValueKey<List<int>>("Test/Lists/IntList", TestSettings.SettingsGroup, Enumerable.Empty<int>().ToList());
     DoubleList = new SettingsValueKey<List<double>>("Test/Lists/DoubleList", TestSettings.SettingsGroup, new[] { 2.0, 6.0, 9.0 }.ToList());
     StringList = new SettingsValueKey<List<string>>("Test/Lists/StringList", TestSettings.SettingsGroup, new[] { "String 1", "String 2", "String 3" }.ToList());
     Console.WriteLine(@"Static settings keys initialized (ListSettingsKeys)");
 }
Exemplo n.º 5
0
 public void SetValue <T>(SettingsValueKey <T> key, T value)
 {
     key.SetValue(value, profile);
 }
Exemplo n.º 6
0
 public T GetValue <T>(SettingsValueKey <T> key)
 {
     return(key.GetValue(true, profile));
 }