2016-04-24 06:55:39 +00:00
|
|
|
|
///
|
2021-05-27 15:30:04 +00:00
|
|
|
|
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
2016-04-24 06:55:39 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2017-02-22 13:07:20 +00:00
|
|
|
|
using System.Linq;
|
2016-04-24 06:55:39 +00:00
|
|
|
|
using System.Windows.Forms;
|
2016-04-29 05:40:34 +00:00
|
|
|
|
using log4net;
|
2021-05-27 15:30:04 +00:00
|
|
|
|
using Common;
|
2016-05-04 09:03:59 +00:00
|
|
|
|
using Results;
|
2016-05-26 08:38:43 +00:00
|
|
|
|
using Results.Resources;
|
2016-04-24 06:55:39 +00:00
|
|
|
|
|
2016-05-26 08:38:43 +00:00
|
|
|
|
namespace Results.Forms
|
2016-04-24 06:55:39 +00:00
|
|
|
|
{
|
|
|
|
|
|
public partial class ResultsConfigDlg : Form
|
|
|
|
|
|
{
|
2017-05-23 15:13:29 +00:00
|
|
|
|
public IList<WMeterRsltItemSpec> SelectedItems
|
2016-04-29 05:40:34 +00:00
|
|
|
|
{
|
2017-05-23 15:13:29 +00:00
|
|
|
|
set { resultsConfigCtrl.SelectedItems = value; }
|
|
|
|
|
|
get { return resultsConfigCtrl.SelectedItems; }
|
2016-04-29 05:40:34 +00:00
|
|
|
|
}
|
2017-02-15 11:11:06 +00:00
|
|
|
|
|
2017-05-23 15:13:29 +00:00
|
|
|
|
public MetersKind MetersKind
|
|
|
|
|
|
{
|
|
|
|
|
|
set { resultsConfigCtrl.MetersKind = value; }
|
|
|
|
|
|
}
|
2017-02-15 11:11:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ResultsConfigDlg(bool supressTestIDColumn)
|
|
|
|
|
|
: this()
|
|
|
|
|
|
{
|
2017-05-23 15:13:29 +00:00
|
|
|
|
resultsConfigCtrl.SupressTestIDColumn = supressTestIDColumn;
|
2017-02-15 11:11:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-24 06:55:39 +00:00
|
|
|
|
public ResultsConfigDlg()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
2026-03-04 07:37:27 +00:00
|
|
|
|
|
|
|
|
|
|
this.Icon = Properties.Resources.TBF_icon;
|
|
|
|
|
|
|
|
|
|
|
|
resultsConfigCtrl.Unlocked = true;
|
2016-04-24 06:55:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2017-02-15 11:11:06 +00:00
|
|
|
|
|
2016-04-24 06:55:39 +00:00
|
|
|
|
void Localize()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = Strings.Configuration;
|
|
|
|
|
|
okButton.Text = Strings.OkBtnText;
|
|
|
|
|
|
cancelButton.Text = Strings.CancelBtnText;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ResultsConfig_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Localize();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-05-23 15:13:29 +00:00
|
|
|
|
void okButton_Click(object sender, EventArgs e)
|
2016-04-24 06:55:39 +00:00
|
|
|
|
{
|
2016-04-29 05:40:34 +00:00
|
|
|
|
DialogResult = DialogResult.OK;
|
2016-04-24 06:55:39 +00:00
|
|
|
|
Close();
|
|
|
|
|
|
}
|
2016-05-01 08:04:05 +00:00
|
|
|
|
|
2016-06-16 15:28:31 +00:00
|
|
|
|
private void cancelButton_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
DialogResult = DialogResult.Cancel;
|
|
|
|
|
|
Close();
|
|
|
|
|
|
}
|
2017-02-22 13:07:20 +00:00
|
|
|
|
|
2017-05-23 15:13:29 +00:00
|
|
|
|
private void ResultsConfigDlg_KeyPress(object sender, KeyPressEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
e.Handled = true;
|
|
|
|
|
|
}
|
2016-04-24 06:55:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|