Example #1
0
 protected virtual void Translate()
 {
     selectRingingSoundButton.Text     = TranslationProvider.Tr("selectRingingSoundButton");
     serviceStatusGroupBox.Text        = TranslationProvider.Tr("serviceStatusGroupBox");
     autostartEnabledCheckbox.Text     = TranslationProvider.Tr("autostartServiceCheckBox");
     serviceEnabledcheckBox.Text       = TranslationProvider.Tr("serviceEnabledCheckBox");
     ringingGroupBox.Text              = TranslationProvider.Tr("ringingGroupBox");
     currentRingingSoundNameLabel.Text = TranslationProvider.Tr("currentRingingSoundNameLabel");
     testRinging.Text           = TranslationProvider.Tr("testRingingButton");
     snoozeGroupBox.Text        = TranslationProvider.Tr("snoozeGroupBox");
     snoozeEnabledcheckBox.Text = TranslationProvider.Tr("snoozeEnabledCheckBox");
     label3.Text = TranslationProvider.Tr("snoozeIntervalLabelForNumericCheckBox");
     snoozeIntervalNumbericBox.AccessibleName = TranslationProvider.Tr("snoozeIntervalLabelForNumericCheckBox");
     beeperGroupBox.Text        = TranslationProvider.Tr("beeperGroupBox");
     beeperEnabledcheckBox.Text = TranslationProvider.Tr("beeperEnabledCheckBox");
     label1.Text = TranslationProvider.Tr("beepIntervalLabelForNumericCheckBox");
     beepIntervalNumbericBox.AccessibleName = TranslationProvider.Tr("beepIntervalLabelForNumericCheckBox");
     selectBeeperSoundButton.Text           = TranslationProvider.Tr("selectBeeperSoundButton");
     currentBeeperSoundNameLabel.Text       = TranslationProvider.Tr("currentBeeperSoundNameLabel");
     testBeeper.Text            = TranslationProvider.Tr("testBeeperButton");
     dataMigrationGroupBox.Text = TranslationProvider.Tr("dataMigrationGroupBox");
     exportButton.Text          = TranslationProvider.Tr("exportButton");
     importButton.Text          = TranslationProvider.Tr("importButton");
     okButton.Text     = TranslationProvider.Tr("okButton");
     cancelButton.Text = TranslationProvider.Tr("cancelButton");
     Text = TranslationProvider.Tr("audioReminderSettingsFormTitle");
     currentRingingSoundNameBox.AccessibleName = TranslationProvider.Tr("currentRingingSoundNameLabel");
     currentBeeperSoundNameBox.AccessibleName  = TranslationProvider.Tr("currentBeeperSoundNameLabel");
     languageGroupBox.Text = TranslationProvider.Tr("languageGroupBox");
     languageButton.Text   = TranslationProvider.Tr("languageButton");
 }
Example #2
0
 protected virtual void Translate()
 {
     Text        = TranslationProvider.Tr("helpFormTitle");
     label1.Text = TranslationProvider.Tr("userManualLabel");
     visitProjectWebsiteButton.Text = TranslationProvider.Tr("visitPageButton");
     backButton.Text = TranslationProvider.Tr("backButton");
 }
Example #3
0
        protected virtual void Translate()
        {
            eventNameLabel.Text        = TranslationProvider.Tr("reminderNameLabel");
            dateLabel.Text             = TranslationProvider.Tr("dateOfFirstOccuranceLabelForDatetimePicker");
            eventDetailsGroupBox.Text  = TranslationProvider.Tr("eventDetailsGroupBox");
            eventDescriptionLabel.Text = TranslationProvider.Tr("eventDescriptionLabel");
            scheduledTimeGroupBox.Text = TranslationProvider.Tr("scheduledTimeGroupBox");
            timeLabel.Text             = TranslationProvider.Tr("timeLabelForNumericBox");
            repeatPeriodGroupBox.Text  = TranslationProvider.Tr("repeatPeriodGroupBox");
            repeatDaysLabel.Text       = TranslationProvider.Tr("repeatWeeklyLabelForCheckedListBox");
            repeatMonthlyCheckBox.Text = TranslationProvider.Tr("repeatMonthlyCheckBox");
            repeatYearlyCheckBox.Text  = TranslationProvider.Tr("repeatYearlyCheckBox");
            okButton.Text     = TranslationProvider.Tr("okButton");
            cancelButton.Text = TranslationProvider.Tr("cancelButton");
            reminderNameStringBox.AccessibleName      = TranslationProvider.Tr("reminderNameLabel");
            reminderDescriptionTextbox.AccessibleName = TranslationProvider.Tr("eventDescriptionLabel");
            scheduledDatePicker.AccessibleDescription = TranslationProvider.Tr("scheduledDatePickerAccDes");
            scheduledDatePicker.AccessibleName        = TranslationProvider.Tr("dateOfFirstOccuranceLabelForDatetimePicker");
            hoursNumericBox.AccessibleName            = TranslationProvider.Tr("hoursNumericBoxAccName");
            hoursNumericBox.AccessibleDescription     = TranslationProvider.Tr("hoursNumericBoxAccDes");
            minuteNumbericBox.AccessibleName          = TranslationProvider.Tr("minuteNumbericBoxAccName");
            minuteNumbericBox.AccessibleDescription   = TranslationProvider.Tr("minuteNumbericBoxAccDes");
            Text = TranslationProvider.Tr("createReminderFormTitle");
            repeatWeeklyCheckedListBox.AccessibleName = TranslationProvider.Tr("repeatWeeklyLabelForCheckedListBox");

            repeatWeeklyCheckedListBox.Items[0] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemMonday");
            repeatWeeklyCheckedListBox.Items[1] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemTuesday");
            repeatWeeklyCheckedListBox.Items[2] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemWednesday");
            repeatWeeklyCheckedListBox.Items[3] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemThursday");
            repeatWeeklyCheckedListBox.Items[4] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemFriday");
            repeatWeeklyCheckedListBox.Items[5] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemSaturday");
            repeatWeeklyCheckedListBox.Items[6] = TranslationProvider.Tr("repeatWeeklyCheckedListBoxItemSunday");
        }
Example #4
0
        protected virtual void DeleteAction()
        {
            ReminderEntity reminderToDelete = SelectedReminder;

            if (reminderToDelete == null)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningReminderNotSelectedToDelete"));
                return;
            }

            string       confirmationText   = TranslationProvider.Tr("confirmDeletingDialog") + " " + reminderToDelete.Name + ".";
            DialogResult confirmationResult = MessageBox.Show(confirmationText, "", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (confirmationResult != DialogResult.OK)
            {
                Log.Logger.Information($"Confirmation not given for deleting {reminderToDelete.Name}");
                return;
            }

            bool result = PersistenceAdapter.Delete(reminderToDelete.Name);

            if (result == true)
            {
                HandleRemovingFromListBox(reminderToDelete);
            }
            else
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningSnoozedReminderCannotDelete"));
            }
        }
Example #5
0
        protected virtual void EditAction()
        {
            ReminderEntity reminderToUpdate = SelectedReminder;

            if (reminderToUpdate == null)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningReminderNotSelectedToEdit"));
                return;
            }

            CreateAndUpdateReminderForm createReminderForm = new CreateAndUpdateReminderForm(PersistenceAdapter, reminderToUpdate);

            createReminderForm.ShowDialog();

            if (createReminderForm.DialogResult != DialogResult.OK)
            {
                Log.Logger.Information($"UpdateReminderForm closed with result NotOk.");
                return;
            }

            var updatedReminder = createReminderForm.CreateOrUpdatedReminder;

            bool result = PersistenceAdapter.Update(reminderToUpdate.Name, updatedReminder);

            if (result == true)
            {
                //using the element in the listbox
                remindersListBox.Items[remindersListBox.SelectedIndex] = updatedReminder;
            }
            else
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningSnoozedReminderCannotModify"));
            }
        }
Example #6
0
 protected virtual void Translate()
 {
     Text            = TranslationProvider.Tr("aboutFormTitle");
     versionBox.Text = TranslationProvider.Tr("versionBox") + " " + version;
     visitProjectWebsiteButton.Text = TranslationProvider.Tr("visitpageButton");
     backButton.Text = TranslationProvider.Tr("backButton");
     creditsBox.Text = TranslationProvider.Tr("creditsTextBoxDescription");
 }
Example #7
0
 public virtual void Translate()
 {
     Text = TranslationProvider.Tr("audioReminderMainMenuFormTitle");
     createReminderButton.Text = TranslationProvider.Tr("createReminderButton");
     remindersButton.Text      = TranslationProvider.Tr("reminderButton");
     settingsButton.Text       = TranslationProvider.Tr("settingsButton");
     helpButton.Text           = TranslationProvider.Tr("helpButton");
     aboutButton.Text          = TranslationProvider.Tr("aboutButton");
 }
Example #8
0
        protected virtual void Translate()
        {
            Text = TranslationProvider.Tr("reminderRingingFormTitle");
            snoozeButton.Text  = TranslationProvider.Tr("snoozeButton");
            dismissButton.Text = TranslationProvider.Tr("dismissButton");

            eventDescriptionLabel.Text = TranslationProvider.Tr("eventDescriptionLabel");
            reminderDescriptionTextbox.AccessibleName = TranslationProvider.Tr("eventDescriptionLabel");
        }
Example #9
0
 protected virtual void Translate()
 {
     Text = TranslationProvider.Tr("reminderListFormTitle");
     deleteButton.Text = TranslationProvider.Tr("deleteButton");
     editButton.Text   = TranslationProvider.Tr("editButton");
     cloneButton.Text  = TranslationProvider.Tr("cloneButton");
     label1.Text       = TranslationProvider.Tr("reminderListBoxDescription");
     remindersListBox.AccessibleDescription = TranslationProvider.Tr("reminderListBoxDescription");
     backButton.Text = TranslationProvider.Tr("backButton");
 }
Example #10
0
        protected virtual void CloneAction()
        {
            if (SelectedReminder == null)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningReminderNotSelectedToClone"));
                return;
            }


            //TODO: add clone dialog
            ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningNotYetImplemented"));
            ReminderEntity clone = (ReminderEntity)SelectedReminder.Clone();

            //TODO: missing validation of backend causes creating duplicate name
            //PersistenceAdapter.Save(clone);
            //remindersListBox.Items.Add(clone);
        }
Example #11
0
        protected virtual bool ValidateInput()
        {
            //TODO DP->SI: add warning if user attempts to create recuring event in future so that one or more occurence of reminder are skipped between now and the scheduled time.
            //Such a reminder would in some way be a contradiction because user violates his own rules. No need to keep track of such an edge case for now.
            //TODO: maybe add validation against special characters in reminder name that would interfere with xml persistence although CDATA elemtns should have some protection already

            DateTime scheduledDateTime = GetDateTimeFromUI();

            if (scheduledDateTime < DateTime.Now)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningReminderElapsed"));
                return(false);
            }

            string reminderName        = reminderNameStringBox.Text;
            bool   reminderNameIsEmpty = string.IsNullOrWhiteSpace(reminderName);

            if (reminderNameIsEmpty)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningMissingReminderName"));
                return(false);
            }

            bool nameSameAsBefore = oldValueOfReminderToBeUpdated?.Name == reminderName;

            if (!nameSameAsBefore && !IsNameAvialable(reminderName))
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningReminderNameAlreadyExists"));
                return(false);
            }

            bool multiplePeriodsChecked = DetermineIfMultiplePeriodsChecked();

            if (multiplePeriodsChecked)
            {
                ErrorDialogUtility.ErrorDialog(TranslationProvider.Tr("warningMultipleReminderPeriodsSelected"));
                return(false);
            }

            Log.Logger.Information($"Reminder '{reminderName}' valid.");
            return(true);
        }