Skip to content

Commit 87849a1

Browse files
author
QuantAsylum
committed
Version 1.6 alpha
Signed-off-by: QuantAsylum <git@quantasylum.com>
1 parent ad754ab commit 87849a1

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

Application/QA350/QA350/Constants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class Constants
1212
static public string CalibrationFile = DataFilePath + "CalibrationData.xml";
1313
static public string SettingsFile = DataFilePath + "QA350Settings.xml";
1414

15-
static public double Version = 1.5;
15+
static public double Version = 1.6;
1616

17-
static public Int32 RequiredFwVersion = 6;
17+
static public Int32 RequiredFwVersion = 10;
1818
}
1919
}

Application/QA350/QA350/DlgEditStats.Designer.cs

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Application/QA350/QA350/DlgEditStats.cs

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public partial class DlgEditStats : Form
1414
{
1515
public Settings AppSettings;
1616

17+
private bool NumericIgnoreUpdates = false;
18+
1719
public DlgEditStats()
1820
{
1921
InitializeComponent();
@@ -22,11 +24,14 @@ public DlgEditStats()
2224
public DlgEditStats(Settings settings) : this()
2325
{
2426
AppSettings = settings;
27+
}
2528

29+
private void DlgEditStats_Load(object sender, EventArgs e)
30+
{
2631
if (AppSettings.YAxisIsPPM)
2732
radioButton1.Checked = true;
2833
if (AppSettings.YAxisIsMV)
29-
radioButton1.Checked = true;
34+
radioButton2.Checked = true;
3035
if (AppSettings.YAxisIsUV)
3136
radioButton3.Checked = true;
3237

@@ -35,6 +40,7 @@ public DlgEditStats(Settings settings) : this()
3540
if (AppSettings.HistoBinIsUV)
3641
radioButton4.Checked = true;
3742

43+
NumericIgnoreUpdates = true;
3844
numericUpDown1.Value = Convert.ToDecimal(AppSettings.YAxisPPMperDiv);
3945
numericUpDown2.Value = Convert.ToDecimal(AppSettings.YAxisMVperDiv);
4046
numericUpDown3.Value = Convert.ToDecimal(AppSettings.YAxisUVPerDiv);
@@ -43,9 +49,10 @@ public DlgEditStats(Settings settings) : this()
4349
numericUpDown5.Value = Convert.ToDecimal(AppSettings.HistoBinInMV);
4450

4551
numericUpDown6.Value = Convert.ToDecimal(AppSettings.SampleHistory);
46-
52+
NumericIgnoreUpdates = false;
4753
}
4854

55+
// OK button
4956
private void button4_Click(object sender, EventArgs e)
5057
{
5158
AppSettings.YAxisIsPPM = false;
@@ -85,6 +92,9 @@ private void button1_Click(object sender, EventArgs e)
8592
AppSettings.YAxisIsUV = false;
8693

8794
AppSettings.YAxisPPMperDiv = 10;
95+
96+
radioButton1.Checked = true;
97+
numericUpDown1.Value = Convert.ToDecimal(10);
8898
}
8999

90100
// Set to 10 uV/div
@@ -96,6 +106,9 @@ private void button2_Click(object sender, EventArgs e)
96106

97107
AppSettings.YAxisUVPerDiv = 10;
98108

109+
radioButton3.Checked = true;
110+
numericUpDown3.Value = Convert.ToDecimal(10);
111+
99112
}
100113

101114
// Set histo to 10uV/bin
@@ -105,6 +118,39 @@ private void button3_Click(object sender, EventArgs e)
105118
AppSettings.HistoBinIsUV = true;
106119

107120
AppSettings.YAxisUVPerDiv = 10;
121+
122+
radioButton4.Checked = true;
123+
numericUpDown4.Value = Convert.ToDecimal(10);
124+
}
125+
126+
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
127+
{
128+
if (NumericIgnoreUpdates == false)
129+
radioButton1.Checked = true;
130+
}
131+
132+
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
133+
{
134+
if (NumericIgnoreUpdates == false)
135+
radioButton2.Checked = true;
136+
}
137+
138+
private void numericUpDown3_ValueChanged(object sender, EventArgs e)
139+
{
140+
if (NumericIgnoreUpdates == false)
141+
radioButton3.Checked = true;
142+
}
143+
144+
private void numericUpDown5_ValueChanged(object sender, EventArgs e)
145+
{
146+
if (NumericIgnoreUpdates == false)
147+
radioButton5.Checked = true;
148+
}
149+
150+
private void numericUpDown4_ValueChanged(object sender, EventArgs e)
151+
{
152+
if (NumericIgnoreUpdates == false)
153+
radioButton4.Checked = true;
108154
}
109155
}
110156
}

Application/QA350/QA350/Form1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ private void BtnStats_ButtonPressed(object sender, LightedButton2.LightedButton2
588588
{
589589
DlgEditStats dlg = new DlgEditStats(AppSettings);
590590

591-
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
591+
if (dlg.ShowDialog() == DialogResult.OK)
592592
{
593593
ResetStats();
594594
AppSettings = dlg.AppSettings;

0 commit comments

Comments
 (0)