private void btnNewFile_Click(object sender, EventArgs e) { frmMetadataFileEdit f = new frmMetadataFileEdit(); f.ShowDialog(this); if (f.DialogResult == DialogResult.OK) { f.current.Metadata = this.current; this.current.Files.Add(f.current); ReloadFiles(); } }
private void btnEditFile_Click(object sender, EventArgs e) { if (lstFiles.SelectedItems.Count == 0) { return; } frmMetadataFileEdit f = new frmMetadataFileEdit(); f.LoadData(GetSelectedFile()); f.ShowDialog(this); if (f.DialogResult == DialogResult.OK) { ReloadFiles(); } }