static void Main(string[] args) { TVMPreferences tvmPrefs = new TVMPreferences { contrastTheme = "yellow-black", fontSize = "big", fontFace = "Comic Sans", buttonSize = "big", timeOut = "long", language = "de" }; TVMSettings t2 = new TVMSettings(tvmPrefs); string x = JsonConvert.SerializeObject(t2); Console.WriteLine(x + " ConsoleGET.Program"); x = "{\"de.fraunhofer.iao.C4A-TVM\":{\"contrastTheme\": \"yellow-black\", \"fontSize\": \"default\", \"fontFace\": \"default\", \"buttonSize\": \"default\", \"timeOut\": \"default\", \"language\": \"default\"}}"; Console.WriteLine("input string" + x); TVMSettings t1 = JsonConvert.DeserializeObject<TVMSettings>(x); printTVMSettings(t1); Console.ReadLine(); }
public TVMPreferences applyPrefsToUi() { //question web app or scanner TVMPreferences t = new TVMPreferences{ contrastTheme = "yellow-black", fontSize = "big", fontFace = "Comic Sans", buttonSize = "big", timeOut = "long", language = "de" }; return t; }
public TVMSettings(TVMPreferences tvmPreferences) { this.TVMPreferences = tvmPreferences; }