Example #1
0
            public FavorTimerNotify(PrayerTimer timer, string player, string serverGroupId, ILogger logger,
                                    ISoundManager soundManager, ITrayPopups trayPopups, [NotNull] SkillEntryParser skillEntryParser)
            {
                if (skillEntryParser == null)
                {
                    throw new ArgumentNullException("skillEntryParser");
                }
                this.serverGroupId    = serverGroupId;
                this.skillEntryParser = skillEntryParser;
                Settings = timer.favorSettings;

                favorHandler = new NotifyHandler(
                    logger,
                    soundManager,
                    trayPopups,
                    Settings.FavorNotifySoundId,
                    player,
                    "",
                    Settings.FavorNotifyPopupPersist);
            }
        public PrayerTimerOptionsForm(PrayerTimer prayerTimer, TimerDefaultSettingsForm form,
                                      [NotNull] ISoundManager soundManager)
        {
            if (soundManager == null)
            {
                throw new ArgumentNullException("soundManager");
            }
            InitializeComponent();
            this.prayerTimer  = prayerTimer;
            this.formSettings = form;
            this.soundManager = soundManager;

            numericUpDownFavorWhenThis.Value =
                ((decimal)prayerTimer.FavorSettings.FavorNotifyOnLevel).ConstrainToRange(0M, 100M);
            checkBoxPopupPersist.Checked   = prayerTimer.FavorSettings.FavorNotifyPopupPersist;
            textBoxSoundName.Text          = soundManager.GetSoundById(prayerTimer.FavorSettings.FavorNotifySoundId).Name;
            checkBoxNotifySound.Checked    = prayerTimer.FavorSettings.FavorNotifySound;
            checkBoxNotifyPopup.Checked    = prayerTimer.FavorSettings.FavorNotifyPopup;
            checkBoxFavorWhenMAX.Checked   = prayerTimer.FavorSettings.FavorNotifyWhenMax;
            checkBoxShowFaithSkill.Checked = prayerTimer.ShowFaithSkillOnTimer;
        }