private void _STXEventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
        {
            try
            {
                switch (LogEntryInfo.Type)
                {
                case EventLogEntryType.Error:
                case EventLogEntryType.FailureAudit:
                case EventLogEntryType.Warning:
                    this._errorsCount++;
                    TextBox_Text(this.txtErrorsCount, System.Convert.ToString(this._errorsCount));
                    break;
                }

                if (this.listBox_Count(this.lstSTXEventLog) > 500)
                {
                    this.listBox_clearItems(this.lstSTXEventLog);
                }
                this.listBox_AddItem(this.lstSTXEventLog, LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
 private void _STXEventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
 {
     try
     {
         string msg = LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine);
         ListBox_Items_Add(this.lstSTXEventLog, msg);
     }
     catch (Exception)
     {
     }
 }
 private void _stxeventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
 {
     try
     {
         if (this.lstSTXEventLog.Items.Count > 1000)
         {
             UIControlsSafeAccessFunctions.ListBox_Items_Clear(this.lstSTXEventLog);
         }
         string item = LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine);
         UIControlsSafeAccessFunctions.ListBox_Items_Add(this.lstSTXEventLog, item);
     }
     catch (Exception)
     {
     }
 }
 private void _stxEventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
 {
     try
     {
         if (UtilitiesLibrary.VisualUtilities.UIControlsThreadSafeAccess.UIControlsSafeAccessFunctions.ListBox_Items_Count(this.lstSTXEventLog) > 250)
         {
             ListBox_Items_Clear(this.lstSTXEventLog);
         }
         string item = LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine);
         UtilitiesLibrary.VisualUtilities.UIControlsThreadSafeAccess.UIControlsSafeAccessFunctions.ListBox_Items_Add(this.lstSTXEventLog, item);
     }
     catch (Exception ex)
     {
         UtilitiesLibrary.VisualUtilities.UIControlsThreadSafeAccess.UIControlsSafeAccessFunctions.ListBox_Items_Add(this.lstSTXEventLog, ex.Message);
     }
 }
Esempio n. 5
0
        private void _stxEventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
        {
            try
            {
                if (UIControlsSafeAccessFunctions.ListBox_Items_Count(this.lstSTXEventLog) > 250)
                {
                    ListBox_Items_Clear(this.lstSTXEventLog);
                }
                string item = LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine);
                ListBox_Items_Add(this.lstSTXEventLog, item);

                this._dataErrorsCount++;
                this.SetTextBoxText(this.txtErrorsCount, System.Convert.ToString(this._dataErrorsCount));
            }
            catch (Exception ex)
            {
                ListBox_Items_Add(this.lstSTXEventLog, ex.Message);
            }
        }
 private void _stxEventLog_LogEntryReceived(CustomEventLogEntry LogEntryInfo)
 {
     try
     {
         switch (LogEntryInfo.Type)
         {
         case EventLogEntryType.Error:
         case EventLogEntryType.FailureAudit:
         case EventLogEntryType.Warning:
             this._errorsCount++;
             UIControlsSafeAccessFunctions.TextBox_Text(this.txtErrorsCount, System.Convert.ToString(this._errorsCount));
             break;
         }
         if (this.lststxEventLog.Items.Count >= 255)
         {
             UIControlsSafeAccessFunctions.ListBox_Items_Clear(this.lststxEventLog);
         }
         UIControlsSafeAccessFunctions.ListBox_Items_Add(this.lststxEventLog, LogEntryInfo.ToString(CustomEventLogEntry.toStringMode.singleLine));
     }
     catch (Exception)
     {
     }
 }