예제 #1
0
        private void ErrorPopup_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                string mess = "Oops! An error has occured. Here's the details:\r\n\r\n" + ex.ToString();

                if (ex is ReminderException)
                {
                    ReminderException theException = (ReminderException)ex;
                    theException.Reminder.Note = "Removed for privacy reasons";
                    theException.Reminder.Name = "Removed for privacy reasons";

                    mess += "\r\n\r\nThis exception is an ReminderException! Let's see if we can figure out what's wrong with it....\r\n";
                    mess += "ID:    " + theException.Reminder.Id + "\r\n";
                    mess += "Deleted:    " + theException.Reminder.Deleted + "\r\n";
                    mess += "Date:  " + theException.Reminder.Date + "\r\n";
                    mess += "RepeatType:    " + theException.Reminder.RepeatType + "\r\n";
                    mess += "Enabled:   " + theException.Reminder.Enabled + "\r\n";
                    mess += "DayOfMonth:    " + theException.Reminder.DayOfMonth + "\r\n";
                    mess += "EveryXCustom:  " + theException.Reminder.EveryXCustom + "\r\n";
                    mess += "RepeatDays:    " + theException.Reminder.RepeatDays + "\r\n";
                    mess += "SoundFilePath: " + theException.Reminder.SoundFilePath + "\r\n";
                    mess += "PostponeDate:  " + theException.Reminder.PostponeDate + "\r\n";
                    mess += "Hide:  " + theException.Reminder.Hide + "\r\n\r\n";

                    mess += "=== Displaying date culture info, so you might be able to re-create the reminder ===\r\n";
                    mess += "Current culture DisplayName: " + CultureInfo.CurrentCulture.DisplayName + "\r\n";
                    mess += "Current culture ShortTimePattern: " + CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern + "\r\n";
                    mess += "Current culture ShortDatePattern: " + CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern + "\r\n";
                    mess += "Current culture ToString(): " + CultureInfo.CurrentCulture.ToString() + "\r\n";
                }
                BLOnlineDatabase.AddException(ex, DateTime.UtcNow, BLIO.GetLogTxtPath());
            }
            catch { }
        }
예제 #2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                string textBoxText = tbNote.Text; //Cant access tbNote in a thread. save the text in a variable instead
                string customMess  = "[CUSTOM USER INPUT]\r\n" + textBoxText + "\r\n\r\n---------------Default below--------------------\r\nOops! An error has occured. Here's the details:\r\n\r\n" + ex.ToString();

                if (ex is ReminderException)
                {
                    ReminderException theException = (ReminderException)ex;
                    if (theException.Reminder != null)
                    {
                        theException.Reminder.Note = "Removed for privacy reasons";
                        theException.Reminder.Name = "Removed for privacy reasons";

                        customMess += "\r\n\r\nThis exception is an ReminderException! Let's see if we can figure out what's wrong with it....\r\n";
                        customMess += "ID:    " + theException.Reminder.Id + "\r\n";
                        customMess += "Deleted:    " + theException.Reminder.Deleted + "\r\n";
                        customMess += "Date:  " + theException.Reminder.Date + "\r\n";
                        customMess += "RepeatType:    " + theException.Reminder.RepeatType + "\r\n";
                        customMess += "Enabled:   " + theException.Reminder.Enabled + "\r\n";
                        customMess += "DayOfMonth:    " + theException.Reminder.DayOfMonth + "\r\n";
                        customMess += "EveryXCustom:  " + theException.Reminder.EveryXCustom + "\r\n";
                        customMess += "RepeatDays:    " + theException.Reminder.RepeatDays + "\r\n";
                        customMess += "SoundFilePath: " + theException.Reminder.SoundFilePath + "\r\n";
                        customMess += "PostponeDate:  " + theException.Reminder.PostponeDate + "\r\n";
                        customMess += "Hide:  " + theException.Reminder.Hide + "\r\n";
                    }
                }
                RemindMeMessageFormManager.MakeMessagePopup("Feedback sent.\r\nThank you for taking the time!", 5);
                BLOnlineDatabase.AddException(ex, DateTime.UtcNow, BLIO.GetLogTxtPath());
                this.Dispose();
            }
            catch { }


            //Set this boolean to true so that when this popup closes, we won't try to send another e-mail
            sentCustomEmail = true;
        }