Пример #1
0
        private void ShowBalloon(string messageType, string category, string text, string dateTime)
        {
            CleanUpNotifyWindow();
            _notifyWindow = new NotifyWindow("Mocs message: " + messageType, dateTime + "  " + category + Environment.NewLine + text);

            _notifyWindow.SetDimensions(160, 130);

            _notifyWindow.BackColor     = GetColor(messageType, category);
            _notifyWindow.GradientColor = Color.White;

            _notifyWindow.TitleFont = new Font(_notifyWindow.Font, FontStyle.Underline);
            _notifyWindow.Notify();
            // Old school balloon Tip
            //_notifyIcon.ShowBalloonTip(2000, "Mocs message: " + messageType, dateTime + "  " + category + Environment.NewLine + text, GetToolTipIcon(messageType));
        }
Пример #2
0
        private void ShowBalloon(string messageType, string category, string text, string dateTime)
        {
            CleanUpNotifyWindow();
            _notifyWindow = new NotifyWindow("Mocs message: " + messageType, dateTime + "  " + category + Environment.NewLine + text);

            _notifyWindow.SetDimensions(160, 130);

            _notifyWindow.BackColor = GetColor(messageType, category);
            _notifyWindow.GradientColor = Color.White;

            _notifyWindow.TitleFont = new Font(_notifyWindow.Font, FontStyle.Underline);
            _notifyWindow.Notify();
            // Old school balloon Tip
            //_notifyIcon.ShowBalloonTip(2000, "Mocs message: " + messageType, dateTime + "  " + category + Environment.NewLine + text, GetToolTipIcon(messageType));
        }
Пример #3
0
        private void CleanUpNotifyWindow()
        {
            if (_notifyWindow != null)
            {
                _notifyWindow.TitleClicked -= new EventHandler(_notifyWindow_TitleClicked);
                _notifyWindow.TextClicked -= new EventHandler(_notifyWindow_TextClicked);
                _notifyWindow.Dispose();
                _notifyWindow.Close();

                _notifyWindow = null;
            }
        }