Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1.         private void AddData(string Address, string Data) //add to data view
  2.         {
  3.             if (listView1.InvokeRequired)
  4.             {
  5.                 listView1.Invoke(new MethodInvoker(() => {
  6.                     if (Address == "0") listView1.Items.Clear();
  7.                     listView1.Items.Add(Address).SubItems.Add(Data);
  8.                 }));
  9.             }
  10.             else
  11.             {
  12.                 if (Address == "0") listView1.Items.Clear();
  13.                 listView1.Items.Add(Address).SubItems.Add(Data) ;
  14.             }
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement