TBF.UI.Results namespace --> TBF.UI.ResultsMI, etc.

This commit is contained in:
Milan Hanajik
2019-11-26 18:05:02 +01:00
parent e9c6f58e0d
commit a43031c0a5
58 changed files with 691 additions and 405 deletions
+183
View File
@@ -0,0 +1,183 @@
namespace TBF.UI.ResultsMI
{
partial class PreviousResultCtrl
{
/// <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 Component 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.sendReloadButton = new System.Windows.Forms.Button();
this.sentCheckBox = new System.Windows.Forms.CheckBox();
this.failedCountLabel = new System.Windows.Forms.Label();
this.passedCountLabel = new System.Windows.Forms.Label();
this.purchaseOrderLabel = new System.Windows.Forms.Label();
this.procedureLabel = new System.Windows.Forms.Label();
this.endTimeLabel = new System.Windows.Forms.Label();
this.startTimeLabel = new System.Windows.Forms.Label();
this.batchNrLabel = new System.Windows.Forms.Label();
this.showButton = new System.Windows.Forms.Button();
this.swVerLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// sendReloadButton
//
this.sendReloadButton.Location = new System.Drawing.Point(832, 2);
this.sendReloadButton.Name = "sendReloadButton";
this.sendReloadButton.Size = new System.Drawing.Size(104, 23);
this.sendReloadButton.TabIndex = 15;
this.sendReloadButton.Text = "Again";
this.sendReloadButton.UseVisualStyleBackColor = true;
this.sendReloadButton.MouseClick += new System.Windows.Forms.MouseEventHandler(this.sendReloadButton_MouseClick);
//
// sentCheckBox
//
this.sentCheckBox.AutoSize = true;
this.sentCheckBox.Location = new System.Drawing.Point(748, 6);
this.sentCheckBox.Name = "sentCheckBox";
this.sentCheckBox.Size = new System.Drawing.Size(48, 17);
this.sentCheckBox.TabIndex = 14;
this.sentCheckBox.Text = "Sent";
this.sentCheckBox.UseVisualStyleBackColor = true;
//
// failedCountLabel
//
this.failedCountLabel.AutoSize = true;
this.failedCountLabel.Location = new System.Drawing.Point(690, 7);
this.failedCountLabel.Name = "failedCountLabel";
this.failedCountLabel.Size = new System.Drawing.Size(36, 13);
this.failedCountLabel.TabIndex = 13;
this.failedCountLabel.Text = "failCnt";
//
// passedCountLabel
//
this.passedCountLabel.AutoSize = true;
this.passedCountLabel.Location = new System.Drawing.Point(641, 7);
this.passedCountLabel.Name = "passedCountLabel";
this.passedCountLabel.Size = new System.Drawing.Size(45, 13);
this.passedCountLabel.TabIndex = 12;
this.passedCountLabel.Text = "passCnt";
//
// purchaseOrderLabel
//
this.purchaseOrderLabel.AutoSize = true;
this.purchaseOrderLabel.Location = new System.Drawing.Point(559, 7);
this.purchaseOrderLabel.Name = "purchaseOrderLabel";
this.purchaseOrderLabel.Size = new System.Drawing.Size(77, 13);
this.purchaseOrderLabel.TabIndex = 11;
this.purchaseOrderLabel.Text = "purchaseOrder";
//
// procedureLabel
//
this.procedureLabel.AutoSize = true;
this.procedureLabel.Location = new System.Drawing.Point(345, 7);
this.procedureLabel.Name = "procedureLabel";
this.procedureLabel.Size = new System.Drawing.Size(55, 13);
this.procedureLabel.TabIndex = 10;
this.procedureLabel.Text = "procedure";
//
// endTimeLabel
//
this.endTimeLabel.AutoSize = true;
this.endTimeLabel.Location = new System.Drawing.Point(160, 7);
this.endTimeLabel.Name = "endTimeLabel";
this.endTimeLabel.Size = new System.Drawing.Size(48, 13);
this.endTimeLabel.TabIndex = 9;
this.endTimeLabel.Text = "endTime";
//
// startTimeLabel
//
this.startTimeLabel.AutoSize = true;
this.startTimeLabel.Location = new System.Drawing.Point(50, 7);
this.startTimeLabel.Name = "startTimeLabel";
this.startTimeLabel.Size = new System.Drawing.Size(50, 13);
this.startTimeLabel.TabIndex = 8;
this.startTimeLabel.Text = "startTime";
//
// batchNrLabel
//
this.batchNrLabel.AutoSize = true;
this.batchNrLabel.Location = new System.Drawing.Point(3, 7);
this.batchNrLabel.Name = "batchNrLabel";
this.batchNrLabel.Size = new System.Drawing.Size(24, 13);
this.batchNrLabel.TabIndex = 16;
this.batchNrLabel.Text = "bNr";
//
// showButton
//
this.showButton.Location = new System.Drawing.Point(939, 2);
this.showButton.Name = "showButton";
this.showButton.Size = new System.Drawing.Size(104, 23);
this.showButton.TabIndex = 17;
this.showButton.Text = "Show";
this.showButton.UseVisualStyleBackColor = true;
this.showButton.Click += new System.EventHandler(this.showButton_Click);
//
// swVerLabel
//
this.swVerLabel.AutoSize = true;
this.swVerLabel.Location = new System.Drawing.Point(270, 7);
this.swVerLabel.Name = "swVerLabel";
this.swVerLabel.Size = new System.Drawing.Size(47, 13);
this.swVerLabel.TabIndex = 18;
this.swVerLabel.Text = "SW Ver.";
//
// PreviousResultCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.swVerLabel);
this.Controls.Add(this.showButton);
this.Controls.Add(this.batchNrLabel);
this.Controls.Add(this.sendReloadButton);
this.Controls.Add(this.sentCheckBox);
this.Controls.Add(this.failedCountLabel);
this.Controls.Add(this.passedCountLabel);
this.Controls.Add(this.purchaseOrderLabel);
this.Controls.Add(this.procedureLabel);
this.Controls.Add(this.endTimeLabel);
this.Controls.Add(this.startTimeLabel);
this.Name = "PreviousResultCtrl";
this.Size = new System.Drawing.Size(1048, 26);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button sendReloadButton;
private System.Windows.Forms.CheckBox sentCheckBox;
private System.Windows.Forms.Label failedCountLabel;
private System.Windows.Forms.Label passedCountLabel;
private System.Windows.Forms.Label purchaseOrderLabel;
private System.Windows.Forms.Label procedureLabel;
private System.Windows.Forms.Label endTimeLabel;
private System.Windows.Forms.Label startTimeLabel;
private System.Windows.Forms.Label batchNrLabel;
private System.Windows.Forms.Button showButton;
private System.Windows.Forms.Label swVerLabel;
}
}
+121
View File
@@ -0,0 +1,121 @@
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System.Windows.Forms;
using TBF.Resources;
namespace TBF.UI.ResultsMI
{
public partial class PreviousResultCtrl : UserControl
{
readonly PreviousResultsDlg parent;
readonly PreviousResultsMode mode;
public int BatchNr;
public DateTime StarTime;
public DateTime EndTime;
public string Ver;
public string ProcedureName;
public string PurchaseOrder;
public int PassedCount;
public int FailedCount;
public bool Sent;
protected PreviousResultCtrl()
{
InitializeComponent();
}
public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string ver, string proc, string pOrd, int passCnt, int failCnt, bool sent, PreviousResultsMode mode)
: this()
{
this.parent = parent;
this.mode = mode;
BatchNr = bnr;
StarTime = s;
EndTime = e;
Ver = ver;
ProcedureName = proc;
PurchaseOrder = pOrd;
PassedCount = passCnt;
FailedCount = failCnt;
Sent = sent;
batchNrLabel.Text = BatchNr.ToString();
startTimeLabel.Text = string.Format("{0} {1}", StarTime.ToShortDateString(), StarTime.ToShortTimeString());
endTimeLabel.Text = string.Format("{0} {1}", EndTime.ToShortDateString(), EndTime.ToShortTimeString());
swVerLabel.Text = Ver;
procedureLabel.Text = ProcedureName;
purchaseOrderLabel.Text = PurchaseOrder;
passedCountLabel.Text = string.Format("{0}: {1}", Strings.Passed, PassedCount);
failedCountLabel.Text = string.Format("{0}: {1}", Strings.Failed, FailedCount);
switch (mode)
{
case PreviousResultsMode.Show: sendReloadButton.Text = Strings.Save_again; break;
case PreviousResultsMode.Reload: sendReloadButton.Text = Strings.Restore; break;
case PreviousResultsMode.Fix: sendReloadButton.Text = Strings.Fix; break;
}
showButton.Text = Strings.Show;
#if MUNICH
if (mode == PreviousResultsMode.Show) sendReloadButton.Text = Strings.Print_again;
sentCheckBox.Text = Strings.Printed;
sentCheckBox.Checked = Sent;
sendReloadButton.Enabled = true; /// 'Print again' function always available
#elif ORACLE_DB
sentCheckBox.Text = Strings.Sent;
sentCheckBox.Checked = Sent;
sendReloadButton.Enabled = (mode != PreviousResultsMode.Show) || !Sent;
#else
sentCheckBox.Visible = false;
sendReloadButton.Enabled = (mode != PreviousResultsMode.Show);
sendReloadButton.Visible = (mode != PreviousResultsMode.Show);
#endif
}
public void UpdateSentState(bool sent)
{
this.Sent = sent;
#if MUNICH
sentCheckBox.Checked = sent;
sendReloadButton.Enabled = true;
#elif ORACLE_DB
sentCheckBox.Checked = sent;
sendReloadButton.Enabled = !sent;
#endif
}
private void showButton_Click(object sender, EventArgs e)
{
parent.OnShowResults(this, new PreviousResultIdEventArgs(BatchNr));
}
private void sendReloadButton_MouseClick(object sender, MouseEventArgs e)
{
if (mode == PreviousResultsMode.Show)
{
parent.OnSendAgain(this, new PreviousResultIdEventArgs(BatchNr));
}
else if (mode == PreviousResultsMode.Reload)
{
parent.OnReload(this, new PreviousResultIdEventArgs(BatchNr));
}
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
else if (mode == PreviousResultsMode.Fix)
{
/// Access only to thise who manage production tracing
Users.Grp.GID[] rqrdGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TraceabilityManagement };
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, rqrdGroupMembership)).ShowDialog() != DialogResult.OK)
{
return;
}
parent.OnReloadAndFix(this, new PreviousResultIdEventArgs(BatchNr));
}
#endif
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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>
@@ -0,0 +1,14 @@
using System;
namespace TBF.UI.ResultsMI
{
public class PreviousResultIdEventArgs : EventArgs
{
public int BatchNr;
public PreviousResultIdEventArgs(int batchNr)
{
BatchNr = batchNr;
}
}
}
+104
View File
@@ -0,0 +1,104 @@
namespace TBF.UI.ResultsMI
{
partial class PreviousResultsDlg
{
/// <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.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeButton = new System.Windows.Forms.Button();
this.previousButton = new System.Windows.Forms.Button();
this.nextButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(1073, 897);
this.flowLayoutPanel1.TabIndex = 0;
//
// closeButton
//
this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.closeButton.Location = new System.Drawing.Point(1079, 12);
this.closeButton.Name = "closeButton";
this.closeButton.Size = new System.Drawing.Size(103, 37);
this.closeButton.TabIndex = 1;
this.closeButton.Text = "Close";
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
//
// previousButton
//
this.previousButton.Location = new System.Drawing.Point(1079, 82);
this.previousButton.Name = "previousButton";
this.previousButton.Size = new System.Drawing.Size(103, 37);
this.previousButton.TabIndex = 2;
this.previousButton.Text = "Previous";
this.previousButton.UseVisualStyleBackColor = true;
this.previousButton.Click += new System.EventHandler(this.previousButton_Click);
//
// nextButton
//
this.nextButton.Location = new System.Drawing.Point(1079, 125);
this.nextButton.Name = "nextButton";
this.nextButton.Size = new System.Drawing.Size(103, 37);
this.nextButton.TabIndex = 3;
this.nextButton.Text = "Next";
this.nextButton.UseVisualStyleBackColor = true;
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
//
// PreviousResultsDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.closeButton;
this.ClientSize = new System.Drawing.Size(1194, 892);
this.Controls.Add(this.nextButton);
this.Controls.Add(this.previousButton);
this.Controls.Add(this.closeButton);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "PreviousResultsDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Previous results";
this.Load += new System.EventHandler(this.PreviousResultsDlg_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button closeButton;
private System.Windows.Forms.Button previousButton;
private System.Windows.Forms.Button nextButton;
}
}
+373
View File
@@ -0,0 +1,373 @@
///
/// Copyright (c) 2016-2017 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using NHibernate;
using log4net;
using Oracle.DataAccess.Client;
using Results;
using Results.Entities;
using TBF.Resources;
using TBF.BenchControl.Output.DB.SensusOracle;
namespace TBF.UI.ResultsMI
{
public enum PreviousResultsMode
{
Show,
Reload,
Fix,
}
public partial class PreviousResultsDlg : Form
{
static readonly ILog log = LogManager.GetLogger(typeof(PreviousResultsDlg));
ISession session;
int currentBatchNr;
int lastDisplayedBatchNr;
const int LinesCount = 25;
IList<Batch> batches;
PreviousResultsMode mode;
public PreviousResultsDlg(PreviousResultsMode mode)
{
InitializeComponent();
this.mode = mode;
currentBatchNr = Program.LocalSettings.BatchNr;
SendAgainHandler += delegate(object sndr, PreviousResultIdEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<PreviousResultIdEventArgs>(DoSendAgain), sndr, args); }
else DoSendAgain(sndr, args);
};
ShowResultsHandler += delegate(object sndr, PreviousResultIdEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<PreviousResultIdEventArgs>(DoShowResults), sndr, args); }
else DoShowResults(sndr, args);
};
}
public PreviousResultsDlg()
: this(PreviousResultsMode.Show)
{
}
private void PreviousResultsDlg_Load(object sender, EventArgs e)
{
Localize();
session = DB.CreateSession();
lastDisplayedBatchNr = currentBatchNr - 1;
DrawBatches(lastDisplayedBatchNr - LinesCount + 1, lastDisplayedBatchNr);
UpdateButtons();
}
void Localize()
{
Text = Strings.Previous_results;
closeButton.Text = TBF.Resources.Strings.CloseBtnText;
previousButton.Text = TBF.Resources.Strings.Previous;
nextButton.Text = TBF.Resources.Strings.Next;
}
public void OnReload(object sender, PreviousResultIdEventArgs data)
{
foreach (var batch in batches)
{
if (batch.BatchNr == data.BatchNr)
{
TBF.UiBridge.Bridge.BatchNr = batch.BatchNr;
Program.MainWnd.ReloadProcedureComboBoxItems(batch.ProcedureName);
TBF.UiBridge.Bridge.Ui2Bench(TBF.UiBridge.UI2BenchCmd.ReloadBatch);
break;
}
}
DialogResult = DialogResult.Cancel;
Close();
}
public void OnReloadAndFix(object sender, PreviousResultIdEventArgs data)
{
foreach (var batch in batches)
{
if (batch.BatchNr == data.BatchNr)
{
TBF.UiBridge.Bridge.BatchNr = batch.BatchNr;
Program.MainWnd.ReloadProcedureComboBoxItems(batch.ProcedureName);
TBF.UiBridge.Bridge.Ui2Bench(TBF.UiBridge.UI2BenchCmd.ReloadAndFixBatch);
break;
}
}
DialogResult = DialogResult.Cancel;
Close();
}
public event EventHandler<PreviousResultIdEventArgs> SendAgainHandler;
/// <summary>
/// Called from PreviousResultCtrl when 'Send again' button pressed.
/// </summary>
public void OnSendAgain(object sender, PreviousResultIdEventArgs data)
{
if (SendAgainHandler == null) return;
try
{
SendAgainHandler(sender, data);
}
catch (Exception e)
{
log.Error("SendAgainHandler(...) failed", e);
}
}
public void DoSendAgain(object sender, PreviousResultIdEventArgs data)
{
foreach (var b in batches)
{
if (b.BatchNr == data.BatchNr)
{
#if ORACLE_DB
//System.IO.StreamWriter logger;
//string fname = "C:\\TBF\\Logs\\test.log";
//try { logger = new System.IO.StreamWriter(System.IO.File.Create(fname)); }
//catch
//{
// logger = null;
// log.ErrorFormat("Was not able to open LU log file {0}", fname);
//}
//Database.WriteLogsToDisk(logger, b);
using (ISession configSession = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
{
IList<Config.Entities.Component> cmpntEntities = configSession.QueryOver<Config.Entities.Component>()
.OrderBy(x => x.ItemNr).Asc
.Where(x => (x.ClassName == "Sensus-Oracle-Database"))
.List<Config.Entities.Component>();
if (cmpntEntities.Count == 0)
{
MessageBox.Show("Nepodarilo sa uložiť, neviem načítať nastavenia Oracle databázy",
Strings.Error,
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
TBF.BenchControl.Output.DB.SensusOracle.DatabaseCfg cfg = TBF.BenchControl.ComponentCfgBase.CreateFromDbEntity(DatabaseCfg.Serializer, cmpntEntities[0], null)
as TBF.BenchControl.Output.DB.SensusOracle.DatabaseCfg;
MessageBox.Show(string.Format("Výsledky budú zapísané do '{0}' databázy", cfg.DBUsed),
Strings.Information,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
OracleConnection conn;
switch (cfg.DBUsed)
{
default:
case DBUsed.Production:
conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
break;
case DBUsed.Quality:
conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltaqual;Password=test;");
break;
case DBUsed.Test:
conn = new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;");
break;
}
if ((TBF.BenchControl.Sequences.ProcessData.OracleDB != null) &&
(TBF.BenchControl.Sequences.ProcessData.OracleDB.WriteResultsToDB(conn, b, true) == Retv.OK))
{
b.RsltsSent = true; /// Result was successfully sent
session.SaveOrUpdate(b); /// Update MySQL DB
session.Flush();
(sender as PreviousResultCtrl).Sent = true; /// Update UI
Redraw();
}
}
#elif MUNICH
string docVersion = string.Empty;
foreach (var cmp in TBF.BenchControl.StateMachine.Components)
{
if (cmp.ClassName == "Output.Printers.Munich")
{
docVersion = (cmp as TBF.BenchControl.Output.Printers.Munich.Printer).Version;
break;
}
}
foreach (var wm in b.WaterMeters)
{
new Results.Output.Printers.Munich.MunichPrintDocument(docVersion, wm, Config.Entities.PageOrientation.Portrait).Print();
}
#endif
}
}
}
public event EventHandler<PreviousResultIdEventArgs> ShowResultsHandler;
/// <summary>
/// Called from PreviousResultCtrl when 'Show' button pressed.
/// </summary>
public void OnShowResults(object sender, PreviousResultIdEventArgs data)
{
if (ShowResultsHandler == null) return;
try { ShowResultsHandler(sender, data); }
catch (Exception e) { log.Error("ShowResultsHandler(...) failed", e); }
}
public void DoShowResults(object sender, PreviousResultIdEventArgs data)
{
foreach (var b in batches)
{
if (b.BatchNr == data.BatchNr)
{
if (b.WaterMeters == null || b.WaterMeters.Count == 0)
{
return; /// No water meters in the selected batch
}
/// Prepare result items
IList<WMeterRsltItemSpec> items = null;
foreach (var wm in b.WaterMeters)
{
if (wm != null)
{
if (wm.WaterMeterData.Compound)
{
items = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_CombinedWM);
}
else if (wm.WaterMeterData.HeatMeter)
{
items = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_HeatM);
}
else
{
items = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_SingleWM);
}
break;
}
}
if (items == null) items = new List<WMeterRsltItemSpec>();
/// Show dialog with results
Results.Forms.BatchResultsDlg dlg = new Results.Forms.BatchResultsDlg
{
Text = string.Format(Strings.Results_of_batch_0, b.BatchNr),
Results = BatchResults.FromBatch(b),
Items = items,
PopupResultsLeft = Program.LocalSettings.PopupResultsLeft,
PopupResultsTop = Program.LocalSettings.PopupResultsTop,
PopupResultsWidth = Program.LocalSettings.PopupResultsWidth,
PopupResultsHeight = Program.LocalSettings.PopupResultsHeight,
MetersArrangement = Program.LocalSettings.ResultsConfigMeters,
TestsArrangement = Program.LocalSettings.ResultsConfigTests,
NrMetersInOneGroup = Math.Max(1, Program.LocalSettings.ResultsConfigMetersInOneGroup),
ShowDisabledPositions = Program.LocalSettings.ShowDisabledPositions,
MinWidth = Program.LocalSettings.ResultsConfigMinWidth,
MinHeight = Program.LocalSettings.ResultsConfigMinHeight,
RsltsClmnWidths = Program.LocalSettings.RsltsClmnWidths,
};
dlg.Show();
break;
}
}
}
void DrawBatches(int from, int to)
{
batches = session.QueryOver<Batch>()
.WhereRestrictionOn(x => x.BatchNr)
.IsBetween(Math.Max(1, from))
.And(Math.Min(to, currentBatchNr - 1))
.OrderBy(x => x.BatchNr).Asc
.List<Batch>();
Redraw();
}
void Redraw()
{
SuspendLayout();
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
flowLayoutPanel1.Controls.Clear();
if (batches == null || batches.Count == 0) return;
foreach (var b in batches)
{
int passedCount = 0;
int failedCount = 0;
foreach (var wm in b.WaterMeters)
{
if ((wm != null) && wm.Passed) { passedCount++; } else { failedCount++; }
}
if (passedCount + failedCount == 0) continue;
flowLayoutPanel1.Controls.Add(new PreviousResultCtrl(this,
b.BatchNr,
b.StartTime,
b.EndTime,
b.ProgramVersion,
b.ProcedureName,
b.WaterMeters[0].PurchaseOrder,
passedCount,
failedCount,
b.RsltsSent,
mode));
}
ResumeLayout();
}
private void closeButton_Click(object sender, EventArgs e)
{
if (session != null) session.Close();
DialogResult = DialogResult.Cancel;
Close();
}
private void previousButton_Click(object sender, EventArgs e)
{
lastDisplayedBatchNr = Math.Max(lastDisplayedBatchNr - LinesCount, LinesCount);
DrawBatches(lastDisplayedBatchNr - LinesCount + 1, lastDisplayedBatchNr);
UpdateButtons();
}
private void nextButton_Click(object sender, EventArgs e)
{
lastDisplayedBatchNr = Math.Min(lastDisplayedBatchNr + LinesCount, currentBatchNr - 1);
DrawBatches(lastDisplayedBatchNr - LinesCount + 1, lastDisplayedBatchNr);
UpdateButtons();
}
private void UpdateButtons()
{
nextButton.Enabled = (lastDisplayedBatchNr < currentBatchNr - 1);
previousButton.Enabled = (lastDisplayedBatchNr > LinesCount);
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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>
+281
View File
@@ -0,0 +1,281 @@
///
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
///
namespace TBF.UI.ResultsMI
{
partial class ResultsArrangementDlg
{
/// <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.testsRowsRadioButton = new System.Windows.Forms.RadioButton();
this.testsColumnsRadioButton = new System.Windows.Forms.RadioButton();
this.testsArangementGroupBox = new System.Windows.Forms.GroupBox();
this.metersArangementGroupBox = new System.Windows.Forms.GroupBox();
this.showDisabledCheckBox = new System.Windows.Forms.CheckBox();
this.minHeightTextBox = new System.Windows.Forms.TextBox();
this.minHeightLabel = new System.Windows.Forms.Label();
this.minWidthTextBox = new System.Windows.Forms.TextBox();
this.minWidthLabel = new System.Windows.Forms.Label();
this.nrMetersTextBox = new System.Windows.Forms.TextBox();
this.nrMetersLabel = new System.Windows.Forms.Label();
this.verticallyRadioButton = new System.Windows.Forms.RadioButton();
this.horizontallyRadioButton = new System.Windows.Forms.RadioButton();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.unlockButton = new System.Windows.Forms.Button();
this.resultsConfigCtrl = new Results.Forms.ResultsConfigCtrl();
this.testsArangementGroupBox.SuspendLayout();
this.metersArangementGroupBox.SuspendLayout();
this.SuspendLayout();
//
// testsRowsRadioButton
//
this.testsRowsRadioButton.AutoSize = true;
this.testsRowsRadioButton.Enabled = false;
this.testsRowsRadioButton.Location = new System.Drawing.Point(21, 21);
this.testsRowsRadioButton.Name = "testsRowsRadioButton";
this.testsRowsRadioButton.Size = new System.Drawing.Size(120, 17);
this.testsRowsRadioButton.TabIndex = 0;
this.testsRowsRadioButton.TabStop = true;
this.testsRowsRadioButton.Text = "Tests are table rows";
this.testsRowsRadioButton.UseVisualStyleBackColor = true;
//
// testsColumnsRadioButton
//
this.testsColumnsRadioButton.AutoSize = true;
this.testsColumnsRadioButton.Enabled = false;
this.testsColumnsRadioButton.Location = new System.Drawing.Point(21, 43);
this.testsColumnsRadioButton.Name = "testsColumnsRadioButton";
this.testsColumnsRadioButton.Size = new System.Drawing.Size(137, 17);
this.testsColumnsRadioButton.TabIndex = 1;
this.testsColumnsRadioButton.TabStop = true;
this.testsColumnsRadioButton.Text = "Tests are table columns";
this.testsColumnsRadioButton.UseVisualStyleBackColor = true;
//
// testsArangementGroupBox
//
this.testsArangementGroupBox.Controls.Add(this.testsColumnsRadioButton);
this.testsArangementGroupBox.Controls.Add(this.testsRowsRadioButton);
this.testsArangementGroupBox.Location = new System.Drawing.Point(14, 12);
this.testsArangementGroupBox.Name = "testsArangementGroupBox";
this.testsArangementGroupBox.Size = new System.Drawing.Size(305, 70);
this.testsArangementGroupBox.TabIndex = 2;
this.testsArangementGroupBox.TabStop = false;
this.testsArangementGroupBox.Text = "Arangement of tests";
//
// metersArangementGroupBox
//
this.metersArangementGroupBox.Controls.Add(this.showDisabledCheckBox);
this.metersArangementGroupBox.Controls.Add(this.minHeightTextBox);
this.metersArangementGroupBox.Controls.Add(this.minHeightLabel);
this.metersArangementGroupBox.Controls.Add(this.minWidthTextBox);
this.metersArangementGroupBox.Controls.Add(this.minWidthLabel);
this.metersArangementGroupBox.Controls.Add(this.nrMetersTextBox);
this.metersArangementGroupBox.Controls.Add(this.nrMetersLabel);
this.metersArangementGroupBox.Controls.Add(this.verticallyRadioButton);
this.metersArangementGroupBox.Controls.Add(this.horizontallyRadioButton);
this.metersArangementGroupBox.Location = new System.Drawing.Point(325, 12);
this.metersArangementGroupBox.Name = "metersArangementGroupBox";
this.metersArangementGroupBox.Size = new System.Drawing.Size(593, 70);
this.metersArangementGroupBox.TabIndex = 3;
this.metersArangementGroupBox.TabStop = false;
this.metersArangementGroupBox.Text = "Arangement of tested meters";
//
// showDisabledCheckBox
//
this.showDisabledCheckBox.AutoSize = true;
this.showDisabledCheckBox.Enabled = false;
this.showDisabledCheckBox.Location = new System.Drawing.Point(200, 44);
this.showDisabledCheckBox.Name = "showDisabledCheckBox";
this.showDisabledCheckBox.Size = new System.Drawing.Size(139, 17);
this.showDisabledCheckBox.TabIndex = 10;
this.showDisabledCheckBox.Text = "Show disabled positions";
this.showDisabledCheckBox.UseVisualStyleBackColor = true;
//
// minHeightTextBox
//
this.minHeightTextBox.Enabled = false;
this.minHeightTextBox.Location = new System.Drawing.Point(496, 40);
this.minHeightTextBox.Name = "minHeightTextBox";
this.minHeightTextBox.Size = new System.Drawing.Size(41, 20);
this.minHeightTextBox.TabIndex = 9;
//
// minHeightLabel
//
this.minHeightLabel.AutoSize = true;
this.minHeightLabel.Location = new System.Drawing.Point(419, 43);
this.minHeightLabel.Name = "minHeightLabel";
this.minHeightLabel.Size = new System.Drawing.Size(62, 13);
this.minHeightLabel.TabIndex = 8;
this.minHeightLabel.Text = "Min. height:";
//
// minWidthTextBox
//
this.minWidthTextBox.Enabled = false;
this.minWidthTextBox.Location = new System.Drawing.Point(496, 16);
this.minWidthTextBox.Name = "minWidthTextBox";
this.minWidthTextBox.Size = new System.Drawing.Size(41, 20);
this.minWidthTextBox.TabIndex = 7;
//
// minWidthLabel
//
this.minWidthLabel.AutoSize = true;
this.minWidthLabel.Location = new System.Drawing.Point(419, 19);
this.minWidthLabel.Name = "minWidthLabel";
this.minWidthLabel.Size = new System.Drawing.Size(58, 13);
this.minWidthLabel.TabIndex = 6;
this.minWidthLabel.Text = "Min. width:";
//
// nrMetersTextBox
//
this.nrMetersTextBox.Enabled = false;
this.nrMetersTextBox.Location = new System.Drawing.Point(330, 16);
this.nrMetersTextBox.Name = "nrMetersTextBox";
this.nrMetersTextBox.Size = new System.Drawing.Size(41, 20);
this.nrMetersTextBox.TabIndex = 5;
//
// nrMetersLabel
//
this.nrMetersLabel.AutoSize = true;
this.nrMetersLabel.Location = new System.Drawing.Point(197, 19);
this.nrMetersLabel.Name = "nrMetersLabel";
this.nrMetersLabel.Size = new System.Drawing.Size(108, 13);
this.nrMetersLabel.TabIndex = 4;
this.nrMetersLabel.Text = "Nr. meters in a group:";
//
// verticallyRadioButton
//
this.verticallyRadioButton.AutoSize = true;
this.verticallyRadioButton.Enabled = false;
this.verticallyRadioButton.Location = new System.Drawing.Point(21, 21);
this.verticallyRadioButton.Name = "verticallyRadioButton";
this.verticallyRadioButton.Size = new System.Drawing.Size(67, 17);
this.verticallyRadioButton.TabIndex = 3;
this.verticallyRadioButton.TabStop = true;
this.verticallyRadioButton.Text = "Vertically";
this.verticallyRadioButton.UseVisualStyleBackColor = true;
//
// horizontallyRadioButton
//
this.horizontallyRadioButton.AutoSize = true;
this.horizontallyRadioButton.Enabled = false;
this.horizontallyRadioButton.Location = new System.Drawing.Point(21, 43);
this.horizontallyRadioButton.Name = "horizontallyRadioButton";
this.horizontallyRadioButton.Size = new System.Drawing.Size(79, 17);
this.horizontallyRadioButton.TabIndex = 2;
this.horizontallyRadioButton.TabStop = true;
this.horizontallyRadioButton.Text = "Horizontally";
this.horizontallyRadioButton.UseVisualStyleBackColor = true;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.Location = new System.Drawing.Point(937, 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(937, 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;
//
// unlockButton
//
this.unlockButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.unlockButton.Location = new System.Drawing.Point(937, 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);
//
// resultsConfigCtrl
//
this.resultsConfigCtrl.Location = new System.Drawing.Point(3, 85);
this.resultsConfigCtrl.Name = "resultsConfigCtrl";
this.resultsConfigCtrl.Size = new System.Drawing.Size(925, 496);
this.resultsConfigCtrl.TabIndex = 53;
this.resultsConfigCtrl.Unlocked = false;
//
// ResultsArrangementDlg
//
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(1056, 579);
this.Controls.Add(this.resultsConfigCtrl);
this.Controls.Add(this.unlockButton);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.Controls.Add(this.metersArangementGroupBox);
this.Controls.Add(this.testsArangementGroupBox);
this.Name = "ResultsArrangementDlg";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ResultsConfig";
this.Load += new System.EventHandler(this.ResultsConfig_Load);
this.testsArangementGroupBox.ResumeLayout(false);
this.testsArangementGroupBox.PerformLayout();
this.metersArangementGroupBox.ResumeLayout(false);
this.metersArangementGroupBox.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.RadioButton testsRowsRadioButton;
private System.Windows.Forms.RadioButton testsColumnsRadioButton;
private System.Windows.Forms.GroupBox testsArangementGroupBox;
private System.Windows.Forms.GroupBox metersArangementGroupBox;
private System.Windows.Forms.RadioButton verticallyRadioButton;
private System.Windows.Forms.RadioButton horizontallyRadioButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button unlockButton;
private System.Windows.Forms.TextBox nrMetersTextBox;
private System.Windows.Forms.Label nrMetersLabel;
private Results.Forms.ResultsConfigCtrl resultsConfigCtrl;
private System.Windows.Forms.TextBox minHeightTextBox;
private System.Windows.Forms.Label minHeightLabel;
private System.Windows.Forms.TextBox minWidthTextBox;
private System.Windows.Forms.Label minWidthLabel;
private System.Windows.Forms.CheckBox showDisabledCheckBox;
}
}
+141
View File
@@ -0,0 +1,141 @@
///
/// Copyright (c) 2013-2017 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Config.Entities;
using Results;
using TBF.Resources;
namespace TBF.UI.ResultsMI
{
public partial class ResultsArrangementDlg : Form
{
/// <summary>
/// Required access rights to make changes with this form
/// </summary>
static readonly Users.Grp.GID[] RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
public bool Unlocked; /// true = changes enabled
public TestsArrangement TestsArrangement;
public MetersArrangement MetersArrangement;
public int NrMetersInOneGroup;
public bool ShowDisabledPositions;
public int MinWidth;
public int MinHeight;
public IList<WMeterRsltItemSpec> SelectedItems
{
set { resultsConfigCtrl.SelectedItems = value; }
get { return resultsConfigCtrl.SelectedItems; }
}
public MetersKind MetersKind
{
set
{
resultsConfigCtrl.MetersKind = mtrsKind = value;
Text = string.Format("{0} ({1})", Strings.Configuration, mtrsKind.ToDescription());
}
}
MetersKind mtrsKind;
public ResultsArrangementDlg()
{
InitializeComponent();
resultsConfigCtrl.SupressTestIDColumn = true;
Unlocked = false;
cancelButton.Visible = false;
}
void Localize()
{
Text = string.Format("{0} ({1})", Strings.Configuration, mtrsKind.ToDescription());
testsArangementGroupBox.Text = Strings.Arrangement_of_tests;
metersArangementGroupBox.Text = Strings.Arrangement_of_meters;
testsRowsRadioButton.Text = Strings.Tests_are_rows;
testsColumnsRadioButton.Text = Strings.Tests_are_columns;
horizontallyRadioButton.Text = Strings.Horizontally;
verticallyRadioButton.Text = Strings.Vertically;
nrMetersLabel.Text = string.Format("{0}:", Strings.Nr_meters_in_a_group);
showDisabledCheckBox.Text = Strings.Show_disabled_positions;
minWidthLabel.Text = string.Format("{0}:", Strings.Min_width);
minHeightLabel.Text = string.Format("{0}:", Strings.Min_height);
unlockButton.Text = Strings.UnlockBtnText;
okButton.Text = Strings.CloseBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
void ResultsConfig_Load(object sender, EventArgs e)
{
Localize();
testsRowsRadioButton.Checked = (TestsArrangement == TestsArrangement.Rows);
testsColumnsRadioButton.Checked = (TestsArrangement == TestsArrangement.Columns);
horizontallyRadioButton.Checked = (MetersArrangement == MetersArrangement.Horizontally);
verticallyRadioButton.Checked = (MetersArrangement == MetersArrangement.Vertically);
nrMetersTextBox.Text = NrMetersInOneGroup.ToString();
showDisabledCheckBox.Checked = ShowDisabledPositions;
minWidthTextBox.Text = MinWidth.ToString();
minHeightTextBox.Text = MinHeight.ToString();
}
void unlockButton_Click(object sender, EventArgs e)
{
if (!Unlocked)
{
if (!Users.GlobalData.CurrentUser.IsMemberOf(RequiredGroupMembership))
{
if ((new Users.Forms.LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
return;
}
else if (Program.LocalSettings.AlwaysAskPasswdWhenUnlocking)
{
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
return;
}
if (Program.MainWnd != null) Program.MainWnd.UpdateUser();
Unlocked = true;
///
/// Unlock user interface controls
///
unlockButton.Enabled = false;
okButton.Text = Strings.OkBtnText;
cancelButton.Visible = true;
testsRowsRadioButton.Enabled = true;
testsColumnsRadioButton.Enabled = true;
verticallyRadioButton.Enabled = true;
horizontallyRadioButton.Enabled = true;
nrMetersTextBox.Enabled = true;
showDisabledCheckBox.Enabled = true;
minWidthTextBox.Enabled = true;
minHeightTextBox.Enabled = true;
resultsConfigCtrl.Unlocked = true;
}
}
void okButton_Click(object sender, EventArgs e)
{
TestsArrangement = testsColumnsRadioButton.Checked ? TestsArrangement.Columns : TestsArrangement.Rows;
MetersArrangement = horizontallyRadioButton.Checked ? MetersArrangement.Horizontally : MetersArrangement.Vertically;
ShowDisabledPositions = showDisabledCheckBox.Checked;
int tmpInt;
if (int.TryParse(nrMetersTextBox.Text, out tmpInt) && tmpInt > 0) { NrMetersInOneGroup = tmpInt; }
if (int.TryParse(minWidthTextBox.Text, out tmpInt) && tmpInt >= 0) { MinWidth = tmpInt; }
if (int.TryParse(minHeightTextBox.Text, out tmpInt) && tmpInt >= 0) { MinHeight = tmpInt; }
DialogResult = DialogResult.OK;
Close();
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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>
+295
View File
@@ -0,0 +1,295 @@
///
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
///
namespace TBF.UI.ResultsMI
{
partial class ResultsTabPageCtrl
{
/// <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 Component 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.splitContainer = new System.Windows.Forms.SplitContainer();
this.fixPreviousResultsButton = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.reloadPreviousResultsButton = new System.Windows.Forms.Button();
this.columnWidthsButton = new System.Windows.Forms.Button();
this.showPreviousResultsButton = new System.Windows.Forms.Button();
this.configureButton = new System.Windows.Forms.Button();
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// splitContainer
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer.IsSplitterFixed = true;
this.splitContainer.Location = new System.Drawing.Point(0, 0);
this.splitContainer.Name = "splitContainer";
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer.Panel1
//
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer.Panel1.Controls.Add(this.fixPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.label5);
this.splitContainer.Panel1.Controls.Add(this.label4);
this.splitContainer.Panel1.Controls.Add(this.label3);
this.splitContainer.Panel1.Controls.Add(this.label2);
this.splitContainer.Panel1.Controls.Add(this.label1);
this.splitContainer.Panel1.Controls.Add(this.pictureBox5);
this.splitContainer.Panel1.Controls.Add(this.pictureBox4);
this.splitContainer.Panel1.Controls.Add(this.pictureBox3);
this.splitContainer.Panel1.Controls.Add(this.pictureBox2);
this.splitContainer.Panel1.Controls.Add(this.pictureBox1);
this.splitContainer.Panel1.Controls.Add(this.reloadPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.columnWidthsButton);
this.splitContainer.Panel1.Controls.Add(this.showPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.configureButton);
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.flowLayoutPanel);
this.splitContainer.Size = new System.Drawing.Size(1315, 706);
this.splitContainer.SplitterDistance = 42;
this.splitContainer.TabIndex = 0;
//
// fixPreviousResultsButton
//
this.fixPreviousResultsButton.Location = new System.Drawing.Point(1248, 10);
this.fixPreviousResultsButton.Name = "fixPreviousResultsButton";
this.fixPreviousResultsButton.Size = new System.Drawing.Size(49, 30);
this.fixPreviousResultsButton.TabIndex = 14;
this.fixPreviousResultsButton.Text = "Fix";
this.fixPreviousResultsButton.UseVisualStyleBackColor = true;
this.fixPreviousResultsButton.Visible = false;
this.fixPreviousResultsButton.Click += new System.EventHandler(this.fixPreviousResultsButton_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(1124, 19);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 13);
this.label5.TabIndex = 13;
this.label5.Text = "label5";
this.label5.Visible = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(1004, 19);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 13);
this.label4.TabIndex = 12;
this.label4.Text = "label4";
this.label4.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(884, 19);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(35, 13);
this.label3.TabIndex = 11;
this.label3.Text = "label3";
this.label3.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(739, 19);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 10;
this.label2.Text = "label2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(644, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 9;
this.label1.Text = "label1";
//
// pictureBox5
//
this.pictureBox5.Location = new System.Drawing.Point(1090, 10);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(28, 29);
this.pictureBox5.TabIndex = 8;
this.pictureBox5.TabStop = false;
this.pictureBox5.Visible = false;
//
// pictureBox4
//
this.pictureBox4.Location = new System.Drawing.Point(970, 10);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(28, 29);
this.pictureBox4.TabIndex = 7;
this.pictureBox4.TabStop = false;
this.pictureBox4.Visible = false;
//
// pictureBox3
//
this.pictureBox3.Location = new System.Drawing.Point(850, 10);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(28, 29);
this.pictureBox3.TabIndex = 6;
this.pictureBox3.TabStop = false;
this.pictureBox3.Visible = false;
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(705, 10);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(28, 29);
this.pictureBox2.TabIndex = 5;
this.pictureBox2.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(610, 10);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(28, 29);
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// reloadPreviousResultsButton
//
this.reloadPreviousResultsButton.Enabled = false;
this.reloadPreviousResultsButton.Location = new System.Drawing.Point(405, 10);
this.reloadPreviousResultsButton.Name = "reloadPreviousResultsButton";
this.reloadPreviousResultsButton.Size = new System.Drawing.Size(185, 30);
this.reloadPreviousResultsButton.TabIndex = 3;
this.reloadPreviousResultsButton.Text = "Reload previous results";
this.reloadPreviousResultsButton.UseVisualStyleBackColor = true;
this.reloadPreviousResultsButton.Click += new System.EventHandler(this.reloadPreviousResultsButton_Click);
//
// columnWidthsButton
//
this.columnWidthsButton.Location = new System.Drawing.Point(126, 10);
this.columnWidthsButton.Name = "columnWidthsButton";
this.columnWidthsButton.Size = new System.Drawing.Size(120, 30);
this.columnWidthsButton.TabIndex = 1;
this.columnWidthsButton.Text = "Save column widths";
this.columnWidthsButton.UseVisualStyleBackColor = true;
this.columnWidthsButton.Click += new System.EventHandler(this.columnWidthsButton_Click);
//
// showPreviousResultsButton
//
this.showPreviousResultsButton.Location = new System.Drawing.Point(252, 10);
this.showPreviousResultsButton.Name = "showPreviousResultsButton";
this.showPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
this.showPreviousResultsButton.TabIndex = 2;
this.showPreviousResultsButton.Text = "Show previous results";
this.showPreviousResultsButton.UseVisualStyleBackColor = true;
this.showPreviousResultsButton.Click += new System.EventHandler(this.showPreviousResultsButton_Click);
//
// configureButton
//
this.configureButton.Location = new System.Drawing.Point(20, 10);
this.configureButton.Name = "configureButton";
this.configureButton.Size = new System.Drawing.Size(100, 30);
this.configureButton.TabIndex = 0;
this.configureButton.Text = "Configure";
this.configureButton.UseVisualStyleBackColor = true;
this.configureButton.Click += new System.EventHandler(this.configureButton_Click);
//
// flowLayoutPanel
//
this.flowLayoutPanel.AutoScroll = true;
this.flowLayoutPanel.BackColor = System.Drawing.SystemColors.Control;
this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel.Name = "flowLayoutPanel";
this.flowLayoutPanel.Size = new System.Drawing.Size(1315, 660);
this.flowLayoutPanel.TabIndex = 0;
this.flowLayoutPanel.SizeChanged += new System.EventHandler(this.flowLayoutPanel_SizeChanged);
//
// ResultsTabPageCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Silver;
this.Controls.Add(this.splitContainer);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Name = "ResultsTabPageCtrl";
this.Size = new System.Drawing.Size(1315, 706);
this.Load += new System.EventHandler(this.ResultsTabPageCtrl_Load);
this.splitContainer.Panel1.ResumeLayout(false);
this.splitContainer.Panel1.PerformLayout();
this.splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer;
private System.Windows.Forms.Button configureButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
private System.Windows.Forms.Button columnWidthsButton;
private System.Windows.Forms.Button showPreviousResultsButton;
private System.Windows.Forms.Button reloadPreviousResultsButton;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button fixPreviousResultsButton;
}
}
+637
View File
@@ -0,0 +1,637 @@
///
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using log4net;
using NHibernate;
using Config.Entities;
using Results;
using Results.Forms;
using Results.Entities;
using TracingDB.Entities;
using TBF.Resources;
using TBF.UiBridge;
namespace TBF.UI.ResultsMI
{
public partial class ResultsTabPageCtrl : UserControl
{
static readonly ILog log = LogManager.GetLogger(typeof(ResultsTabPageCtrl));
static readonly Color NotCompletedColor = Color.White;
static readonly Color OkColor = Color.LightGreen;
static readonly Color NokColor = Color.LightPink;
static readonly Color RejectColor = Color.Magenta;
static readonly Color ProductionTracing = Color.RoyalBlue;
static readonly Color WrongDirection = Color.Gold;
static readonly Color WrongQ2FactorsColor = Color.Red;
public MetersArrangement MetersArrangement;
public TestsArrangement TestsArrangement;
public int NrMetersInOneGroup;
public bool ShowDisabledPositions;
public int MinWidth;
public int MinHeight;
public IList<WMeterRsltItemSpec> RsltItems_Screen_SingleWM;
public IList<WMeterRsltItemSpec> RsltItems_Screen_CombinedWM;
public IList<WMeterRsltItemSpec> RsltItems_Screen_HeatM;
MetersKind metersKind;
IList<WMeterRsltItemSpec> currentItems;
IOneWMResultsCtrl[] wmRsltsCtrl; /// An array of controls with water meter results.
IOneWMResultsCtrl firstEnabledControl;
DateTime lastRedraw;
DateTime lastSizeChange;
int metersInOneGroup;
int nrGroups;
Timer timer;
/// <summary>
/// Constructor
/// </summary>
public ResultsTabPageCtrl()
{
InitializeComponent();
wmRsltsCtrl = new IOneWMResultsCtrl[0]; /// No water meters displayed => array with zero length
firstEnabledControl = null; /// No water meters displayed => firstListView is null
currentItems = new List<WMeterRsltItemSpec>();
nrGroups = 1;
metersInOneGroup = 1;
if (Program.LocalSettings != null)
{
MetersArrangement = Program.LocalSettings.ResultsConfigMeters;
TestsArrangement = Program.LocalSettings.ResultsConfigTests;
NrMetersInOneGroup = Math.Max(1, Program.LocalSettings.ResultsConfigMetersInOneGroup);
ShowDisabledPositions = Program.LocalSettings.ShowDisabledPositions;
MinWidth = Program.LocalSettings.ResultsConfigMinWidth;
MinHeight = Program.LocalSettings.ResultsConfigMinHeight;
RsltItems_Screen_SingleWM = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_SingleWM);
RsltItems_Screen_CombinedWM = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_CombinedWM);
RsltItems_Screen_HeatM = WMeterRsltItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Screen_HeatM);
currentItems = GetRsltItems(metersKind);
}
Bridge.ProcedureSelectedHandler += delegate(object sender, ProcedureSelectedEventArgs args)
{
if (InvokeRequired)
Invoke(new EventHandler<ProcedureSelectedEventArgs>(OnProcedureSelected), sender, args);
else
OnProcedureSelected(sender, args);
};
Bridge.TestCompletedHandler += delegate(object sender, TestCompletedEventArgs args)
{
if (InvokeRequired)
Invoke(new EventHandler<TestCompletedEventArgs>(OnTestCompleted), sender, args);
else
OnTestCompleted(sender, args);
};
Bridge.ButtonsEtcHandler += delegate(object sndr, ButtonsEtcEventArgs args)
{
if (InvokeRequired)
Invoke(new EventHandler<ButtonsEtcEventArgs>(OnButtonsEtc), sndr, args);
else
OnButtonsEtc(sndr, args);
};
lastSizeChange = DateTime.Now;
/// Create a timer with one second interval.
timer = new Timer();
timer.Interval = 1000; /// ms
timer.Tick += new EventHandler(OnTimer);
timer.Start();
}
void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args)
{
BatchResults batchResults = TBF.BenchControl.Sequences.ProcessData.BatchRslts;
if ((batchResults != null) && (Program.LocalSettings != null))
{
Results.Utils.GetCounterStates(batchResults.Batch, Program.LocalSettings.Counters);
}
if (IsLayoutChangedDueToData(batchResults)) CreateControlsAndFillPanel(batchResults);
UpdateResults(batchResults);
}
void OnTestCompleted(object sender, TestCompletedEventArgs args)
{
BatchResults batchResults = TBF.BenchControl.Sequences.ProcessData.BatchRslts;
if ((batchResults != null) && (Program.LocalSettings != null))
{
Results.Utils.GetCounterStates(batchResults.Batch, Program.LocalSettings.Counters);
}
if (IsLayoutChangedDueToData(batchResults)) CreateControlsAndFillPanel(batchResults);
UpdateResults(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
}
void OnButtonsEtc(object sender, UiBridge.ButtonsEtcEventArgs args)
{
reloadPreviousResultsButton.Enabled = ((args.Flags & UiBridge.ButtonsEtc.ProcedureCmbBoxEn) != 0);
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
fixPreviousResultsButton.Visible = ((args.Flags & UiBridge.ButtonsEtc.ProcedureCmbBoxEn) != 0);
#endif
}
private void ResultsTabPageCtrl_Load(object sender, EventArgs e)
{
// Localization
configureButton.Text = Strings.Configure;
columnWidthsButton.Text = Strings.Save_column_widths;
showPreviousResultsButton.Text = Strings.Previous_results;
reloadPreviousResultsButton.Text = Strings.Reload_previous_results;
fixPreviousResultsButton.Text = Strings.Fix;
pictureBox1.BackColor = OkColor;
label1.Text = Strings.Passed;
pictureBox2.BackColor = NokColor;
label2.Text = Strings.Failed;
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
label2.Text += " (zopakovať)";
pictureBox3.BackColor = RejectColor;
pictureBox3.Visible = true;
label3.Text = "Vyradiť";
label3.Visible = true;
pictureBox4.BackColor = WrongDirection;
pictureBox4.Visible = true;
label4.Text = "Otočiť smer";
label4.Visible = true;
pictureBox5.BackColor = ProductionTracing;
pictureBox5.Visible = true;
label5.Text = "Vrátiť na predch. krok";
label5.Visible = true;
#endif
if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && (Program.LocalSettings != null))
{
Results.Utils.GetCounterStates(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch, Program.LocalSettings.Counters);
}
CreateControlsAndFillPanel(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
UpdateResults(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
}
IList<WMeterRsltItemSpec> GetRsltItems(MetersKind metersKind)
{
IList<WMeterRsltItemSpec> srcItems;
switch (metersKind)
{
default:
case MetersKind.Single: srcItems = RsltItems_Screen_SingleWM; break;
case MetersKind.Combined: srcItems = RsltItems_Screen_CombinedWM; break;
case MetersKind.HeatMeter: srcItems = RsltItems_Screen_HeatM; break;
}
IList<WMeterRsltItemSpec> copiedItems = new List<WMeterRsltItemSpec>();
if (srcItems != null)
{
foreach (var it in srcItems) copiedItems.Add(it.Clone());
}
return copiedItems;
}
/// <summary>
/// Handle button at the top of this form: Invoke a configuration dialog
/// </summary>
private void configureButton_Click(object sender, EventArgs e)
{
ResultsArrangementDlg dlg = new ResultsArrangementDlg();
dlg.MetersKind = metersKind;
dlg.TestsArrangement = TestsArrangement;
dlg.MetersArrangement = MetersArrangement;
dlg.NrMetersInOneGroup = NrMetersInOneGroup;
dlg.ShowDisabledPositions = ShowDisabledPositions;
dlg.MinWidth = MinWidth;
dlg.MinHeight = MinHeight;
dlg.SelectedItems = GetRsltItems(metersKind);
DialogResult dr = dlg.ShowDialog();
if (dr == DialogResult.OK && dlg.Unlocked)
{
bool isLayoutChangedDueToConfig = false;
if ((MetersArrangement != dlg.MetersArrangement) ||
(TestsArrangement != dlg.TestsArrangement) ||
(NrMetersInOneGroup != dlg.NrMetersInOneGroup) ||
(ShowDisabledPositions != dlg.ShowDisabledPositions) ||
(MinWidth != dlg.MinWidth) ||
(MinHeight != dlg.MinHeight))
{
Program.LocalSettings.ResultsConfigMeters = MetersArrangement = dlg.MetersArrangement;;
Program.LocalSettings.ResultsConfigTests = TestsArrangement = dlg.TestsArrangement;
Program.LocalSettings.ResultsConfigMetersInOneGroup = NrMetersInOneGroup = dlg.NrMetersInOneGroup;
Program.LocalSettings.ShowDisabledPositions = ShowDisabledPositions = dlg.ShowDisabledPositions;
Program.LocalSettings.ResultsConfigMinWidth = MinWidth = dlg.MinWidth;
Program.LocalSettings.ResultsConfigMinHeight = MinHeight = dlg.MinHeight;
isLayoutChangedDueToConfig = true;
}
switch (metersKind)
{
default:
case MetersKind.Single:
RsltItems_Screen_SingleWM = dlg.SelectedItems;
Program.LocalSettings.RsltItems_Screen_SingleWM = WMeterRsltItemSpec.ToStrArray(RsltItems_Screen_SingleWM);
break;
case MetersKind.Combined:
RsltItems_Screen_CombinedWM = dlg.SelectedItems;
Program.LocalSettings.RsltItems_Screen_CombinedWM = WMeterRsltItemSpec.ToStrArray(RsltItems_Screen_CombinedWM);
break;
case MetersKind.HeatMeter:
RsltItems_Screen_HeatM = dlg.SelectedItems;
Program.LocalSettings.RsltItems_Screen_HeatM = WMeterRsltItemSpec.ToStrArray(RsltItems_Screen_HeatM);
break;
}
UpdateItems(dlg.SelectedItems);
Program.LocalSettings.Save();
if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && (Program.LocalSettings != null))
{
Results.Utils.GetCounterStates(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch, Program.LocalSettings.Counters);
}
if (isLayoutChangedDueToConfig)
{
CreateControlsAndFillPanel(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
}
UpdateResults(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
}
}
/// <summary>
/// Handle button at the top of this form: Propagate column widths
/// </summary>
private void columnWidthsButton_Click(object sender, EventArgs e)
{
if (firstEnabledControl == null) return;
/// Get column widths from the first control
Program.LocalSettings.RsltsClmnWidths = new int[firstEnabledControl.Columns.Count];
for (int i = 0; i < firstEnabledControl.Columns.Count; i++)
{
Program.LocalSettings.RsltsClmnWidths[i] = firstEnabledControl.Columns[i].Width;
}
Program.LocalSettings.Save();
if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && (Program.LocalSettings != null))
{
Results.Utils.GetCounterStates(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch, Program.LocalSettings.Counters);
}
UpdateColumnWidths(Program.LocalSettings.RsltsClmnWidths);
}
///
/// Handle other buttons at the top of this form
///
private void showPreviousResultsButton_Click(object sender, EventArgs e)
{
new PreviousResultsDlg().ShowDialog();
}
private void reloadPreviousResultsButton_Click(object sender, EventArgs e)
{
new PreviousResultsDlg(PreviousResultsMode.Reload).ShowDialog();
}
private void fixPreviousResultsButton_Click(object sender, EventArgs e)
{
new PreviousResultsDlg(PreviousResultsMode.Fix).ShowDialog();
}
///
/// Handle double-click inside a water meter results control
///
void OnDoubleClick(object sender, WaterMeterEventArgs args)
{
int waterMetersCount = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters.Length;
WaterMeter wm;
if ((args.WMPosition <= 0) || (args.WMPosition > waterMetersCount) ||
((wm = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters[args.WMPosition - 1]) == null))
{
MessageBox.Show(Strings.No_water_meter);
return;
}
ShowMoreWMResults(wm);
}
void UpdateColumnWidths(int[] columnWidths)
{
foreach (var ctrl in wmRsltsCtrl) ctrl.Update(columnWidths);
}
void UpdateScrollpositions(int scrollStart)
{
/// TODO
}
void UpdateItems(IList<WMeterRsltItemSpec> items)
{
bool updateItems = false;
if (currentItems.Count != items.Count)
{
/// Current and new item counts are different
updateItems = true;
}
else
{
/// Current and new item counts are the same
for (int i = 0; i < currentItems.Count; i++)
{
if (currentItems[i] != items[i])
{
updateItems = true;
break;
}
}
}
if (updateItems)
{
/// Update items in all controls
currentItems = items;
foreach (var oneCtrl in wmRsltsCtrl) oneCtrl.Update(items);
}
}
bool IsLayoutChangedDueToData(BatchResults results)
{
if (results == null || results.WaterMeters == null || results.WaterMeters.Length == 0)
{
/// 'results' contain no water meters, wmRsltsCtrl.Lenght == 0 expected
return (wmRsltsCtrl.Length != 0); /// true when there are currently water meters on screen
}
///
/// Determine water meter positions count
///
int displayedWatermetersCount = 0;
for (int i = 0; i < results.WaterMeters.Length; i++)
{
if (results.WaterMeters[i] != null)
{
if (ShowDisabledPositions || !results.WaterMeters[i].Disabled)
{
displayedWatermetersCount++;
}
}
}
return (displayedWatermetersCount != wmRsltsCtrl.Length);
}
/// <summary>
/// Re-draw the results. Apply new settings if they changed.
/// </summary>
void CreateControlsAndFillPanel(BatchResults results)
{
if ((results == null) || (results.WMPositionsCount == 0))
{
/// There are no water meters at all
DeleteHandlers();
flowLayoutPanel.Controls.Clear();
wmRsltsCtrl = new OneWMResultsRowsCtrl[0];
firstEnabledControl = null;
return;
}
///
/// Determine water meter positions count
///
int displayedControlsCount = 0;
for (int i = 0; i < results.WaterMeters.Length; i++)
{
if (results.WaterMeters[i] != null)
{
if (ShowDisabledPositions || !results.WaterMeters[i].Disabled)
{
displayedControlsCount++;
}
}
}
///
/// Calculate geometry
///
metersInOneGroup = Math.Max(1, Math.Min(displayedControlsCount, NrMetersInOneGroup));
nrGroups = Math.Max(1, (displayedControlsCount + metersInOneGroup - 1) / metersInOneGroup);
int oneWidth;
int oneHeight;
///
if (MetersArrangement == MetersArrangement.Horizontally)
{
flowLayoutPanel.FlowDirection = FlowDirection.LeftToRight;
oneWidth = Math.Max(MinWidth, flowLayoutPanel.Width / metersInOneGroup - 6);
oneHeight = Math.Max(MinHeight, flowLayoutPanel.Height / nrGroups - 6);
}
else
{
flowLayoutPanel.FlowDirection = FlowDirection.TopDown;
oneWidth = Math.Max(MinWidth, flowLayoutPanel.Width / nrGroups - 6);
oneHeight = Math.Max(MinHeight, flowLayoutPanel.Height / metersInOneGroup - 6);
}
///
/// Create controls and fill the FlowLayoutPanel
///
flowLayoutPanel.SuspendLayout();
DeleteHandlers();
flowLayoutPanel.Controls.Clear();
flowLayoutPanel.WrapContents = true;
flowLayoutPanel.AutoScroll = true;
wmRsltsCtrl = new IOneWMResultsCtrl[displayedControlsCount];
int ix = 0;
firstEnabledControl = null;
for (int i = 0; i < results.WaterMeters.Length; i++)
{
if (results.WaterMeters[i] != null)
{
if (!results.WaterMeters[i].Disabled || ShowDisabledPositions)
{
/// Create one water meter position / control
wmRsltsCtrl[ix] = (TestsArrangement == TestsArrangement.Rows)
? new OneWMResultsRowsCtrl() as IOneWMResultsCtrl
: new OneWMResultsColumnsCtrl() as IOneWMResultsCtrl;
wmRsltsCtrl[ix].Width = oneWidth;
wmRsltsCtrl[ix].Height = oneHeight;
wmRsltsCtrl[ix].Update(currentItems);
wmRsltsCtrl[ix].WMResultsClickedHandler += HandleDoubleClick;
flowLayoutPanel.Controls.Add(wmRsltsCtrl[ix] as UserControl);
if ((firstEnabledControl == null) && !results.WaterMeters[i].Disabled) firstEnabledControl = wmRsltsCtrl[ix];
ix++;
}
}
}
UpdateColumnWidths(Program.LocalSettings.RsltsClmnWidths);
flowLayoutPanel.ResumeLayout();
}
void HandleDoubleClick(object s, WaterMeterEventArgs args)
{
if (InvokeRequired)
{
Invoke(new EventHandler<WaterMeterEventArgs>(OnDoubleClick), s, args);
}
else
{
OnDoubleClick(s, args);
}
}
/// <summary>
/// Delete handler subscriptions from controls (memory leak if not done???).
/// To be done before flowLayoutPanel.Controls.Clear().
/// </summary>
void DeleteHandlers()
{
foreach (var ctrl in flowLayoutPanel.Controls)
{
if (ctrl is IOneWMResultsCtrl)
{
(ctrl as IOneWMResultsCtrl).WMResultsClickedHandler -= HandleDoubleClick;
}
}
}
void UpdateResults(BatchResults batchResults)
{
if ((batchResults != null) && (batchResults.WaterMeters != null))
{
int ctrlIx = 0;
for (int i = 0; i < batchResults.WaterMeters.Length; i++)
{
if (!batchResults.WaterMeters[i].Disabled || ShowDisabledPositions)
{
if (ctrlIx < wmRsltsCtrl.Length) wmRsltsCtrl[ctrlIx++].Update(batchResults.WaterMeters[i]);
}
}
}
}
void ShowMoreWMResults(WaterMeter wm)
{
if ((TracingDB.DB.SessionFactory == null) || string.IsNullOrEmpty(wm.SerialNr))
{
new MoreWMResultsDlg(wm, null).ShowDialog();
}
else
{
using (ISession session = TracingDB.DB.SessionFactory.OpenSession())
{
IList<ReferenceRecord> refRecords = session.QueryOver<ReferenceRecord>()
.Where(x => (x.Code == wm.SerialNr))
.OrderBy(x => x.TimeStamp).Desc
.List();
for (int i = 0; i < refRecords.Count; i++)
{
ReferenceRecord refR = refRecords[i];
if ((refR.Records != null) && (refR.Records.Count > 0))
{
/// Reference record has additional records/parts (i.e. it is PCB assembly workflow step)
///
foreach (var rec in refR.Records)
{
if (rec.Part.OraDBType.ToLower().Contains("flowtube"))
{
/// rec.Part is a flowtube
///
IList<ReferenceRecord> flowtubeRRs = session.QueryOver<ReferenceRecord>()
.Where(x => (x.Code == rec.Code))
.OrderBy(x => x.TimeStamp).Desc
.List();
foreach (var rr in flowtubeRRs) refRecords.Add(rr);
}
}
}
}
new MoreWMResultsDlg(wm, refRecords).ShowDialog();
}
}
}
private void flowLayoutPanel_SizeChanged(object sender, EventArgs e)
{
lastSizeChange = DateTime.Now;
}
private void OnTimer(object source, EventArgs e)
{
if (DateTime.Compare(lastSizeChange, lastRedraw) > 0)
{
/// The last size change was more recent then the last redraw
DateTime now = DateTime.Now;
if (DateTime.Compare(lastSizeChange + new TimeSpan(0, 0, 1), now) < 0)
{
/// More then 1 second since the last panel size change
/// Calculate geometry
int oneWidth;
int oneHeight;
///
if (MetersArrangement == MetersArrangement.Horizontally)
{
flowLayoutPanel.FlowDirection = FlowDirection.LeftToRight;
oneWidth = Math.Max(MinWidth, flowLayoutPanel.Width / metersInOneGroup - 6);
oneHeight = Math.Max(MinHeight, flowLayoutPanel.Height / nrGroups - 6);
}
else
{
flowLayoutPanel.FlowDirection = FlowDirection.TopDown;
oneWidth = Math.Max(MinWidth, flowLayoutPanel.Width / nrGroups - 6);
oneHeight = Math.Max(MinHeight, flowLayoutPanel.Height / metersInOneGroup - 6);
}
/// Update size of controls
flowLayoutPanel.SuspendLayout();
///
foreach (var oneCtrl in wmRsltsCtrl)
{
oneCtrl.Width = oneWidth;
oneCtrl.Height = oneHeight;
}
///
flowLayoutPanel.ResumeLayout();
}
}
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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>