tbf/Results/Forms/ResultsConfigDlg.cs

72 lines
1.5 KiB
C#

///
/// Copyright (c) 2016-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using log4net;
using Config.Entities;
using Results;
using Results.Resources;
namespace Results.Forms
{
public partial class ResultsConfigDlg : Form
{
public IList<WMeterRsltItemSpec> SelectedItems
{
set { resultsConfigCtrl.SelectedItems = value; }
get { return resultsConfigCtrl.SelectedItems; }
}
public MetersKind MetersKind
{
set { resultsConfigCtrl.MetersKind = value; }
}
public ResultsConfigDlg(bool supressTestIDColumn)
: this()
{
resultsConfigCtrl.SupressTestIDColumn = supressTestIDColumn;
}
public ResultsConfigDlg()
{
InitializeComponent();
resultsConfigCtrl.Unlocked = true;
}
void Localize()
{
Text = Strings.Configuration;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
void ResultsConfig_Load(object sender, EventArgs e)
{
Localize();
}
void okButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
private void cancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void ResultsConfigDlg_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = true;
}
}
}