public MessageForm(Note item) { try { _defaultSound = System.IO.File.ReadAllText("config.dat"); } catch { } InitializeComponent(); if (item.Signal != null) { if (item.Signal.Length > 0) { try { Audio.Play(item.Signal); } catch { try { Audio.Play(_defaultSound); } catch { Audio.Play(BASIC_SOUND); } } } else { try { Audio.Play(_defaultSound); } catch { Audio.Play(BASIC_SOUND); } } } else { try { Audio.Play(_defaultSound); } catch { Audio.Play(BASIC_SOUND); } } _titleLabel.Text = item.Title; _noteTextbox.Text = item.Text; }
public void Add(Note note) { _noteCollection.Add(note); Update(); }
private void _showOnInps() { if (_dateNotesList.SelectedIndices.Count == 0) return; int id = _dateNotesList.SelectedIndices[0]; Note n=_manager.GetNote(id,_calendar.SelectionStart); _dateTimeSetter.Value = n.Time; _timeTextBox.Text = n.Time.Hour + ":" + n.Time.Minute; _titleTextBox.Text = n.Title; _currentNote = n; if (n.Signal != null) _signalTextBox.Text = n.Signal; _noteTextBox.Text = n.Text; }
private void _btnAddNote_Click(object sender, EventArgs e) { _showPlanGroupBox(true); _currentNote = new Note(); _isAddNoteMode = true; }