private void AddLine()
 {
     if (insertingIndex == -1)
     {
         currentEditingFile.AddLine();
     }
     else
     {
         currentEditingFile.AddLine(insertingIndex);
     }
 }
        public static void ToCSVFile(this ListView listView, String fileName)
        {
            CSVFile file = new CSVFile(fileName);

            List <String> columnNames = new List <String>();

            foreach (ColumnHeader header in listView.Columns)
            {
                columnNames.Add(header.Text);
            }
            file.Columns = columnNames;

            foreach (ListViewItem item in listView.Items)
            {
                List <String> items = new List <String>();
                foreach (ListViewItem.ListViewSubItem subItem in item.SubItems)
                {
                    items.Add(subItem.Text);
                }
                file.AddLine(items);
            }

            file.SaveOutput();
        }