private void buttonX2_Click(object sender, EventArgs e) { string DocumentList; DocumentLibraryForm library = new DocumentLibraryForm(); library.ShowDialog(this); if (library.DocumentList != "") { this.listView1.BeginUpdate(); DocumentList = library.DocumentList; foreach (string now in DocumentList.Split('\n')) { if (now != "") { this.listView1.Items.Add(now); } } this.listView1.EndUpdate(); } UpdateName(); }
private void buttonItem2_Click(object sender, EventArgs e) { string DocumentList; DocumentSearch.SearchMainForm searchForm = new DocumentSearch.SearchMainForm(); searchForm.ShowDialog(this); if (searchForm.returnBookStr != "") { this.listView1.BeginUpdate(); DocumentList = searchForm.returnBookStr; foreach (string now in DocumentList.Split('\n')) { if (now != "") { this.listView1.Items.Add(now); } } this.listView1.EndUpdate(); } UpdateName(); }