private string CopyStringCreation(ArrayList RowList, LBDataGridView LBDG)
 {
     StringBuilder builder = new StringBuilder();
     int num2 = 0;
     for (num2 = 0; num2 < RowList.Count; num2++)
     {
         for (int i = 0; i < LBDG.ColumnCount; i++)
         {
             string str = LBDG.Rows[(int) RowList[num2]].Cells[i].Value.ToString();
             if (i != (LBDG.ColumnCount - 1))
             {
                 builder.Append(str + "\t");
             }
             else
             {
                 builder.Append(str + "\r\n");
             }
         }
     }
     return builder.ToString();
 }
 private List<int> SelectedLines(LBDataGridView dataGrid)
 {
     List<int> list = new List<int>();
     foreach (DataGridViewRow row in dataGrid.SelectedRows)
     {
         list.Add(row.Index);
     }
     if (list.Count < 1)
     {
         foreach (DataGridViewCell cell in dataGrid.SelectedCells)
         {
             if (!dataGrid.Rows[cell.RowIndex].Selected)
             {
                 dataGrid.Rows[cell.RowIndex].Selected = true;
                 list.Add(cell.RowIndex);
             }
         }
     }
     list.Sort();
     return list;
 }