Basic results printer modified as well.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
@@ -57,6 +57,8 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
nameTextBox.Text = config.Name;
|
||||
orientationComboBox.Text = config.PageOrientation.ToString();
|
||||
topMarginTextBox.Text = config.TopMargin.ToString();
|
||||
bottomMarginTextBox.Text = config.BottomMargin.ToString();
|
||||
leftMarginTextBox.Text = config.LeftMargin.ToString();
|
||||
supressPrintingCheckBox.Checked = config.SupressPrinting;
|
||||
}
|
||||
|
||||
@@ -65,6 +67,8 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
nameTextBox.Enabled = true;
|
||||
orientationComboBox.Enabled = true;
|
||||
topMarginTextBox.Enabled = true;
|
||||
bottomMarginTextBox.Enabled = true;
|
||||
leftMarginTextBox.Enabled = true;
|
||||
supressPrintingCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
@@ -85,6 +89,18 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
if (!int.TryParse(bottomMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
|
||||
{
|
||||
message += Environment.NewLine + "'Bottom margin' should be between 0 and 200";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
if (!int.TryParse(leftMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 200)
|
||||
{
|
||||
message += Environment.NewLine + "Left margin' should be between 0 and 200";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -97,6 +113,8 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
config.Name = nameTextBox.Text;
|
||||
config.PageOrientation = GetOrientation(orientationComboBox.Text);
|
||||
config.TopMargin = int.Parse(topMarginTextBox.Text);
|
||||
config.BottomMargin = int.Parse(bottomMarginTextBox.Text);
|
||||
config.LeftMargin = int.Parse(leftMarginTextBox.Text);
|
||||
config.SupressPrinting = supressPrintingCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
|
||||
Reference in New Issue
Block a user