private void btnOpenErrorPrompt_Click(object sender, EventArgs e)
        {
            BLIO.Log("btnOpenErrorPrompt_Click");
            ExceptionPopup pop = new ExceptionPopup(new ReminderException("Test", null), "This is a test error in debug mode");

            pop.Show();
        }
Exemple #2
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            try
            {
                if (lvReminders.CheckedItems.Count > 0)
                {
                    foreach (Reminder rem in GetSelectedRemindersFromListview())
                    {
                        if (!File.Exists(rem.SoundFilePath)) //when you import reminders on another device, the path to the file might not exist. remove it.
                        {
                            rem.SoundFilePath = "";
                        }

                        BLIO.Log("Pushing reminder with id " + rem.Id + " To the database");
                        BLReminder.PushReminderToDatabase(rem);
                    }

                    //Let remindme know that the listview should be refreshed
                    BLIO.Log("Sending message WM_RELOAD_REMINDERS ....");
                    PostMessage((IntPtr)HWND_BROADCAST, WM_RELOAD_REMINDERS, new IntPtr(0xCDCD), new IntPtr(0xEFEF));
                    this.Close();
                }
                else
                {
                    RemindMeMessageFormManager.MakeMessagePopup("Please select at least one reminder.", 3);
                }
            }
            catch (Exception ex)
            {
                ExceptionPopup pop = new ExceptionPopup(ex, "Error inserting reminders");
                pop.Show();
                BLIO.WriteError(ex, "Error inserting reminders");
            }
        }