Esempio n. 1
0
        private void OnNotificationSoundError(string message)
        {
            if (!ignoreNotificationSoundError)
            {
                ignoreNotificationSoundError = true;

                using (FormMessage form = new FormMessage("Notification Sound Error", "Could not play custom notification sound." + Environment.NewLine + message, MessageBoxIcon.Error)){
                    form.AddButton("Ignore");

                    Button btnOpenSettings = form.AddButton("Open Settings");
                    btnOpenSettings.Width   += 16;
                    btnOpenSettings.Location = new Point(btnOpenSettings.Location.X - 16, btnOpenSettings.Location.Y);

                    if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnOpenSettings)
                    {
                        OpenSettings();
                        currentFormSettings.SelectTab(FormSettings.TabIndexNotification);
                    }
                }
            }
        }