void addFile() { PracticeFileForm pfForm = new PracticeFileForm(); pfForm.MdiParent = Forms.FClient; pfForm.ThisIsNew = true; pfForm.DataType = Constants.TYPE_FILE_NEW; pfForm.ParentForm = this; pfForm.ParentFolder = openFolder; pfForm.Show(); }
void editFile() { if (listView1.SelectedIndices.Count > 0) { if (listView1.Items[listView1.SelectedIndices[0]].SubItems[2].Text.ToString() == "" && listView1.Items[listView1.SelectedIndices[0]].SubItems[1].Text.ToString() != ".." && listView1.SelectedItems[0].StateImageIndex == 1) { PracticeFileForm pfForm = new PracticeFileForm(); pfForm.MdiParent = Forms.FClient; pfForm.ThisIsNew = false; pfForm.ID = listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text; pfForm.DataType = Constants.TYPE_FILE_EDIT; pfForm.ParentForm = this; pfForm.ParentFolder = openFolder; pfForm.Show(); } } }