Cleanup, Polish language, ver. 2.18.812

This commit is contained in:
Milan Hanajik 2018-02-15 10:16:35 +01:00
parent d3c7d54466
commit bb3688bf7a
6 changed files with 5 additions and 587 deletions

View File

@ -1,237 +0,0 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
namespace ResultsBrowser.Forms
{
partial class ResultsConfig
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.availableResultsListBox = new System.Windows.Forms.ListBox();
this.selectedResultsListBox = new System.Windows.Forms.ListBox();
this.availableResultsLabel = new System.Windows.Forms.Label();
this.selectedResultsLabel = new System.Windows.Forms.Label();
this.removeAllButton = new System.Windows.Forms.Button();
this.removeButton = new System.Windows.Forms.Button();
this.addButton = new System.Windows.Forms.Button();
this.unlockButton = new System.Windows.Forms.Button();
this.singleRadioButton = new System.Windows.Forms.RadioButton();
this.combinedRadioButton = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(283, 57);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(104, 30);
this.okButton.TabIndex = 4;
this.okButton.Text = "Close";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(283, 94);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(104, 30);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Visible = false;
//
// availableResultsListBox
//
this.availableResultsListBox.Enabled = false;
this.availableResultsListBox.FormattingEnabled = true;
this.availableResultsListBox.Location = new System.Drawing.Point(12, 162);
this.availableResultsListBox.Name = "availableResultsListBox";
this.availableResultsListBox.Size = new System.Drawing.Size(135, 186);
this.availableResultsListBox.TabIndex = 6;
this.availableResultsListBox.DoubleClick += new System.EventHandler(this.availableResultsListBox_DoubleClick);
//
// selectedResultsListBox
//
this.selectedResultsListBox.Enabled = false;
this.selectedResultsListBox.FormattingEnabled = true;
this.selectedResultsListBox.Location = new System.Drawing.Point(252, 162);
this.selectedResultsListBox.Name = "selectedResultsListBox";
this.selectedResultsListBox.Size = new System.Drawing.Size(135, 186);
this.selectedResultsListBox.TabIndex = 7;
this.selectedResultsListBox.DoubleClick += new System.EventHandler(this.selectedResultsListBox_DoubleClick);
//
// availableResultsLabel
//
this.availableResultsLabel.AutoSize = true;
this.availableResultsLabel.Location = new System.Drawing.Point(12, 140);
this.availableResultsLabel.Name = "availableResultsLabel";
this.availableResultsLabel.Size = new System.Drawing.Size(86, 13);
this.availableResultsLabel.TabIndex = 8;
this.availableResultsLabel.Text = "Available results:";
//
// selectedResultsLabel
//
this.selectedResultsLabel.AutoSize = true;
this.selectedResultsLabel.Location = new System.Drawing.Point(249, 140);
this.selectedResultsLabel.Name = "selectedResultsLabel";
this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13);
this.selectedResultsLabel.TabIndex = 9;
this.selectedResultsLabel.Text = "Selected results:";
//
// removeAllButton
//
this.removeAllButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.removeAllButton.Enabled = false;
this.removeAllButton.Location = new System.Drawing.Point(153, 273);
this.removeAllButton.Name = "removeAllButton";
this.removeAllButton.Size = new System.Drawing.Size(94, 30);
this.removeAllButton.TabIndex = 46;
this.removeAllButton.Text = "<< R&emove all";
this.removeAllButton.UseVisualStyleBackColor = true;
this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click);
//
// removeButton
//
this.removeButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.removeButton.Enabled = false;
this.removeButton.Location = new System.Drawing.Point(153, 238);
this.removeButton.Name = "removeButton";
this.removeButton.Size = new System.Drawing.Size(93, 30);
this.removeButton.TabIndex = 45;
this.removeButton.Text = "< &Remove";
this.removeButton.UseVisualStyleBackColor = true;
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
//
// addButton
//
this.addButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.addButton.Enabled = false;
this.addButton.Location = new System.Drawing.Point(153, 203);
this.addButton.Name = "addButton";
this.addButton.Size = new System.Drawing.Size(93, 30);
this.addButton.TabIndex = 44;
this.addButton.Text = "&Add >";
this.addButton.UseVisualStyleBackColor = true;
this.addButton.Click += new System.EventHandler(this.addButton_Click);
//
// unlockButton
//
this.unlockButton.Location = new System.Drawing.Point(283, 21);
this.unlockButton.Name = "unlockButton";
this.unlockButton.Size = new System.Drawing.Size(104, 30);
this.unlockButton.TabIndex = 47;
this.unlockButton.Text = "Unlock";
this.unlockButton.UseVisualStyleBackColor = true;
this.unlockButton.Click += new System.EventHandler(this.unlockButton_Click);
//
// singleRadioButton
//
this.singleRadioButton.Appearance = System.Windows.Forms.Appearance.Button;
this.singleRadioButton.AutoSize = true;
this.singleRadioButton.Checked = true;
this.singleRadioButton.Location = new System.Drawing.Point(19, 24);
this.singleRadioButton.Name = "singleRadioButton";
this.singleRadioButton.Size = new System.Drawing.Size(46, 23);
this.singleRadioButton.TabIndex = 48;
this.singleRadioButton.TabStop = true;
this.singleRadioButton.Text = "Single";
this.singleRadioButton.UseVisualStyleBackColor = true;
this.singleRadioButton.CheckedChanged += new System.EventHandler(this.singleRadioButton_CheckedChanged);
//
// combinedRadioButton
//
this.combinedRadioButton.Appearance = System.Windows.Forms.Appearance.Button;
this.combinedRadioButton.AutoSize = true;
this.combinedRadioButton.Location = new System.Drawing.Point(71, 24);
this.combinedRadioButton.Name = "combinedRadioButton";
this.combinedRadioButton.Size = new System.Drawing.Size(64, 23);
this.combinedRadioButton.TabIndex = 49;
this.combinedRadioButton.Text = "Combined";
this.combinedRadioButton.UseVisualStyleBackColor = true;
this.combinedRadioButton.CheckedChanged += new System.EventHandler(this.combinedRadioButton_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.combinedRadioButton);
this.groupBox1.Controls.Add(this.singleRadioButton);
this.groupBox1.Location = new System.Drawing.Point(12, 21);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(153, 60);
this.groupBox1.TabIndex = 52;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Water Meter";
//
// ResultsConfig
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(399, 358);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.unlockButton);
this.Controls.Add(this.removeAllButton);
this.Controls.Add(this.removeButton);
this.Controls.Add(this.addButton);
this.Controls.Add(this.selectedResultsLabel);
this.Controls.Add(this.availableResultsLabel);
this.Controls.Add(this.selectedResultsListBox);
this.Controls.Add(this.availableResultsListBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.Name = "ResultsConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ResultsConfig";
this.Load += new System.EventHandler(this.ResultsConfig_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.ListBox availableResultsListBox;
private System.Windows.Forms.ListBox selectedResultsListBox;
private System.Windows.Forms.Label availableResultsLabel;
private System.Windows.Forms.Label selectedResultsLabel;
private System.Windows.Forms.Button removeAllButton;
private System.Windows.Forms.Button removeButton;
private System.Windows.Forms.Button addButton;
private System.Windows.Forms.Button unlockButton;
private System.Windows.Forms.RadioButton singleRadioButton;
private System.Windows.Forms.RadioButton combinedRadioButton;
private System.Windows.Forms.GroupBox groupBox1;
}
}

View File

@ -1,219 +0,0 @@
///
/// Copyright (c) 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 Results.Entities;
using ResultsBrowser.Resources;
namespace ResultsBrowser.Forms
{
public partial class ResultsConfig : Form
{
/// <summary>
/// Required access rights to make changes with this form
/// </summary>
const Users.Grp.GID RequiredGroupMembership = Users.Grp.GID.Metrologists;
public Config.Entities.TestsArrangement TestsArrangement;
public Config.Entities.MetersArrangement MetersArrangement;
public int NrMetersInOneGroup;
public IList<Results.ItemSpec> currentlyAvailableItems;
public IList<Results.ItemSpec> ReportItems_Single;
public IList<Results.ItemSpec> ReportItems_Compound;
bool combined; /// false = single meter items, true = combined meter items
Config.Entities.Device device; /// Screen, Printer or Disk
bool unlocked; /// true = changes enabled
public ResultsConfig(bool combined)
{
InitializeComponent();
this.combined = combined;
device = Config.Entities.Device.Screen;
unlocked = false;
cancelButton.Visible = false;
}
void Localize()
{
Text = Strings.Configuration;
groupBox1.Text = Strings.Water_Meter;
singleRadioButton.Text = Strings.SingleBtnText;
combinedRadioButton.Text = Strings.CombinedBtnText;
availableResultsLabel.Text = Strings.Available_results;
selectedResultsLabel.Text = Strings.Selected_results;
addButton.Text = Strings.Add;
removeButton.Text = Strings.Remove;
removeAllButton.Text = Strings.Remove_all;
unlockButton.Text = Strings.UnlockBtnText;
okButton.Text = Strings.CloseBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
void ResultsConfig_Load(object sender, EventArgs e)
{
Localize();
singleRadioButton.Checked = !combined;
combinedRadioButton.Checked = combined;
RedrawAvailable();
RedrawSelected();
}
/// <summary>
/// Gets the list of selected items based on watermeter type and device selections
/// </summary>
/// <returns>List of selected result items</returns>
IList<Results.ItemSpec> GetSelectedItems()
{
if (combined)
{
return ReportItems_Compound;
}
else
{
return ReportItems_Single;
}
}
/// <summary>
/// Redraw selected items (right hand side)
/// </summary>
void RedrawAvailable()
{
availableResultsListBox.Items.Clear();
currentlyAvailableItems = new List<Results.ItemSpec>();
foreach (var item in Results.ItemSpec.AllItems)
{
if (!GetSelectedItems().Contains(item) && (combined ? item.CanPrintCompoundMeter : item.CanPrintSingle))
{
currentlyAvailableItems.Add(item);
availableResultsListBox.Items.Add(item.Name);
}
}
}
/// <summary>
/// Redraw selected items (right hand side)
/// </summary>
void RedrawSelected()
{
selectedResultsListBox.Items.Clear();
foreach (var item in GetSelectedItems())
{
selectedResultsListBox.Items.Add(item.Name);
}
}
void unlockButton_Click(object sender, EventArgs e)
{
if (!unlocked)
{
//if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
//{
// if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
//}
unlocked = true;
///
/// Unlock user interface controls
///
unlockButton.Enabled = false;
okButton.Text = Strings.OkBtnText;
cancelButton.Visible = true;
availableResultsListBox.Enabled = true;
selectedResultsListBox.Enabled = true;
addButton.Enabled = true;
removeButton.Enabled = true;
removeAllButton.Enabled = true;
}
}
void okButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
{
/// Double click works when just one item is selected
IList<Results.ItemSpec> itemsToRemove = new List<Results.ItemSpec>();
if (availableResultsListBox.SelectedIndices.Count == 1)
{
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[0]];
GetSelectedItems().Add(item);
RedrawAvailable();
RedrawSelected();
}
}
void addButton_Click(object sender, EventArgs e)
{
/// Append at the end, this code supports multiple selected items,
/// although ListBox control settings may limit the max.number of selected items to one.
for (int i = availableResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
{
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[i]];
GetSelectedItems().Add(item);
}
RedrawAvailable();
RedrawSelected();
}
private void selectedResultsListBox_DoubleClick(object sender, EventArgs e)
{
/// Double click works when just one item is selected
if (selectedResultsListBox.SelectedIndices.Count == 1)
{
GetSelectedItems().RemoveAt(selectedResultsListBox.SelectedIndices[0]);
RedrawAvailable();
RedrawSelected();
}
}
void removeButton_Click(object sender, EventArgs e)
{
/// Remove from the list (the last selected item first so that the indexes are not affected)
for (int i = selectedResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
{
GetSelectedItems().RemoveAt(selectedResultsListBox.SelectedIndices[i]);
}
RedrawAvailable();
RedrawSelected();
}
void removeAllButton_Click(object sender, EventArgs e)
{
/// Remove all items from 'Selected' list
GetSelectedItems().Clear();
RedrawAvailable();
RedrawSelected();
}
private void singleRadioButton_CheckedChanged(object sender, EventArgs e)
{
}
private void combinedRadioButton_CheckedChanged(object sender, EventArgs e)
{
combined = combinedRadioButton.Checked;
RedrawAvailable();
RedrawSelected();
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -125,12 +125,6 @@
<Compile Include="Forms\NoBenchOrDatabaseDlg.designer.cs">
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ResultsConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ResultsConfig.designer.cs">
<DependentUpon>ResultsConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\StatisticsDlg.cs">
<SubType>Form</SubType>
</Compile>
@ -188,9 +182,6 @@
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ResultsConfig.resx">
<DependentUpon>ResultsConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\StatisticsDlg.resx">
<DependentUpon>StatisticsDlg.cs</DependentUpon>
</EmbeddedResource>

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.811.0")]
[assembly: AssemblyFileVersion("2.18.811.0")]
[assembly: AssemblyVersion("2.18.812.0")]
[assembly: AssemblyFileVersion("2.18.812.0")]

View File

@ -1629,4 +1629,7 @@
<data name="Correction" xml:space="preserve">
<value>Korekta</value>
</data>
<data name="Start_the_test_bench" xml:space="preserve">
<value>Uruchom stanowisko pomiarowe</value>
</data>
</root>