Example #1
0
        /// <summary>
        /// makes the popup that shows howmany reminders are set for today
        /// </summary>
        public static void MakeTodaysRemindersPopup()
        {
            int reminderCount = BLReminder.GetTodaysReminders().Count;

            if (BLSettings.IsReminderCountPopupEnabled())
            {
                if (reminderCount > 0)
                {
                    MakeMessagePopup("You have " + reminderCount + " Reminder(s) set for today.", 3);
                }
                else
                {
                    MakeMessagePopup("You have no reminders set for today.", 3);
                }
            }
        }
Example #2
0
        private void UCWindowOverlay_Load(object sender, EventArgs e)
        {
            if (BLSettings.GetSettings() == null)
            {
                Settings set = new Settings();
                set.AlwaysOnTop = alwaysOnTop;
                set.StickyForm  = 0;
                set.EnableHourBeforeReminder = 1;
                set.EnableReminderCountPopup = 1;
                set.EnableQuickTimer         = 1;
                BLSettings.UpdateSettings(set);
            }

            //Since we're not going to change the contents of this combobox anyway, we're just going to do it like this
            if (BLSettings.IsAlwaysOnTop())
            {
                cbPopupType.SelectedItem = cbPopupType.Items[0];
            }
            else
            {
                cbPopupType.SelectedItem = cbPopupType.Items[1];
            }

            cbRemindMeMessages.Checked          = BLSettings.IsReminderCountPopupEnabled();
            cbOneHourBeforeNotification.Checked = BLSettings.IsHourBeforeNotificationEnabled();
            cbQuicktimer.Checked        = BLSettings.GetSettings().EnableQuickTimer == 1;
            cbAdvancedReminders.Checked = BLSettings.GetSettings().EnableAdvancedReminders == 1;

            Hotkeys timerKey = BLHotkeys.TimerPopup;

            foreach (string m in timerKey.Modifiers.Split(','))
            {
                tbTimerHotkey.Text += m + " + ";
            }
            tbTimerHotkey.Text += timerKey.Key;

            //Fill the combobox to select a timer popup sound with data
            FillSoundCombobox();
            //Set the item the user selected as text
            string def = BLSettings.GetSettings().DefaultTimerSound;

            if (def == null) //User has no default sound combobox
            {
                foreach (ComboBoxItem itm in cbSound.Items)
                {
                    if (itm.Text.ToLower().Contains("unlock")) //Set the default timer sound to windows unlock
                    {
                        Songs    sng = (Songs)itm.Value;
                        Settings set = BLSettings.GetSettings();
                        set.DefaultTimerSound = sng.SongFilePath;
                        BLSettings.UpdateSettings(set);
                    }
                }
            }
            if (BLSettings.GetSettings().DefaultTimerSound == null)//Still null? well damn.
            {
                return;
            }

            cbSound.Items.Add(new ComboBoxItem(Path.GetFileNameWithoutExtension(BLSettings.GetSettings().DefaultTimerSound), BLSongs.GetSongByFullPath(BLSettings.GetSettings().DefaultTimerSound)));
            cbSound.Text = Path.GetFileNameWithoutExtension(BLSettings.GetSettings().DefaultTimerSound);
        }