Beispiel #1
0
        private void StatusAlert(Gvent gvent)
        {
            try
            {
                switch (gvent.Status)
                {
                case GventStatus.Soon:
                    if (Properties.Settings.Default.SoonPopup)
                    {
                        Hidden = false;
                    }
                    if (Properties.Settings.Default.SoonSound)
                    {
                        Sound.MakeSound(Properties.Settings.Default.SoundPath);
                    }
                    if (Properties.Settings.Default.SoonVerbal)
                    {
                        Sound.Speak(gvent);
                    }
                    return;

                case GventStatus.Now:
                    if (Properties.Settings.Default.NowPopup)
                    {
                        Hidden = false;
                    }
                    if (Properties.Settings.Default.NowSound)
                    {
                        Sound.MakeSound(Properties.Settings.Default.SoundPath);
                    }
                    if (Properties.Settings.Default.NowVerbal)
                    {
                        Sound.Speak(gvent);
                    }
                    return;

                case GventStatus.Past:
                    if (Properties.Settings.Default.PastDismiss)
                    {
                        gvent.Dismiss();
                    }
                    return;
                }
            }
            catch (Exception e)
            {
                //Swallow exception to avoid any issues painting, etc
            }
        }
Beispiel #2
0
        private void StatusAlert(Gvent gvent)
        {
            switch (gvent.Status)
            {
            case GventStatus.Soon:
                if (Properties.Settings.Default.SoonPopup)
                {
                    Hidden = false;
                }
                if (Properties.Settings.Default.SoonSound)
                {
                    Sound.MakeSound(Properties.Settings.Default.SoundPath);
                }
                if (Properties.Settings.Default.SoonVerbal)
                {
                    Sound.Speak(gvent);
                }
                return;

            case GventStatus.Now:
                if (Properties.Settings.Default.NowPopup)
                {
                    Hidden = false;
                }
                if (Properties.Settings.Default.NowSound)
                {
                    Sound.MakeSound(Properties.Settings.Default.SoundPath);
                }
                if (Properties.Settings.Default.NowVerbal)
                {
                    Sound.Speak(gvent);
                }
                return;

            case GventStatus.Past:
                if (Properties.Settings.Default.PastDismiss)
                {
                    gvent.Dismiss();
                }
                return;
            }
        }