private void dismissTimer_Tick(object sender, EventArgs e)
        {
            if (_currentEntry == null)
            {
                return;
            }

            if (_currentEntry.IsExpired == null)
            {
                return;
            }

            if (_currentEntry.IsExpired())
            {
                _currentEntry = null;
                HidePanel();
                textBox.Text      = "";
                pictureBox1.Image = Properties.Resources.InfoIcon;
            }
        }
        public void ShowNotification(NotificationPanelEntry entry)
        {
            _currentEntry = entry;
            var text = entry.Text.TrimEnd('\r', '\n');

            textBox.Text = text;
            switch (entry.Icon)
            {
            case NotificationPanelIcon.Error:
                pictureBox1.Image = Properties.Resources.ErrorIcon;
                break;

            case NotificationPanelIcon.Warning:
                pictureBox1.Image = Properties.Resources.WarningIcon;
                break;

            // ReSharper disable once RedundantCaseLabel
            case NotificationPanelIcon.Info:
            default:
                pictureBox1.Image = Properties.Resources.InfoIcon;
                break;
            }
            ShowPanel();
        }
Exemplo n.º 3
0
 void IExplorerFormView.ShowNotification(NotificationPanelEntry entry)
 {
     notificationPanel.ShowNotification(entry);
 }