本文介绍了如果行符合某些标准-C#WINFORM应用程序,则组合连续的Datatable行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#4.0编写一个Winform应用程序。

我的DataTable结构:



名称:Event1

栏目:

RunTime

TimeInterval

Value1

Value2

Value3

迭代

模式

资源

I am writing a Winform application with C# 4.0.
My DataTable structure:

Name: Event1
Columns:
RunTime
TimeInterval
Value1
Value2
Value3
Iterations
Mode
Resource






示例数据:(所有字符串)

RunTime | TimeInterval | Value1 | Value2 | Value3 |迭代|模式|资源

0.00 | .25 | 30 | 9 | A | 1 | 300 | Run1

.25 | .005 | | | | | | Run1Delay

.255 | .25 | 30 | 9 | A | 1 | 300 | Run1

.505 | .25 | 30 | 7 | A | 50 | 100 | Run2

13.005 | .005 | | | | | | Run2Delay

13.010 | .25 | 30 | 7 | B | 1 | 100 | Run3

13.260 | .25 | 30 | 7 | B | 1 | 100 | Run3

13.51 | .25 | 30 | 7 | B | 1 | 100 | Run3

13.76 | .1 | | | | | | Run3Delay



为任意一行,迭代次数为1,后跟延迟(%延迟%或迭代的资源为空)

通过添加延迟时间间隔值和删除延迟行来改变行。





欢迎任何和所有建议。



Example Data:(all strings)
RunTime |TimeInterval | Value1 | Value2|Value3|Iterations|Mode|Resource
0.00 | .25 | 30 | 9 | A | 1 | 300 | Run1
.25 | .005 | | | | | |Run1Delay
.255 | .25 | 30 | 9 | A | 1 | 300 | Run1
.505 | .25 | 30 | 7 | A | 50 | 100 | Run2
13.005 | .005 | | | | | | Run2Delay
13.010 | .25 | 30 | 7 | B | 1 | 100 | Run3
13.260 | .25 | 30 | 7 | B | 1 | 100 | Run3
13.51 | .25 | 30 | 7 | B | 1 | 100 | Run3
13.76 | .1 | | | | | | Run3Delay

for a any Row with iteration of 1 and followed by a delay("resource like %Delay% or Iteration is null)
Alter the row by adding time interval value from the delay and Delete the Delay row.


Any and all recommendations welcomed.

推荐答案



这篇关于如果行符合某些标准-C#WINFORM应用程序,则组合连续的Datatable行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 09:29