private void ToolStripButtonAddCopyBoilerplateFile_Click(object sender, EventArgs e) { var form = new AddBoilerPlateFileForm(); if (form.ShowDialog() == DialogResult.OK) { AddToBoilerplateList(form.m_sourceFileName, form.m_sourceFullDir, form.m_destinationDir); } }
private void ToolStripButtonEditFileToCopy_Click(object sender, EventArgs e) { var listView = listViewBoilerPlateFiles; if (listView.SelectedItems.Count > 0) { var item = listView.SelectedItems[0]; var form = new AddBoilerPlateFileForm(); form.m_sourceFileName = item.Text; form.m_sourceFullDir = item.SubItems[1].Text; form.m_destinationDir = item.SubItems[2].Text; if (form.ShowDialog() == DialogResult.OK) { item.Text = form.m_sourceFileName; item.SubItems[1].Text = form.m_sourceFullDir; item.SubItems[2].Text = form.m_destinationDir; } } }