void LogEvent(string message) { RackScanEventLogEntry entry = new RackScanEventLogEntry(message); if (this.RackScannerLogEvent != null) { RaiseEventOnUIThread(this.RackScannerLogEvent, new object[] { this, entry }); } }
private void Scanner_RackScannerLogEvent(object sender, RackScanEventLogEntry e) { this.lstLog.Items.Add(e.When.ToLongTimeString() + ": " + e.Message); this.lstLog.SelectedIndex = lstLog.Items.Count - 1; lstLog.TopIndex = lstLog.Items.Count - 1; int ToGo = 100 - this.progressBar1.Value; int step = ToGo / 2; this.progressBar1.Value += step; }