/// /// Copyright (c) 2013-2015 Sensus Metering Systems /// 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; using Config.Entities; using TBF.Resources; namespace TBF.TestWizard { public partial class SensorsSelection : Form { Test test; public SensorsSelection() { InitializeComponent(); } public SensorsSelection(Test test) : this() { this.test = test; } private void SensorsSelection_Load(object sender, EventArgs e) { if (test == null) return; backButton.Text = Strings.BackBtnText; nextButton.Text = Strings.NextBtnText; cancelButton.Text = Strings.CancelBtnText; RefreshWizardPage(); } void RefreshWizardPage() { nextButton.Enabled = IsFormValid(); } void UpdateTest() { } bool IsFormValid() { return true; } private void backButton_Click(object sender, EventArgs e) { if (test != null && IsFormValid()) UpdateTest(); DialogResult = DialogResult.Retry; Close(); } private void nextButton_Click(object sender, EventArgs e) { if (test != null && IsFormValid()) { UpdateTest(); DialogResult = DialogResult.OK; Close(); } else { DialogResult = DialogResult.None; } } private void cancelButton_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; Close(); } } }