01.
private
void
Form2_Load(
object
sender, EventArgs e)
02.
{
03.
dataGridView1.Dock = DockStyle.Fill;
04.
AASConfig AAS =
new
AASConfig(@
"G:\TestCSharp\calculate\GetDataAAS\REPORT.TXT"
);
05.
06.
RichTextBox readFile =
new
RichTextBox();
07.
richTextBox1.Text = System.IO.File.ReadAllText(@
"G:\TestCSharp\calculate\GetDataAAS\REPORT.TXT"
);
08.
readFile.Text = System.IO.File.ReadAllText(@
"G:\TestCSharp\calculate\GetDataAAS\REPORT.TXT"
);
09.
10.
foreach
(System.Text.RegularExpressions.Match math
in
new
11.
System.Text.RegularExpressions.Regex(AAS.strValue + AAS.strValue4Replicates).Matches(readFile.Text))
12.
{
13.
AASDATA item =
new
AASDATA();
14.
item.SampleID = math.Groups[1].Value;
15.
item.Conc = math.Groups[2].Value;
16.
item.MeanAbs = math.Groups[3].Value;
17.
List<
double
> lst =
new
List<
double
>();
18.
for
(
int
i = 4; i < math.Groups.Count ; i++)
19.
{
20.
lst.Add(
double
.Parse(math.Groups[i].Value));
21.
}
22.
item.Readings = lst;
23.
dataGridView1.Rows.Add(item.SampleID, item.Conc, item.MeanAbs, item.Readings[0], item.Readings[1], item.Readings[2], item.Readings[3]);
24.
}
25.
}