Example #1
0
        private void OnEntryWritten(object source, EntryWrittenEventArgs e)
        {
            string logName = watchLog;

            GetLogEntryStats(watchLog);

            if (logType == eventFilter || eventFilter.Length == 0)
            {
                // show balloon
                NotifyIcon.ShowBalloon("Jakkl",
                                       "An event was written to the " + logName + " event log." +
                                       "\nType: " + LogType +
                                       "\nSource: " + LogSource +
                                       "\nCategory: " + LogCategory +
                                       "\nEventID: " + EventID +
                                       "\nUser: " + User,
                                       NotifyIconEx.NotifyInfoFlags.Info,
                                       5000);

                // Log locally
                LogNotification();
                // Send to Syslog
                SysLogMessage sysLog = new SysLogMessage();
                bool          result = sysLog.SendLog(syslogServer.Text, _syslogPort.Text, LogMessage);
            }
        }
Example #2
0
 public static void ShowBalloon(this NotifyIcon notifyIcon, String title, String message, ToolTipIcon icon)
 {
     notifyIcon.ShowBalloon(title, message, ToolTipIcon.Info, 30000);
 }
Example #3
0
 public static void ShowBalloon(this NotifyIcon notifyIcon, String title, String message)
 {
     notifyIcon.ShowBalloon(title, message, ToolTipIcon.None);
 }
Example #4
0
 public static void ShowBalloon(this NotifyIcon notifyIcon, String title, String message, int milliseconds)
 {
     notifyIcon.ShowBalloon(title, message, ToolTipIcon.None, milliseconds);
 }
Example #5
0
 public static void ShowBalloon(this NotifyIcon notifyIcon, String message)
 {
     notifyIcon.ShowBalloon("", message);
 }