SolutionConcentration.cs
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace testSoftForContaminationExplorer
{
public partial class SolutionConcentration : Form
{
private adjustingForm adjustingForm;
public SolutionConcentration(adjustingForm af)
{
adjustingForm = af;
InitializeComponent();
}
/**
* 将校准溶液保存入xml文件
*/
private void button1_Click(object sender, EventArgs e)
{
//先判断是否为数字
if (this.txtSolution.Text.ToString().Trim() != "" || this.txtTestTime.Text.ToString().Trim() != "" || this.txtFilterWaveRange.Text.ToString() != "" || this.txtStartData.Text.ToString() != "")
{
try
{
adjustingForm.solution = double.Parse(this.txtSolution.Text.ToString().Trim());
adjustingForm.testTime = double.Parse(this.txtTestTime.Text.ToString().Trim());
adjustingForm.filterWaveRange = double.Parse(this.txtFilterWaveRange.Text.ToString()) / 100.0;
adjustingForm.startData = double.Parse(this.txtStartData.Text.ToString());
this.Close();
}
catch
{
MessageBox.Show("请输入数字!");
}
}
else
{
MessageBox.Show("请确认输入内容是否为空!");
}
}
/**
* 取消
*/
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}