Pre-selected water meter type when opening results page configuration.

This commit is contained in:
Milan Hanajik
2015-09-24 19:11:42 +02:00
parent 6318ce7700
commit bdd2f5f89d
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -49,11 +49,11 @@ namespace TBF.Forms
Entities.Device device; /// Screen, Printer or Disk
bool unlocked; /// true = changes enabled
public ResultsConfig()
public ResultsConfig(bool combined)
{
InitializeComponent();
combined = false;
this.combined = combined;
device = Entities.Device.Screen;
unlocked = false;
cancelButton.Visible = false;
@@ -89,6 +89,9 @@ namespace TBF.Forms
{
Localize();
singleRadioButton.Checked = !combined;
combinedRadioButton.Checked = combined;
testsRowsRadioButton.Checked = (TestsArrangement == TestsAre.Rows);
testsColumnsRadioButton.Checked = (TestsArrangement == TestsAre.Columns);
@@ -85,7 +85,7 @@ namespace TBF.Screens
/// </summary>
private void configureButton_Click(object sender, EventArgs e)
{
TBF.Forms.ResultsConfig dlg = new TBF.Forms.ResultsConfig();
TBF.Forms.ResultsConfig dlg = new TBF.Forms.ResultsConfig(combined);
dlg.TestsArrangement = TestsArrangement;
dlg.MetersArrangement = MetersArrangement;
dlg.NrMetersInOneGroup = NrMetersInOneGroup;