Пример #1
0
		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();
		}
Пример #2
0
		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;
        }