Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
+127
@@ -0,0 +1,127 @@
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
partial class Barcode
|
||||
{
|
||||
/// <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.kodMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.scannedCodeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.setFocusButton = new System.Windows.Forms.Button();
|
||||
this.descriptionMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.blackListLabel = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// kodMaterialuLabel
|
||||
//
|
||||
this.kodMaterialuLabel.AutoSize = true;
|
||||
this.kodMaterialuLabel.Location = new System.Drawing.Point(42, -5);
|
||||
this.kodMaterialuLabel.Name = "kodMaterialuLabel";
|
||||
this.kodMaterialuLabel.Size = new System.Drawing.Size(122, 24);
|
||||
this.kodMaterialuLabel.TabIndex = 1;
|
||||
this.kodMaterialuLabel.Text = "kod materialu";
|
||||
//
|
||||
// scannedCodeTextBox
|
||||
//
|
||||
this.scannedCodeTextBox.Location = new System.Drawing.Point(239, 3);
|
||||
this.scannedCodeTextBox.Name = "scannedCodeTextBox";
|
||||
this.scannedCodeTextBox.Size = new System.Drawing.Size(240, 29);
|
||||
this.scannedCodeTextBox.TabIndex = 3;
|
||||
this.scannedCodeTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.scannedCodeTextBox_KeyPress);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = TBF.Properties.Resources.Barcode;
|
||||
this.pictureBox1.InitialImage = null;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(499, 1);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// setFocusButton
|
||||
//
|
||||
this.setFocusButton.Location = new System.Drawing.Point(2, 1);
|
||||
this.setFocusButton.Name = "setFocusButton";
|
||||
this.setFocusButton.Size = new System.Drawing.Size(32, 32);
|
||||
this.setFocusButton.TabIndex = 0;
|
||||
this.setFocusButton.UseVisualStyleBackColor = true;
|
||||
this.setFocusButton.Click += new System.EventHandler(this.setFocusButton_Click);
|
||||
//
|
||||
// descriptionMaterialuLabel
|
||||
//
|
||||
this.descriptionMaterialuLabel.AutoSize = true;
|
||||
this.descriptionMaterialuLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.descriptionMaterialuLabel.Location = new System.Drawing.Point(43, 25);
|
||||
this.descriptionMaterialuLabel.Name = "descriptionMaterialuLabel";
|
||||
this.descriptionMaterialuLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.descriptionMaterialuLabel.TabIndex = 2;
|
||||
this.descriptionMaterialuLabel.Text = "opis materialu";
|
||||
//
|
||||
// blackListLabel
|
||||
//
|
||||
this.blackListLabel.AutoSize = true;
|
||||
this.blackListLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.blackListLabel.ForeColor = System.Drawing.Color.Red;
|
||||
this.blackListLabel.Location = new System.Drawing.Point(480, 5);
|
||||
this.blackListLabel.Name = "blackListLabel";
|
||||
this.blackListLabel.Size = new System.Drawing.Size(19, 25);
|
||||
this.blackListLabel.TabIndex = 4;
|
||||
this.blackListLabel.Text = "!";
|
||||
this.blackListLabel.Visible = false;
|
||||
//
|
||||
// Polozka
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.blackListLabel);
|
||||
this.Controls.Add(this.descriptionMaterialuLabel);
|
||||
this.Controls.Add(this.setFocusButton);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.scannedCodeTextBox);
|
||||
this.Controls.Add(this.kodMaterialuLabel);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.Name = "Polozka";
|
||||
this.Size = new System.Drawing.Size(547, 36);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label kodMaterialuLabel;
|
||||
private System.Windows.Forms.TextBox scannedCodeTextBox;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Button setFocusButton;
|
||||
private System.Windows.Forms.Label descriptionMaterialuLabel;
|
||||
private System.Windows.Forms.Label blackListLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
///
|
||||
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase;
|
||||
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
public partial class Barcode : UserControl, ICheckItem
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format(": {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType);
|
||||
}
|
||||
|
||||
FormForMechanicalMetersWithTracing parent;
|
||||
|
||||
public SharedDatabase.Entities.Part Part { get { return part; } }
|
||||
SharedDatabase.Entities.Part part;
|
||||
|
||||
public int IxPolozky
|
||||
{
|
||||
get { return ixPolozky; }
|
||||
set { ixPolozky = value; }
|
||||
}
|
||||
int ixPolozky;
|
||||
|
||||
public string ScannedCode
|
||||
{
|
||||
get { return scannedCodeTextBox.Text; }
|
||||
set { scannedCodeTextBox.Text = value; }
|
||||
}
|
||||
|
||||
Barcode()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Barcode(FormForMechanicalMetersWithTracing parent, SharedDatabase.Entities.Part part)
|
||||
: this()
|
||||
{
|
||||
this.parent = parent;
|
||||
this.part = part;
|
||||
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
|
||||
kodMaterialuLabel.Text = part.Name;
|
||||
descriptionMaterialuLabel.Text = part.Description;
|
||||
|
||||
if (part.CodeForm == CodeForm.Barcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Stream imageStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pracovisko.Barcode.png");
|
||||
pictureBox1.Image = new Bitmap(imageStream);
|
||||
}
|
||||
catch {}
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearCode()
|
||||
{
|
||||
if (part.CodeType != CodeType.Silicon)
|
||||
{
|
||||
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public void SubmitCode(string code)
|
||||
{
|
||||
scannedCodeTextBox.Text = code;
|
||||
scannedCodeTextBox_KeyPress(null, new KeyPressEventArgs('\r'));
|
||||
}
|
||||
|
||||
public void ResetFocus()
|
||||
{
|
||||
setFocusButton.Text = "";
|
||||
}
|
||||
|
||||
public void SetFocus()
|
||||
{
|
||||
ClearCode();
|
||||
setFocusButton.Text = ">";
|
||||
scannedCodeTextBox.Focus();
|
||||
}
|
||||
|
||||
private void setFocusButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
setFocusButton.Text = ">";
|
||||
parent.OnFocusPressed(this, new FocusPressedEventArgs(IxPolozky, Part.CodeLocation));
|
||||
}
|
||||
|
||||
private void scannedCodeTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar != '\r') return;
|
||||
|
||||
PartError error = PartError.None;
|
||||
if (string.IsNullOrEmpty(scannedCodeTextBox.Text))
|
||||
{
|
||||
error = PartError.FieldEmpty;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (part.CodeType)
|
||||
{
|
||||
case CodeType.FlowtubeNr:
|
||||
if ((scannedCodeTextBox.Text.Length < 3) || !scannedCodeTextBox.Text.Substring(0, 3).Equals(part.Name.Substring(part.Name.Length - 3)))
|
||||
{
|
||||
error = PartError.WrongPart;
|
||||
}
|
||||
break;
|
||||
|
||||
case CodeType.FlowtubeNrLU:
|
||||
if ((scannedCodeTextBox.Text.Length < part.Name.Length ||
|
||||
!scannedCodeTextBox.Text.Substring(0, part.Name.Length).Equals(part.Name)))
|
||||
{
|
||||
error = PartError.WrongPart;
|
||||
}
|
||||
break;
|
||||
|
||||
case CodeType.BatchNrContainingPartName:
|
||||
if (!scannedCodeTextBox.Text.Contains(part.Name))
|
||||
{
|
||||
error = PartError.WrongPart;
|
||||
}
|
||||
break;
|
||||
|
||||
case CodeType.DateMMYY:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(scannedCodeTextBox.Text, IxPolozky, Part.CodeLocation, error));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
partial class Keyboard
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Keyboard));
|
||||
this.kodMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.scannedCodeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.setFocusButton = new System.Windows.Forms.Button();
|
||||
this.descriptionMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.blackListLabel = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// kodMaterialuLabel
|
||||
//
|
||||
this.kodMaterialuLabel.AutoSize = true;
|
||||
this.kodMaterialuLabel.Location = new System.Drawing.Point(42, -5);
|
||||
this.kodMaterialuLabel.Name = "kodMaterialuLabel";
|
||||
this.kodMaterialuLabel.Size = new System.Drawing.Size(122, 24);
|
||||
this.kodMaterialuLabel.TabIndex = 1;
|
||||
this.kodMaterialuLabel.Text = "kod materialu";
|
||||
//
|
||||
// scannedCodeTextBox
|
||||
//
|
||||
this.scannedCodeTextBox.Location = new System.Drawing.Point(239, 3);
|
||||
this.scannedCodeTextBox.Name = "scannedCodeTextBox";
|
||||
this.scannedCodeTextBox.Size = new System.Drawing.Size(228, 29);
|
||||
this.scannedCodeTextBox.TabIndex = 3;
|
||||
this.scannedCodeTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.scannedCodeTextBox_KeyPress);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.InitialImage = null;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(493, -9);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(48, 48);
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// setFocusButton
|
||||
//
|
||||
this.setFocusButton.Location = new System.Drawing.Point(2, 1);
|
||||
this.setFocusButton.Name = "setFocusButton";
|
||||
this.setFocusButton.Size = new System.Drawing.Size(32, 32);
|
||||
this.setFocusButton.TabIndex = 0;
|
||||
this.setFocusButton.UseVisualStyleBackColor = true;
|
||||
this.setFocusButton.Click += new System.EventHandler(this.setFocusButton_Click);
|
||||
//
|
||||
// descriptionMaterialuLabel
|
||||
//
|
||||
this.descriptionMaterialuLabel.AutoSize = true;
|
||||
this.descriptionMaterialuLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.descriptionMaterialuLabel.Location = new System.Drawing.Point(43, 25);
|
||||
this.descriptionMaterialuLabel.Name = "descriptionMaterialuLabel";
|
||||
this.descriptionMaterialuLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.descriptionMaterialuLabel.TabIndex = 2;
|
||||
this.descriptionMaterialuLabel.Text = "opis materialu";
|
||||
//
|
||||
// blackListLabel
|
||||
//
|
||||
this.blackListLabel.AutoSize = true;
|
||||
this.blackListLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.blackListLabel.ForeColor = System.Drawing.Color.Red;
|
||||
this.blackListLabel.Location = new System.Drawing.Point(470, 5);
|
||||
this.blackListLabel.Name = "blackListLabel";
|
||||
this.blackListLabel.Size = new System.Drawing.Size(19, 25);
|
||||
this.blackListLabel.TabIndex = 5;
|
||||
this.blackListLabel.Text = "!";
|
||||
this.blackListLabel.Visible = false;
|
||||
//
|
||||
// PolozkaKbd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.blackListLabel);
|
||||
this.Controls.Add(this.descriptionMaterialuLabel);
|
||||
this.Controls.Add(this.setFocusButton);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.scannedCodeTextBox);
|
||||
this.Controls.Add(this.kodMaterialuLabel);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.Name = "PolozkaKbd";
|
||||
this.Size = new System.Drawing.Size(547, 36);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label kodMaterialuLabel;
|
||||
private System.Windows.Forms.TextBox scannedCodeTextBox;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Button setFocusButton;
|
||||
private System.Windows.Forms.Label descriptionMaterialuLabel;
|
||||
private System.Windows.Forms.Label blackListLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase;
|
||||
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
public partial class Keyboard : UserControl, ICheckItem
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Kbd: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType);
|
||||
}
|
||||
|
||||
FormForMechanicalMetersWithTracing parent;
|
||||
|
||||
public SharedDatabase.Entities.Part Part { get { return part; } }
|
||||
SharedDatabase.Entities.Part part;
|
||||
|
||||
public int IxPolozky
|
||||
{
|
||||
get { return ixPolozky; }
|
||||
set { ixPolozky = value; }
|
||||
}
|
||||
int ixPolozky;
|
||||
|
||||
public string ScannedCode
|
||||
{
|
||||
get { return scannedCodeTextBox.Text; }
|
||||
set
|
||||
{
|
||||
#if false
|
||||
if (part.CodeType == CodeType.PO && parent.ValidOrderNumbers != null)
|
||||
{
|
||||
/// Counting pieces produced for a specified PO
|
||||
|
||||
if (!parent.ValidOrderNumbers.Contains(value))
|
||||
{
|
||||
/// Code is not a valid order number
|
||||
scannedCodeTextBox.Text = string.Format("{0} !!!", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
scannedCodeTextBox.Text = value;
|
||||
int pcsCount;
|
||||
if (parent.TargetPcsCounts.TryGetValue(scannedCodeTextBox.Text, out pcsCount))
|
||||
{
|
||||
parent.UpdateTargetPiecesCount(scannedCodeTextBox.Text, pcsCount, Part.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
scannedCodeTextBox.Text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Keyboard()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Keyboard(FormForMechanicalMetersWithTracing parent, SharedDatabase.Entities.Part part)
|
||||
: this()
|
||||
{
|
||||
this.parent = parent;
|
||||
this.part = part;
|
||||
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
|
||||
kodMaterialuLabel.Text = part.Name;
|
||||
descriptionMaterialuLabel.Text = part.Description;
|
||||
}
|
||||
|
||||
public void ClearCode()
|
||||
{
|
||||
if (part.CodeType != CodeType.Silicon)
|
||||
{
|
||||
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public void SubmitCode(string code)
|
||||
{
|
||||
scannedCodeTextBox.Text = code;
|
||||
scannedCodeTextBox_KeyPress(null, new KeyPressEventArgs('\r'));
|
||||
}
|
||||
|
||||
public void ResetFocus()
|
||||
{
|
||||
setFocusButton.Text = "";
|
||||
}
|
||||
|
||||
public void SetFocus()
|
||||
{
|
||||
ClearCode();
|
||||
setFocusButton.Text = ">";
|
||||
scannedCodeTextBox.Focus();
|
||||
}
|
||||
|
||||
private void setFocusButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
setFocusButton.Text = ">";
|
||||
parent.OnFocusPressed(this, new FocusPressedEventArgs(IxPolozky, Part.CodeLocation));
|
||||
}
|
||||
|
||||
private void scannedCodeTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar != '\r') return;
|
||||
|
||||
PartError error = PartError.None;
|
||||
///
|
||||
if (string.IsNullOrEmpty(scannedCodeTextBox.Text))
|
||||
{
|
||||
error = PartError.FieldEmpty;
|
||||
}
|
||||
#if false
|
||||
else if (part.CodeType == CodeType.PO && parent.ValidOrderNumbers != null)
|
||||
{
|
||||
/// Counting pieces produced for a specified PO
|
||||
|
||||
int pcsCount;
|
||||
if (!parent.ValidOrderNumbers.Contains(scannedCodeTextBox.Text))
|
||||
{
|
||||
parent.UpdateTargetPiecesCount(string.Empty, -1, 0);
|
||||
error = PartError.WrongPart;
|
||||
}
|
||||
else if (parent.TargetPcsCounts.TryGetValue(scannedCodeTextBox.Text, out pcsCount))
|
||||
{
|
||||
parent.UpdateTargetPiecesCount(scannedCodeTextBox.Text, pcsCount, Part.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.UpdateTargetPiecesCount(string.Empty, -1, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(scannedCodeTextBox.Text, IxPolozky, Part.CodeLocation, error));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAMGSURBVGhD7Zk9axVBGIVXRURFFJRAQLESVBRBEUlhVFAsLS0DgmhlCHYWamcjWIqNFkpsxBQB
|
||||
LfUHiDYKdtqIWAbEL/DjPEPey8ly57KLCeyEPfAsM2dmZ953d2Z3c1P16rVER8VZsSvVCtRj8UdcSrUC
|
||||
9UyQwLlUK0xrxRdBAnsxShNr/6/4JEimKO0RHwUJXMfouraII2JKPBBfBUvnjdgoOqkz4pHgShMsVzv4
|
||||
LZ6K7aJz4mrPCw/6p3gr5sQ1cVB0Vk8EwS+Im+KQWC+K0HHBFWeNH8AoTfcECdxOtQL1WrB8uBMrqk3i
|
||||
iuBb5Pky8ktwB16a978QI7ESc9KYeCf8KZEre71J/yblUW2jysRM7NVDgfleXBDnOw4xEisxE3v1TfAi
|
||||
2U+lEBErMRN7yuQ7hcJEzCyl8hPg4AkcFp+NWYGuCvcvCnRfuD8h0AcRHmVEm/flXMRY7jMXYm73iS2U
|
||||
vQPHBA34wKML3RDUo21aIL5nvP8JgWICvBifNh+DcxFjxfm0MRdibveJLbR6EuAwLIHAE3C/nkBQTwA8
|
||||
Ae/rCbjvCbjf6A6sERuM+HJcJ9ynjmh3n/ORe4CWa2yUTYBXNJ+8wxgXaKdwf5tA+4T7/G0L7tEHcY77
|
||||
jImYw31n8PkgDRLg4AnUl5BzS6C7wn3ekIinjftbF3Evnkic4z5jIuZw32m0hCIB3zxRricQfj2B8CMB
|
||||
yuF7AtGPNk/AfS+vzgQ4eAKs0RcZ4uU1I9w/JRCfuu5vXsQ9+iDOcZ8xEXO478T+Qdk7UIqyCewQ/F4T
|
||||
nBaIp4D7cTW4ku63Ie4cY7nPXIi53Se20CCB+hKKPRC0fZG1YUVeZPVN7AlQj7Z6AtG/TdkT8DZPwP1G
|
||||
m7j4O7Bb3DHinw38euz+pED8ied+GzgXMZb7zIWY231iC2UTKEVLEvghSvpNnliJOSUQb8+4nSWIWIk5
|
||||
vdUvi9jlrwQbq8sQI7ESM7EnsetZU5iRzLCy13N92pZHteXKxBpPqoH46DopeAJ0GWIk1l69epWvqvoH
|
||||
eo2RB75S02kAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
partial class OkNok
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OkNok));
|
||||
this.kodMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.setFocusButton = new System.Windows.Forms.Button();
|
||||
this.descriptionMaterialuLabel = new System.Windows.Forms.Label();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// kodMaterialuLabel
|
||||
//
|
||||
this.kodMaterialuLabel.AutoSize = true;
|
||||
this.kodMaterialuLabel.Location = new System.Drawing.Point(42, -5);
|
||||
this.kodMaterialuLabel.Name = "kodMaterialuLabel";
|
||||
this.kodMaterialuLabel.Size = new System.Drawing.Size(122, 24);
|
||||
this.kodMaterialuLabel.TabIndex = 1;
|
||||
this.kodMaterialuLabel.Text = "kod materialu";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.InitialImage = null;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(493, -8);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(48, 48);
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// setFocusButton
|
||||
//
|
||||
this.setFocusButton.Location = new System.Drawing.Point(2, 1);
|
||||
this.setFocusButton.Name = "setFocusButton";
|
||||
this.setFocusButton.Size = new System.Drawing.Size(32, 32);
|
||||
this.setFocusButton.TabIndex = 0;
|
||||
this.setFocusButton.UseVisualStyleBackColor = true;
|
||||
this.setFocusButton.Click += new System.EventHandler(this.setFocusButton_Click);
|
||||
//
|
||||
// descriptionMaterialuLabel
|
||||
//
|
||||
this.descriptionMaterialuLabel.AutoSize = true;
|
||||
this.descriptionMaterialuLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.descriptionMaterialuLabel.Location = new System.Drawing.Point(43, 25);
|
||||
this.descriptionMaterialuLabel.Name = "descriptionMaterialuLabel";
|
||||
this.descriptionMaterialuLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.descriptionMaterialuLabel.TabIndex = 2;
|
||||
this.descriptionMaterialuLabel.Text = "opis materialu";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(239, 3);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(108, 28);
|
||||
this.checkBox1.TabIndex = 3;
|
||||
this.checkBox1.Text = "Vyhovuje";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(353, 3);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(129, 28);
|
||||
this.checkBox2.TabIndex = 4;
|
||||
this.checkBox2.Text = "Nevyhovuje";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
|
||||
//
|
||||
// PolozkaOkNok
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.descriptionMaterialuLabel);
|
||||
this.Controls.Add(this.setFocusButton);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.kodMaterialuLabel);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.Name = "PolozkaOkNok";
|
||||
this.Size = new System.Drawing.Size(547, 36);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label kodMaterialuLabel;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Button setFocusButton;
|
||||
private System.Windows.Forms.Label descriptionMaterialuLabel;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace TBF.Rig.DataEntry.S620.CheckItems
|
||||
{
|
||||
public partial class OkNok : UserControl, ICheckItem
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Ok/Nok: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType);
|
||||
}
|
||||
|
||||
FormForMechanicalMetersWithTracing parent;
|
||||
|
||||
public SharedDatabase.Entities.Part Part { get { return part; } }
|
||||
SharedDatabase.Entities.Part part;
|
||||
|
||||
public int IxPolozky
|
||||
{
|
||||
get { return ixPolozky; }
|
||||
set { ixPolozky = value; }
|
||||
}
|
||||
int ixPolozky;
|
||||
|
||||
public string ScannedCode
|
||||
{
|
||||
get { return checkBox1.Checked ? "OK" : "NOK"; }
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = false;
|
||||
}
|
||||
else if (value.ToLower().Equals("ok"))
|
||||
{
|
||||
checkBox1.Checked = true;
|
||||
checkBox2.Checked = false;
|
||||
}
|
||||
else if (value.ToLower().Equals("nok"))
|
||||
{
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OkNok()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public OkNok(FormForMechanicalMetersWithTracing parent, SharedDatabase.Entities.Part part)
|
||||
: this()
|
||||
{
|
||||
this.parent = parent;
|
||||
this.part = part;
|
||||
kodMaterialuLabel.Text = part.Name;
|
||||
descriptionMaterialuLabel.Text = part.Description;
|
||||
}
|
||||
|
||||
public void ClearCode()
|
||||
{
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = false;
|
||||
}
|
||||
|
||||
public void SubmitCode(string code)
|
||||
{
|
||||
ScannedCode = code;
|
||||
scannedCodeTextBox_KeyPress(null, new KeyPressEventArgs('\r'));
|
||||
}
|
||||
|
||||
public void ResetFocus()
|
||||
{
|
||||
setFocusButton.Text = "";
|
||||
}
|
||||
|
||||
public void SetFocus()
|
||||
{
|
||||
setFocusButton.Text = ">";
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = false;
|
||||
checkBox1.Focus();
|
||||
}
|
||||
|
||||
private void setFocusButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
setFocusButton.Text = ">";
|
||||
parent.OnFocusPressed(this, new FocusPressedEventArgs(IxPolozky, Part.CodeLocation));
|
||||
}
|
||||
|
||||
private void scannedCodeTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar != '\r') return;
|
||||
|
||||
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(ScannedCode, IxPolozky, Part.CodeLocation));
|
||||
return;
|
||||
}
|
||||
|
||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox1.Checked)
|
||||
{
|
||||
checkBox2.Checked = false;
|
||||
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(ScannedCode, IxPolozky, Part.CodeLocation));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private void checkBox2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox2.Checked)
|
||||
{
|
||||
checkBox1.Checked = false;
|
||||
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(ScannedCode, IxPolozky, Part.CodeLocation));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAQvSURBVGhD7Zl76N5THMd/zH2Yu00uLbfSxB/IJWVkkuxPl6X9g1gtyv6Y8IdI5JZWSCGzrCYl
|
||||
UlKShr8oFLnkWpQS0dxv2+v1bJ/67Ox8L8+en/2e1fOuV99zzvd8z/dzzvM5n3PO95maaKKJJvo/tCcc
|
||||
DnsMcjuJDoJb4D34DzbC3/AGXAm7wFhqFtwEP4FGh/Fl+hWwk2OlefA6aGgf3oV9YSy0AL6BPNJfw3I4
|
||||
FNR8eBJyndUw4zoHfgQNCuNWwT5Q020QHfB6MkyLdodz4XpYuQVHcCE0GXM+/AoaIn/AZdCl7Gp3WTCK
|
||||
ToKnYAPknzenf4N1cCZkfQVR52c4D/roWoh3vGDB9mg2PAb/QM3oWvpfeAYOBvU+WK7xZ1nQU1dAtPuq
|
||||
BcPqCPgAfPmwOFmPA2XkuQ6OHeT6606I9h63YBhp/MeQRziuTelfQP/W+BNgFLlWfAnxjqXQW9n4bGBT
|
||||
BzT4EtgV9oK5EHKL8ABYPoz8xfLA7A+9dRR8DqWxtQ7k0T4bnOwh9zUvgfXutqCnfL8hN95xH/TSnC1X
|
||||
ZSOfgY00kY0Pf9WFLrYA3QNR1wh1CHRpb3gL4rnv4ADoVLjNvYPcZh0N0Yk86pE+HZTG5/LXQN0MuXwF
|
||||
dGkN5GcuhU6VPp9/suxOuQPWV4a6XG5a/1VPQy5fD21yZc5t9Vq8wngfzJSdKN3pI1BXQy6PUT4NdKd8
|
||||
73fYDWq6A3Ld58Gg0CoXKeN8jFAeLa81d4o6+r+T1D27I/c93ADqFDBfa/MYKOXWOu57fRmMXp16BMoX
|
||||
lOmaO7XF+TC+qc0zIOsC8BAT9ZzA+0GnTgUftOEuyk4cvzk5kCPlxu5y0Gfzpq1G7rhRz8GIex9CL+OV
|
||||
e24fKkeoTEc+u1NI443zfdox7R4pL0i2Gfc8neWBaZWx1tWtz4tzvlxQHoWyfls6Ipdy/rm5i3vLoEn+
|
||||
KoZXw/NgoXTv7kPbQ1d0auN+CF0IUf4tNEWnw+BtiLpPwMBnayNUS+d8XNuiU1ub+VR1FcS95yyo6ET4
|
||||
BOJ5uQYGky0Ko5GmdM7n8lp0KuvkdGnkYoh7X4BuneVnlR8g6tjWrTCQGysLRqWvO7kx836WESjmoXh8
|
||||
vAiWgN+F8vN/wlZz5EaIXuUe1tI5X6vT5U5/gYbV5Eet3FYt7WbOM/VWssGuByOd8011mtzJY2jbQcSt
|
||||
wsPQ1K6Rx8+N2+hAKPcpo1J24lPoe4pyNV4Lnp3fBH9VvyG1ylO+L671PKdzvqt+dqdee5lRZK998XTj
|
||||
IWaH6UVoG9Ey31Qn0l0+P+1ygrgKNhlU5pvqmN7hxoc8eOQDdGlczjfVmTHjQ854o4ZGDYur5SKYcbnN
|
||||
fQhc9TQsRjePdi53a/wsuHiNlY6E2+Ed0DXKDrglfhA64/Q4yFjujtBjogaPzT8lE0000U6rqalN3afe
|
||||
HgkVr1gAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user