private void Renew() { listView1.Items.Clear(); string windows = hostInstance.GetWindows(); string[] fields = windows.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); foreach (string field in fields) { if (field != string.Empty) { string[] windowItem = field.Split(new string[] { "|*|" }, StringSplitOptions.None); ListViewItem listItem = new ListViewItem(windowItem[0]); for (int i = 1; i < windowItem.Length; i++) { listItem.SubItems.Add(windowItem[i]); } listView1.Items.Add(listItem); } } // MessageBox.Show(windows); }