ComponentFactory.Krypton.Toolkit.VisualTaskDialog.UpdateIcon C# (CSharp) Method

UpdateIcon() private method

private UpdateIcon ( ) : void
return void
        private void UpdateIcon()
        {
            _panelIcon.Visible = true;

            // Always use the custom icon as the preferred option
            if (_customMainIcon != null)
                _messageIcon.Image = _customMainIcon;
            else
            {
                switch (_mainIcon)
                {
                    case MessageBoxIcon.None:
                        _panelIcon.Visible = false;
                        _panelMainText.Left -= _messageIcon.Right;
                        break;
                    case MessageBoxIcon.Question:
                        _messageIcon.Image = Properties.Resources.help2;
                        System.Media.SystemSounds.Question.Play();
                        break;
                    case MessageBoxIcon.Information:
                        _messageIcon.Image = Properties.Resources.information;
                        System.Media.SystemSounds.Asterisk.Play();
                        break;
                    case MessageBoxIcon.Warning:
                        _messageIcon.Image = Properties.Resources.sign_warning;
                        System.Media.SystemSounds.Exclamation.Play();
                        break;
                    case MessageBoxIcon.Error:
                        _messageIcon.Image = Properties.Resources.error;
                        System.Media.SystemSounds.Hand.Play();
                        break;
                }
            }
        }