private void CreateListBoxItem(string eventName, string dateTime, string filePath) { if (lvLog.InvokeRequired) { DelegateCreateListBoxItem clbi = new DelegateCreateListBoxItem(InvokedCreateListViewItme); Invoke(clbi, new object[3] { eventName, dateTime, filePath }); } else { InvokedCreateListViewItme(eventName, dateTime, filePath); } }
void CreateListBoxItem(string EventName, string DateTime, string FilePath) { if (this.lbLog.InvokeRequired) { DelegateCreateListBoxItem DelView = new DelegateCreateListBoxItem(InvokedCreateListViewItem); Invoke(DelView, new object[3] { EventName, DateTime, FilePath }); } else { InvokedCreateListViewItem(EventName, DateTime, FilePath); } }