58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
///
|
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Windows.Forms;
|
|
using Workplace.Resources;
|
|
|
|
namespace Workplace.Forms
|
|
{
|
|
public enum Way
|
|
{
|
|
Wizard,
|
|
Manually,
|
|
Measurement,
|
|
}
|
|
|
|
public partial class WeightLimitsWayDlg : Form
|
|
{
|
|
public Way Way;
|
|
|
|
public WeightLimitsWayDlg()
|
|
{
|
|
InitializeComponent();
|
|
switch (Way)
|
|
{
|
|
case Way.Wizard:
|
|
radioButton1.Checked = true;
|
|
break;
|
|
case Way.Manually:
|
|
radioButton2.Checked = true;
|
|
break;
|
|
default:
|
|
case Way.Measurement:
|
|
radioButton3.Checked = true;
|
|
break;
|
|
}
|
|
|
|
Localize();
|
|
}
|
|
|
|
void Localize()
|
|
{
|
|
Text = Strings.The_way_of_specifying_weight_limits;
|
|
radioButton1.Text = Strings.Use_wizard_to_determine_weight_limits;
|
|
radioButton2.Text = Strings.Enter_weight_limits_manually;
|
|
radioButton3.Text = Strings.Obtain_weight_limits_by_measurement;
|
|
}
|
|
|
|
private void okButton_Click(object sender, EventArgs e)
|
|
{
|
|
Way = (radioButton1.Checked) ? Way.Wizard :
|
|
(radioButton2.Checked) ? Way.Manually : Way.Measurement;
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
}
|
|
}
|