public TaskEdit(TaskList taskList, Task task) { this.taskList = taskList; this.task = task; InitializeComponent(); this.populateFields(); }
public void SaveTasks(TaskList.SerializedForm serializedForm) { JsonWriter writer = new JsonWriter(); writer.PrettyPrint = true; JsonMapper.ToJson(serializedForm, writer); string json = writer.ToString(); StreamWriter sr = new StreamWriter(this.taskFile); 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; }