private void recentReminders(int index) { Reminder reminder = new Reminder(); ArrayList reminders = new ArrayList(); reminders = reminder.reminders(); try { ArrayList remindElem = (ArrayList)reminders[index]; string name = remindElem[0].ToString(); lblRecentReminders.Text = name; tmReminder_counter = index + 1; } catch (Exception e) { tmReminder_counter = 0; } }
private void save_Click(object sender, EventArgs e) { Reminder svn = new Reminder(); svn.name = txtTitle.Text; svn.note = rtxtNote.Text; svn.date = dtDateTime.Value; svn.time = tmTime.Value; if (svn.save()) { if (speechAllowed) { speechObject.speakText(txtTitle.Text + " was saved successfully"); } MessageBox.Show(txtTitle.Text + " was saved successfully"); } else { if (speechAllowed) { speechObject.speakText("It seems some fields were left blank"); } MessageBox.Show("An Error Occurred, Please Try Again"); } }