コード例 #1
0
        private void addLineToListView(long lineNumber, string lineText)
        {   // create a item with line number as column 1, line text as column 2
            ListViewItem item = new ListViewItem("" + lineNumber);

            item.SubItems.Add(lineText);
            if (ResultView.InvokeRequired)
            {
                ResultView.Invoke((MethodInvoker) delegate()
                {
                    ResultView.Items.Add(item);
                });
            }
        }