public void SaveSettings(Settings.SerializedForm serializedForm) { JsonWriter writer = new JsonWriter(); writer.PrettyPrint = true; JsonMapper.ToJson(serializedForm, writer); string json = writer.ToString(); StreamWriter sr = new StreamWriter(this.configFile); sr.Write(json); sr.Close(); }
public Main() { InitializeComponent(); this.fileHandler = FileHandler.Instance; this.taskList = new TaskList(this.fileHandler.LoadTasks()); this.settings = new Settings(this.fileHandler.LoadSettings()); this.initSettings(); this.populateProjects(); this.alarm = new SoundPlayer(this.fileHandler.AlarmFile); this.updateIconText(); this.notifyIcon.Visible = this.settings.Icon; }