for (int i = 0; i < 24;)
            {
                var cell = table2[1, i];
               
                var rangType = companyScheme[i];
                string txtCell = "";
                switch (rangType)
                {
                    case 1: txtCell = ""; break;
                    case 2: txtCell = ""; break;
                    case 3: txtCell = ""; break;
                    case 4: txtCell = ""; break;
                }
                cell.AddParagraph().AppendText(txtCell);

                int end = DD(i, companyScheme);
                table2.ApplyHorizontalMerge(1, i, end);
                i += end - i + 1;
            }

 

public static int DD(int i, Dictionary<int, int> companyScheme)
{
if(i == 23)
{
return 23;
}

if(companyScheme[i]== companyScheme[i + 1])
{
return DD( i +1, companyScheme);
}
else
{
return i;
}
}

 

相关文章:

  • 2022-02-11
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案