WorkflowConfigurator project added.
This commit is contained in:
parent
2710823931
commit
068aee3cbd
2
.gitignore
vendored
2
.gitignore
vendored
@ -54,6 +54,8 @@ Users/bin/
|
||||
Users/obj/
|
||||
UserManagement/bin/
|
||||
UserManagement/obj/
|
||||
WorkflowConfigurator/bin/
|
||||
WorkflowConfigurator/obj/
|
||||
.vs/
|
||||
*.suo
|
||||
*.bak
|
||||
|
||||
12
TBF.sln
12
TBF.sln
@ -80,6 +80,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FeatureVectorCalculator", "
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderManagement", "OrderManagement\OrderManagement.csproj", "{7DF40C07-9A1D-403B-91D3-D45660E6D3B1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowConfigurator", "WorkflowConfigurator\WorkflowConfigurator.csproj", "{AE275D47-A33B-47E6-9541-B6EA29D12434}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -344,6 +346,16 @@ Global
|
||||
{7DF40C07-9A1D-403B-91D3-D45660E6D3B1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7DF40C07-9A1D-403B-91D3-D45660E6D3B1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7DF40C07-9A1D-403B-91D3-D45660E6D3B1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{AE275D47-A33B-47E6-9541-B6EA29D12434}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
105
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.Designer.cs
generated
Normal file
105
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.Designer.cs
generated
Normal file
@ -0,0 +1,105 @@
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
partial class EditOrAbandonMsgBox
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.editButton = new System.Windows.Forms.Button();
|
||||
this.abandonButton = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(20, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// editButton
|
||||
//
|
||||
this.editButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.editButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
|
||||
this.editButton.Location = new System.Drawing.Point(100, 77);
|
||||
this.editButton.Name = "editButton";
|
||||
this.editButton.Size = new System.Drawing.Size(160, 25);
|
||||
this.editButton.TabIndex = 1;
|
||||
this.editButton.Text = "Return to editing";
|
||||
this.editButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// abandonButton
|
||||
//
|
||||
this.abandonButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.abandonButton.DialogResult = System.Windows.Forms.DialogResult.Abort;
|
||||
this.abandonButton.Location = new System.Drawing.Point(266, 77);
|
||||
this.abandonButton.Name = "abandonButton";
|
||||
this.abandonButton.Size = new System.Drawing.Size(160, 25);
|
||||
this.abandonButton.TabIndex = 2;
|
||||
this.abandonButton.Text = "Abandon changes";
|
||||
this.abandonButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(20, 44);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(35, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "label2";
|
||||
//
|
||||
// EditOrAbandonMsgBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(442, 111);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.abandonButton);
|
||||
this.Controls.Add(this.editButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditOrAbandonMsgBox";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "EditOrAbandonMsgBox";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button editButton;
|
||||
private System.Windows.Forms.Button abandonButton;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
29
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.cs
Normal file
29
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
public partial class EditOrAbandonMsgBox : Form
|
||||
{
|
||||
public EditOrAbandonMsgBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
public EditOrAbandonMsgBox(string text1, string text2)
|
||||
: this()
|
||||
{
|
||||
label1.Text = text1;
|
||||
label2.Text = text2;
|
||||
Text = Strings.Warning;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
editButton.Text = Strings.Back_to_editing;
|
||||
abandonButton.Text = Strings.Abandon_changes;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.resx
Normal file
120
WorkflowConfigurator/Forms/EditOrAbandonMsgBox.resx
Normal 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>
|
||||
504
WorkflowConfigurator/Forms/PartDlg.Designer.cs
generated
Normal file
504
WorkflowConfigurator/Forms/PartDlg.Designer.cs
generated
Normal file
@ -0,0 +1,504 @@
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
partial class PartDlg
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.descriptionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.codeTypeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.typeRadioButton9 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton8 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton7 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton6 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton5 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton4 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.typeRadioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.codeLocationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.locationRadioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.locationRadioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.lifetimeManagementComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.oraDBTypeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.formRadioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton4 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton5 = new System.Windows.Forms.RadioButton();
|
||||
this.codeFormGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.formRadioButton8 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton7 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton6 = new System.Windows.Forms.RadioButton();
|
||||
this.formRadioButton9 = new System.Windows.Forms.RadioButton();
|
||||
this.codeTypeGroupBox.SuspendLayout();
|
||||
this.codeLocationGroupBox.SuspendLayout();
|
||||
this.codeFormGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(21, 26);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(102, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Part name/SAP nr. :";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(21, 78);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(63, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Description:";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 23);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(191, 20);
|
||||
this.nameTextBox.TabIndex = 1;
|
||||
//
|
||||
// descriptionTextBox
|
||||
//
|
||||
this.descriptionTextBox.Location = new System.Drawing.Point(137, 75);
|
||||
this.descriptionTextBox.Name = "descriptionTextBox";
|
||||
this.descriptionTextBox.Size = new System.Drawing.Size(675, 20);
|
||||
this.descriptionTextBox.TabIndex = 5;
|
||||
//
|
||||
// codeTypeGroupBox
|
||||
//
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton9);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton8);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton7);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton6);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton5);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton4);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton3);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton2);
|
||||
this.codeTypeGroupBox.Controls.Add(this.typeRadioButton1);
|
||||
this.codeTypeGroupBox.Location = new System.Drawing.Point(24, 136);
|
||||
this.codeTypeGroupBox.Name = "codeTypeGroupBox";
|
||||
this.codeTypeGroupBox.Size = new System.Drawing.Size(444, 212);
|
||||
this.codeTypeGroupBox.TabIndex = 8;
|
||||
this.codeTypeGroupBox.TabStop = false;
|
||||
this.codeTypeGroupBox.Text = "Code type";
|
||||
//
|
||||
// typeRadioButton9
|
||||
//
|
||||
this.typeRadioButton9.AutoSize = true;
|
||||
this.typeRadioButton9.Location = new System.Drawing.Point(17, 183);
|
||||
this.typeRadioButton9.Name = "typeRadioButton9";
|
||||
this.typeRadioButton9.Size = new System.Drawing.Size(117, 17);
|
||||
this.typeRadioButton9.TabIndex = 8;
|
||||
this.typeRadioButton9.TabStop = true;
|
||||
this.typeRadioButton9.Text = "Silicon (iPERL only)";
|
||||
this.typeRadioButton9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton8
|
||||
//
|
||||
this.typeRadioButton8.AutoSize = true;
|
||||
this.typeRadioButton8.Location = new System.Drawing.Point(17, 163);
|
||||
this.typeRadioButton8.Name = "typeRadioButton8";
|
||||
this.typeRadioButton8.Size = new System.Drawing.Size(120, 17);
|
||||
this.typeRadioButton8.TabIndex = 7;
|
||||
this.typeRadioButton8.TabStop = true;
|
||||
this.typeRadioButton8.Text = "Manufacturing order";
|
||||
this.typeRadioButton8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton7
|
||||
//
|
||||
this.typeRadioButton7.AutoSize = true;
|
||||
this.typeRadioButton7.Location = new System.Drawing.Point(17, 143);
|
||||
this.typeRadioButton7.Name = "typeRadioButton7";
|
||||
this.typeRadioButton7.Size = new System.Drawing.Size(56, 17);
|
||||
this.typeRadioButton7.TabIndex = 6;
|
||||
this.typeRadioButton7.TabStop = true;
|
||||
this.typeRadioButton7.Text = "Check";
|
||||
this.typeRadioButton7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton6
|
||||
//
|
||||
this.typeRadioButton6.AutoSize = true;
|
||||
this.typeRadioButton6.Location = new System.Drawing.Point(17, 123);
|
||||
this.typeRadioButton6.Name = "typeRadioButton6";
|
||||
this.typeRadioButton6.Size = new System.Drawing.Size(110, 17);
|
||||
this.typeRadioButton6.TabIndex = 5;
|
||||
this.typeRadioButton6.TabStop = true;
|
||||
this.typeRadioButton6.Text = "Date code MMYY";
|
||||
this.typeRadioButton6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton5
|
||||
//
|
||||
this.typeRadioButton5.AutoSize = true;
|
||||
this.typeRadioButton5.Location = new System.Drawing.Point(17, 103);
|
||||
this.typeRadioButton5.Name = "typeRadioButton5";
|
||||
this.typeRadioButton5.Size = new System.Drawing.Size(297, 17);
|
||||
this.typeRadioButton5.TabIndex = 4;
|
||||
this.typeRadioButton5.TabStop = true;
|
||||
this.typeRadioButton5.Text = "Batch nr. with acheck: Code contains part name/SAP nr.";
|
||||
this.typeRadioButton5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton4
|
||||
//
|
||||
this.typeRadioButton4.AutoSize = true;
|
||||
this.typeRadioButton4.Location = new System.Drawing.Point(17, 83);
|
||||
this.typeRadioButton4.Name = "typeRadioButton4";
|
||||
this.typeRadioButton4.Size = new System.Drawing.Size(158, 17);
|
||||
this.typeRadioButton4.TabIndex = 3;
|
||||
this.typeRadioButton4.TabStop = true;
|
||||
this.typeRadioButton4.Text = "Batch nr. without any check";
|
||||
this.typeRadioButton4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton3
|
||||
//
|
||||
this.typeRadioButton3.AutoSize = true;
|
||||
this.typeRadioButton3.Location = new System.Drawing.Point(17, 63);
|
||||
this.typeRadioButton3.Name = "typeRadioButton3";
|
||||
this.typeRadioButton3.Size = new System.Drawing.Size(332, 17);
|
||||
this.typeRadioButton3.TabIndex = 2;
|
||||
this.typeRadioButton3.TabStop = true;
|
||||
this.typeRadioButton3.Text = "First 8 characters of the code are the same as part name/SAP nr.";
|
||||
this.typeRadioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton2
|
||||
//
|
||||
this.typeRadioButton2.AutoSize = true;
|
||||
this.typeRadioButton2.Location = new System.Drawing.Point(17, 43);
|
||||
this.typeRadioButton2.Name = "typeRadioButton2";
|
||||
this.typeRadioButton2.Size = new System.Drawing.Size(386, 17);
|
||||
this.typeRadioButton2.TabIndex = 1;
|
||||
this.typeRadioButton2.TabStop = true;
|
||||
this.typeRadioButton2.Text = "First 3 characters are the same as the last 3 characters of part name/SAP nr.";
|
||||
this.typeRadioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeRadioButton1
|
||||
//
|
||||
this.typeRadioButton1.AutoSize = true;
|
||||
this.typeRadioButton1.Location = new System.Drawing.Point(17, 23);
|
||||
this.typeRadioButton1.Name = "typeRadioButton1";
|
||||
this.typeRadioButton1.Size = new System.Drawing.Size(176, 17);
|
||||
this.typeRadioButton1.TabIndex = 0;
|
||||
this.typeRadioButton1.TabStop = true;
|
||||
this.typeRadioButton1.Text = "Unique code without any check";
|
||||
this.typeRadioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(650, 311);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 36);
|
||||
this.okButton.TabIndex = 11;
|
||||
this.okButton.Text = "OK";
|
||||
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.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(737, 311);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 36);
|
||||
this.cancelButton.TabIndex = 12;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// codeLocationGroupBox
|
||||
//
|
||||
this.codeLocationGroupBox.Controls.Add(this.locationRadioButton2);
|
||||
this.codeLocationGroupBox.Controls.Add(this.locationRadioButton1);
|
||||
this.codeLocationGroupBox.Location = new System.Drawing.Point(638, 136);
|
||||
this.codeLocationGroupBox.Name = "codeLocationGroupBox";
|
||||
this.codeLocationGroupBox.Size = new System.Drawing.Size(174, 160);
|
||||
this.codeLocationGroupBox.TabIndex = 10;
|
||||
this.codeLocationGroupBox.TabStop = false;
|
||||
this.codeLocationGroupBox.Text = "Code location";
|
||||
//
|
||||
// locationRadioButton2
|
||||
//
|
||||
this.locationRadioButton2.AutoSize = true;
|
||||
this.locationRadioButton2.Location = new System.Drawing.Point(15, 43);
|
||||
this.locationRadioButton2.Name = "locationRadioButton2";
|
||||
this.locationRadioButton2.Size = new System.Drawing.Size(164, 17);
|
||||
this.locationRadioButton2.TabIndex = 1;
|
||||
this.locationRadioButton2.TabStop = true;
|
||||
this.locationRadioButton2.Text = "On the box/palette/batch no.";
|
||||
this.locationRadioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// locationRadioButton1
|
||||
//
|
||||
this.locationRadioButton1.AutoSize = true;
|
||||
this.locationRadioButton1.Location = new System.Drawing.Point(15, 23);
|
||||
this.locationRadioButton1.Name = "locationRadioButton1";
|
||||
this.locationRadioButton1.Size = new System.Drawing.Size(102, 17);
|
||||
this.locationRadioButton1.TabIndex = 0;
|
||||
this.locationRadioButton1.TabStop = true;
|
||||
this.locationRadioButton1.Text = "On the part itself";
|
||||
this.locationRadioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(21, 104);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(110, 13);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Lifetime management:";
|
||||
//
|
||||
// lifetimeManagementComboBox
|
||||
//
|
||||
this.lifetimeManagementComboBox.FormattingEnabled = true;
|
||||
this.lifetimeManagementComboBox.Location = new System.Drawing.Point(137, 101);
|
||||
this.lifetimeManagementComboBox.Name = "lifetimeManagementComboBox";
|
||||
this.lifetimeManagementComboBox.Size = new System.Drawing.Size(191, 21);
|
||||
this.lifetimeManagementComboBox.TabIndex = 7;
|
||||
//
|
||||
// oraDBTypeTextBox
|
||||
//
|
||||
this.oraDBTypeTextBox.Location = new System.Drawing.Point(137, 49);
|
||||
this.oraDBTypeTextBox.Name = "oraDBTypeTextBox";
|
||||
this.oraDBTypeTextBox.Size = new System.Drawing.Size(191, 20);
|
||||
this.oraDBTypeTextBox.TabIndex = 3;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(21, 52);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(82, 13);
|
||||
this.label4.TabIndex = 2;
|
||||
this.label4.Text = "Oracle DB type:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(334, 53);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(147, 13);
|
||||
this.label5.TabIndex = 13;
|
||||
this.label5.Text = "PCBA, Flowtube, Battery, atp.";
|
||||
//
|
||||
// formRadioButton1
|
||||
//
|
||||
this.formRadioButton1.AutoSize = true;
|
||||
this.formRadioButton1.Location = new System.Drawing.Point(18, 23);
|
||||
this.formRadioButton1.Name = "formRadioButton1";
|
||||
this.formRadioButton1.Size = new System.Drawing.Size(65, 17);
|
||||
this.formRadioButton1.TabIndex = 0;
|
||||
this.formRadioButton1.TabStop = true;
|
||||
this.formRadioButton1.Text = "Barcode";
|
||||
this.formRadioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton2
|
||||
//
|
||||
this.formRadioButton2.AutoSize = true;
|
||||
this.formRadioButton2.Location = new System.Drawing.Point(18, 43);
|
||||
this.formRadioButton2.Name = "formRadioButton2";
|
||||
this.formRadioButton2.Size = new System.Drawing.Size(68, 17);
|
||||
this.formRadioButton2.TabIndex = 1;
|
||||
this.formRadioButton2.TabStop = true;
|
||||
this.formRadioButton2.Text = "QR code";
|
||||
this.formRadioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton3
|
||||
//
|
||||
this.formRadioButton3.AutoSize = true;
|
||||
this.formRadioButton3.Location = new System.Drawing.Point(18, 63);
|
||||
this.formRadioButton3.Name = "formRadioButton3";
|
||||
this.formRadioButton3.Size = new System.Drawing.Size(70, 17);
|
||||
this.formRadioButton3.TabIndex = 2;
|
||||
this.formRadioButton3.TabStop = true;
|
||||
this.formRadioButton3.Text = "Keyboard";
|
||||
this.formRadioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton4
|
||||
//
|
||||
this.formRadioButton4.AutoSize = true;
|
||||
this.formRadioButton4.Location = new System.Drawing.Point(18, 83);
|
||||
this.formRadioButton4.Name = "formRadioButton4";
|
||||
this.formRadioButton4.Size = new System.Drawing.Size(137, 17);
|
||||
this.formRadioButton4.TabIndex = 3;
|
||||
this.formRadioButton4.TabStop = true;
|
||||
this.formRadioButton4.Text = "OK / NOK manual entry";
|
||||
this.formRadioButton4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton5
|
||||
//
|
||||
this.formRadioButton5.AutoSize = true;
|
||||
this.formRadioButton5.Location = new System.Drawing.Point(18, 103);
|
||||
this.formRadioButton5.Name = "formRadioButton5";
|
||||
this.formRadioButton5.Size = new System.Drawing.Size(92, 17);
|
||||
this.formRadioButton5.TabIndex = 4;
|
||||
this.formRadioButton5.TabStop = true;
|
||||
this.formRadioButton5.Text = "Complete S/N";
|
||||
this.formRadioButton5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// codeFormGroupBox
|
||||
//
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton9);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton8);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton7);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton6);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton5);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton4);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton3);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton2);
|
||||
this.codeFormGroupBox.Controls.Add(this.formRadioButton1);
|
||||
this.codeFormGroupBox.Location = new System.Drawing.Point(474, 136);
|
||||
this.codeFormGroupBox.Name = "codeFormGroupBox";
|
||||
this.codeFormGroupBox.Size = new System.Drawing.Size(158, 212);
|
||||
this.codeFormGroupBox.TabIndex = 9;
|
||||
this.codeFormGroupBox.TabStop = false;
|
||||
this.codeFormGroupBox.Text = "Code form";
|
||||
//
|
||||
// formRadioButton8
|
||||
//
|
||||
this.formRadioButton8.AutoSize = true;
|
||||
this.formRadioButton8.Location = new System.Drawing.Point(18, 163);
|
||||
this.formRadioButton8.Name = "formRadioButton8";
|
||||
this.formRadioButton8.Size = new System.Drawing.Size(133, 17);
|
||||
this.formRadioButton8.TabIndex = 7;
|
||||
this.formRadioButton8.TabStop = true;
|
||||
this.formRadioButton8.Text = "S/N generator / printer";
|
||||
this.formRadioButton8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton7
|
||||
//
|
||||
this.formRadioButton7.AutoSize = true;
|
||||
this.formRadioButton7.Location = new System.Drawing.Point(18, 143);
|
||||
this.formRadioButton7.Name = "formRadioButton7";
|
||||
this.formRadioButton7.Size = new System.Drawing.Size(52, 17);
|
||||
this.formRadioButton7.TabIndex = 6;
|
||||
this.formRadioButton7.TabStop = true;
|
||||
this.formRadioButton7.Text = "Scale";
|
||||
this.formRadioButton7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton6
|
||||
//
|
||||
this.formRadioButton6.AutoSize = true;
|
||||
this.formRadioButton6.Location = new System.Drawing.Point(18, 123);
|
||||
this.formRadioButton6.Name = "formRadioButton6";
|
||||
this.formRadioButton6.Size = new System.Drawing.Size(61, 17);
|
||||
this.formRadioButton6.TabIndex = 5;
|
||||
this.formRadioButton6.TabStop = true;
|
||||
this.formRadioButton6.Text = "Camera";
|
||||
this.formRadioButton6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// formRadioButton9
|
||||
//
|
||||
this.formRadioButton9.AutoSize = true;
|
||||
this.formRadioButton9.Location = new System.Drawing.Point(18, 183);
|
||||
this.formRadioButton9.Name = "formRadioButton9";
|
||||
this.formRadioButton9.Size = new System.Drawing.Size(98, 17);
|
||||
this.formRadioButton9.TabIndex = 8;
|
||||
this.formRadioButton9.TabStop = true;
|
||||
this.formRadioButton9.Text = "640 datastream";
|
||||
this.formRadioButton9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PartDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(833, 359);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.oraDBTypeTextBox);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.lifetimeManagementComboBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.codeLocationGroupBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.codeFormGroupBox);
|
||||
this.Controls.Add(this.codeTypeGroupBox);
|
||||
this.Controls.Add(this.descriptionTextBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "PartDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "New part";
|
||||
this.Load += new System.EventHandler(this.PartDlg_Load);
|
||||
this.codeTypeGroupBox.ResumeLayout(false);
|
||||
this.codeTypeGroupBox.PerformLayout();
|
||||
this.codeLocationGroupBox.ResumeLayout(false);
|
||||
this.codeLocationGroupBox.PerformLayout();
|
||||
this.codeFormGroupBox.ResumeLayout(false);
|
||||
this.codeFormGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.TextBox descriptionTextBox;
|
||||
private System.Windows.Forms.GroupBox codeTypeGroupBox;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton2;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.GroupBox codeLocationGroupBox;
|
||||
private System.Windows.Forms.RadioButton locationRadioButton2;
|
||||
private System.Windows.Forms.RadioButton locationRadioButton1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox lifetimeManagementComboBox;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton3;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton4;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton5;
|
||||
private System.Windows.Forms.TextBox oraDBTypeTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton6;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton7;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton8;
|
||||
private System.Windows.Forms.RadioButton typeRadioButton9;
|
||||
private System.Windows.Forms.RadioButton formRadioButton1;
|
||||
private System.Windows.Forms.RadioButton formRadioButton2;
|
||||
private System.Windows.Forms.RadioButton formRadioButton3;
|
||||
private System.Windows.Forms.RadioButton formRadioButton4;
|
||||
private System.Windows.Forms.RadioButton formRadioButton5;
|
||||
private System.Windows.Forms.GroupBox codeFormGroupBox;
|
||||
private System.Windows.Forms.RadioButton formRadioButton6;
|
||||
private System.Windows.Forms.RadioButton formRadioButton7;
|
||||
private System.Windows.Forms.RadioButton formRadioButton8;
|
||||
private System.Windows.Forms.RadioButton formRadioButton9;
|
||||
}
|
||||
}
|
||||
266
WorkflowConfigurator/Forms/PartDlg.cs
Normal file
266
WorkflowConfigurator/Forms/PartDlg.cs
Normal file
@ -0,0 +1,266 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
public partial class PartDlg : Form
|
||||
{
|
||||
public Part Part;
|
||||
public bool AnyChange; /// if AnyChange == true the dialog returns DialogResult.OK
|
||||
|
||||
/// <summary>
|
||||
/// Constructor when a new part is being created
|
||||
/// </summary>
|
||||
/// <param name="name">Part name</param>
|
||||
/// <param name="process">Process</param>
|
||||
public PartDlg(string name, Process process)
|
||||
{
|
||||
InitializeComponent();
|
||||
Part = new Part(name, process, CodeType.UniqueNr, CodeForm.QRCode, CodeLocation.OnPart);
|
||||
Text = Strings.New_part;
|
||||
AnyChange = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor when a part is being editted
|
||||
/// </summary>
|
||||
/// <param name="part">Part</param>
|
||||
public PartDlg(Part part, bool unlockedCompletely, bool unlockedReleased)
|
||||
{
|
||||
InitializeComponent();
|
||||
Part = part;
|
||||
Text = Strings.Part_properties;
|
||||
AnyChange = false;
|
||||
|
||||
if (unlockedCompletely)
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
descriptionTextBox.Enabled = true;
|
||||
oraDBTypeTextBox.Enabled = true;
|
||||
lifetimeManagementComboBox.Enabled = true;
|
||||
|
||||
typeRadioButton1.Enabled = true;
|
||||
typeRadioButton2.Enabled = true;
|
||||
typeRadioButton3.Enabled = true;
|
||||
typeRadioButton4.Enabled = true;
|
||||
typeRadioButton5.Enabled = true;
|
||||
typeRadioButton6.Enabled = true;
|
||||
typeRadioButton7.Enabled = true;
|
||||
typeRadioButton8.Enabled = true;
|
||||
typeRadioButton9.Enabled = true;
|
||||
|
||||
formRadioButton1.Enabled = true;
|
||||
formRadioButton2.Enabled = true;
|
||||
formRadioButton3.Enabled = true;
|
||||
formRadioButton4.Enabled = true;
|
||||
formRadioButton5.Enabled = true;
|
||||
formRadioButton6.Enabled = true;
|
||||
formRadioButton7.Enabled = true;
|
||||
formRadioButton8.Enabled = true;
|
||||
formRadioButton9.Enabled = true;
|
||||
|
||||
locationRadioButton1.Enabled = true;
|
||||
locationRadioButton2.Enabled = true;
|
||||
}
|
||||
else if (unlockedReleased)
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
descriptionTextBox.Enabled = true;
|
||||
oraDBTypeTextBox.Enabled = true;
|
||||
lifetimeManagementComboBox.Enabled = true;
|
||||
|
||||
typeRadioButton1.Enabled = true;
|
||||
typeRadioButton2.Enabled = true;
|
||||
typeRadioButton3.Enabled = true;
|
||||
typeRadioButton4.Enabled = true;
|
||||
typeRadioButton5.Enabled = true;
|
||||
typeRadioButton6.Enabled = true;
|
||||
typeRadioButton7.Enabled = true;
|
||||
typeRadioButton8.Enabled = true;
|
||||
typeRadioButton9.Enabled = true;
|
||||
|
||||
formRadioButton1.Enabled = false;
|
||||
formRadioButton2.Enabled = false;
|
||||
formRadioButton3.Enabled = false;
|
||||
formRadioButton4.Enabled = false;
|
||||
formRadioButton5.Enabled = false;
|
||||
formRadioButton6.Enabled = false;
|
||||
formRadioButton7.Enabled = false;
|
||||
formRadioButton8.Enabled = false;
|
||||
formRadioButton9.Enabled = false;
|
||||
|
||||
locationRadioButton1.Enabled = false;
|
||||
locationRadioButton2.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
nameTextBox.Enabled = false;
|
||||
descriptionTextBox.Enabled = false;
|
||||
oraDBTypeTextBox.Enabled = false;
|
||||
lifetimeManagementComboBox.Enabled = false;
|
||||
|
||||
typeRadioButton1.Enabled = false;
|
||||
typeRadioButton2.Enabled = false;
|
||||
typeRadioButton3.Enabled = false;
|
||||
typeRadioButton4.Enabled = false;
|
||||
typeRadioButton5.Enabled = false;
|
||||
typeRadioButton6.Enabled = false;
|
||||
typeRadioButton7.Enabled = false;
|
||||
typeRadioButton8.Enabled = false;
|
||||
typeRadioButton9.Enabled = false;
|
||||
|
||||
formRadioButton1.Enabled = false;
|
||||
formRadioButton2.Enabled = false;
|
||||
formRadioButton3.Enabled = false;
|
||||
formRadioButton4.Enabled = false;
|
||||
formRadioButton5.Enabled = false;
|
||||
formRadioButton6.Enabled = false;
|
||||
formRadioButton7.Enabled = false;
|
||||
formRadioButton8.Enabled = false;
|
||||
formRadioButton9.Enabled = false;
|
||||
|
||||
locationRadioButton1.Enabled = false;
|
||||
locationRadioButton2.Enabled = false;
|
||||
|
||||
okButton.Visible = false;
|
||||
cancelButton.Text = Strings.Close;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void PartDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (LifetimeManagement lm = 0; lm < LifetimeManagement.Count; lm++)
|
||||
{
|
||||
lifetimeManagementComboBox.Items.Add(lm.ToString());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
nameTextBox.Text = Part.Name;
|
||||
oraDBTypeTextBox.Text = Part.OraDBType;
|
||||
descriptionTextBox.Text = Part.Description;
|
||||
lifetimeManagementComboBox.Text = Part.LifetimeManagement.ToString();
|
||||
|
||||
typeRadioButton1.Checked = (Part.CodeType == (sbyte)CodeType.UniqueNr);
|
||||
typeRadioButton2.Checked = (Part.CodeType == (sbyte)CodeType.FlowtubeNr);
|
||||
typeRadioButton3.Checked = (Part.CodeType == (sbyte)CodeType.FlowtubeNrLU);
|
||||
typeRadioButton4.Checked = (Part.CodeType == (sbyte)CodeType.BatchNr);
|
||||
typeRadioButton5.Checked = (Part.CodeType == (sbyte)CodeType.BatchNrContainingPartName);
|
||||
typeRadioButton6.Checked = (Part.CodeType == (sbyte)CodeType.DateMMYY);
|
||||
typeRadioButton7.Checked = (Part.CodeType == (sbyte)CodeType.QualityCheck);
|
||||
typeRadioButton8.Checked = (Part.CodeType == (sbyte)CodeType.PO);
|
||||
typeRadioButton9.Checked = (Part.CodeType == (sbyte)CodeType.Silicon);
|
||||
|
||||
formRadioButton1.Checked = (Part.CodeForm == (sbyte)CodeForm.Barcode);
|
||||
formRadioButton2.Checked = (Part.CodeForm == (sbyte)CodeForm.QRCode);
|
||||
formRadioButton3.Checked = (Part.CodeForm == (sbyte)CodeForm.Keyboard);
|
||||
formRadioButton4.Checked = (Part.CodeForm == (sbyte)CodeForm.OkNok);
|
||||
formRadioButton5.Checked = (Part.CodeForm == (sbyte)CodeForm.SerialNr);
|
||||
formRadioButton6.Checked = (Part.CodeForm == (sbyte)CodeForm.Camera);
|
||||
formRadioButton7.Checked = (Part.CodeForm == (sbyte)CodeForm.Scale);
|
||||
formRadioButton8.Checked = (Part.CodeForm == (sbyte)CodeForm.SNGenerator);
|
||||
formRadioButton9.Checked = (Part.CodeForm == (sbyte)CodeForm.DataStream);
|
||||
|
||||
locationRadioButton1.Checked = (Part.CodeLocation == CodeLocation.OnPart);
|
||||
locationRadioButton2.Checked = (Part.CodeLocation == CodeLocation.OnPallet);
|
||||
}
|
||||
|
||||
void UpdateFromForm()
|
||||
{
|
||||
if (Part.Name != nameTextBox.Text) { AnyChange = true; Part.Name = nameTextBox.Text; }
|
||||
if (Part.OraDBType != oraDBTypeTextBox.Text) { AnyChange = true; Part.OraDBType = oraDBTypeTextBox.Text; }
|
||||
if (Part.Description != descriptionTextBox.Text) { AnyChange = true; Part.Description = descriptionTextBox.Text; }
|
||||
|
||||
for (LifetimeManagement lm = 0; lm < LifetimeManagement.Count; lm++)
|
||||
{
|
||||
if (lifetimeManagementComboBox.Text.Equals(lm.ToString()))
|
||||
{
|
||||
if (Part.LifetimeManagement != lm)
|
||||
{
|
||||
AnyChange = true;
|
||||
Part.LifetimeManagement = lm;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CodeType codeType = typeRadioButton1.Checked ? CodeType.UniqueNr :
|
||||
(typeRadioButton2.Checked ? CodeType.FlowtubeNr :
|
||||
(typeRadioButton3.Checked ? CodeType.FlowtubeNrLU :
|
||||
(typeRadioButton4.Checked ? CodeType.BatchNr :
|
||||
(typeRadioButton5.Checked ? CodeType.BatchNrContainingPartName :
|
||||
(typeRadioButton6.Checked ? CodeType.DateMMYY :
|
||||
(typeRadioButton7.Checked ? CodeType.QualityCheck :
|
||||
(typeRadioButton8.Checked ? CodeType.PO :
|
||||
CodeType.Silicon)))))));
|
||||
if (Part.CodeType != (sbyte)codeType)
|
||||
{
|
||||
AnyChange = true;
|
||||
Part.CodeType = (sbyte)codeType;
|
||||
}
|
||||
|
||||
|
||||
CodeForm codeForm = formRadioButton1.Checked ? CodeForm.Barcode :
|
||||
(formRadioButton2.Checked ? CodeForm.QRCode :
|
||||
(formRadioButton3.Checked ? CodeForm.Keyboard :
|
||||
(formRadioButton4.Checked ? CodeForm.OkNok :
|
||||
(formRadioButton5.Checked ? CodeForm.SerialNr :
|
||||
(formRadioButton6.Checked ? CodeForm.Camera :
|
||||
(formRadioButton7.Checked ? CodeForm.Scale :
|
||||
(formRadioButton8.Checked ? CodeForm.SNGenerator :
|
||||
CodeForm.DataStream)))))));
|
||||
if (Part.CodeForm != (sbyte)codeForm)
|
||||
{
|
||||
AnyChange = true;
|
||||
Part.CodeForm = (sbyte)codeForm;
|
||||
}
|
||||
|
||||
|
||||
CodeLocation codeLoc = locationRadioButton1.Checked ? CodeLocation.OnPart :
|
||||
CodeLocation.OnPallet;
|
||||
if (Part.CodeLocation != codeLoc)
|
||||
{
|
||||
AnyChange = true;
|
||||
Part.CodeLocation = codeLoc;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if verification passed OK
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Verify()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Verify())
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_data, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateFromForm();
|
||||
|
||||
DialogResult = AnyChange ? DialogResult.OK : DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/Forms/PartDlg.resx
Normal file
120
WorkflowConfigurator/Forms/PartDlg.resx
Normal 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>
|
||||
151
WorkflowConfigurator/Forms/SettingsDlg.Designer.cs
generated
Normal file
151
WorkflowConfigurator/Forms/SettingsDlg.Designer.cs
generated
Normal file
@ -0,0 +1,151 @@
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
partial class SettingsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.connectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.usersDBConnStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(697, 79);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(85, 38);
|
||||
this.okButton.TabIndex = 10;
|
||||
this.okButton.Text = "OK";
|
||||
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.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(792, 79);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(85, 38);
|
||||
this.cancelButton.TabIndex = 11;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// connectionStringTextBox
|
||||
//
|
||||
this.connectionStringTextBox.Location = new System.Drawing.Point(158, 18);
|
||||
this.connectionStringTextBox.Name = "connectionStringTextBox";
|
||||
this.connectionStringTextBox.Size = new System.Drawing.Size(708, 20);
|
||||
this.connectionStringTextBox.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(26, 21);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(89, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Connection string";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(26, 47);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(110, 13);
|
||||
this.label7.TabIndex = 2;
|
||||
this.label7.Text = "Users DB conn. string";
|
||||
//
|
||||
// usersDBConnStringTextBox
|
||||
//
|
||||
this.usersDBConnStringTextBox.Location = new System.Drawing.Point(158, 44);
|
||||
this.usersDBConnStringTextBox.Name = "usersDBConnStringTextBox";
|
||||
this.usersDBConnStringTextBox.Size = new System.Drawing.Size(708, 20);
|
||||
this.usersDBConnStringTextBox.TabIndex = 3;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(26, 73);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(55, 13);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Location = new System.Drawing.Point(158, 70);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.languageTextBox.TabIndex = 9;
|
||||
//
|
||||
// SettingsDlg
|
||||
//
|
||||
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(889, 130);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.usersDBConnStringTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.connectionStringTextBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.SettingsDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox usersDBConnStringTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox languageTextBox;
|
||||
}
|
||||
}
|
||||
62
WorkflowConfigurator/Forms/SettingsDlg.cs
Normal file
62
WorkflowConfigurator/Forms/SettingsDlg.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using WorkflowConfigurator;
|
||||
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
public partial class SettingsDlg : Form
|
||||
{
|
||||
public SettingsDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
connectionStringTextBox.Text = Program.LocalSettings.ConnectionString;
|
||||
usersDBConnStringTextBox.Text = Program.LocalSettings.UsersDBConnString;
|
||||
languageTextBox.Text = Program.LocalSettings.Language;
|
||||
}
|
||||
|
||||
bool IsSettingsValid(out string message)
|
||||
{
|
||||
if (languageTextBox.Text.ToLower() != "cn" &&
|
||||
languageTextBox.Text.ToLower() != "de" &&
|
||||
languageTextBox.Text.ToLower() != "en" &&
|
||||
languageTextBox.Text.ToLower() != "sk" &&
|
||||
languageTextBox.Text.ToLower() != "cn_zh")
|
||||
{
|
||||
message = "Invalid language, 'CN', 'DE', 'EN' or 'SK' expected";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = string.Empty;
|
||||
return true;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message;
|
||||
if (IsSettingsValid(out message))
|
||||
{
|
||||
Program.LocalSettings.ConnectionString = connectionStringTextBox.Text;
|
||||
Program.LocalSettings.UsersDBConnString = usersDBConnStringTextBox.Text;
|
||||
Program.LocalSettings.Language = languageTextBox.Text;
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/Forms/SettingsDlg.resx
Normal file
120
WorkflowConfigurator/Forms/SettingsDlg.resx
Normal 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>
|
||||
61
WorkflowConfigurator/Forms/ShowRecordsForm.Designer.cs
generated
Normal file
61
WorkflowConfigurator/Forms/ShowRecordsForm.Designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
partial class ShowRecordsForm
|
||||
{
|
||||
/// <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.recordsListView = new System.Windows.Forms.ListView();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// recordsListView
|
||||
//
|
||||
this.recordsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.recordsListView.Location = new System.Drawing.Point(0, 0);
|
||||
this.recordsListView.Name = "recordsListView";
|
||||
this.recordsListView.Size = new System.Drawing.Size(709, 557);
|
||||
this.recordsListView.TabIndex = 0;
|
||||
this.recordsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.recordsListView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// ShowRecordsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(709, 557);
|
||||
this.Controls.Add(this.recordsListView);
|
||||
this.Name = "ShowRecordsForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "ShowRecordsForm";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView recordsListView;
|
||||
}
|
||||
}
|
||||
35
WorkflowConfigurator/Forms/ShowRecordsForm.cs
Normal file
35
WorkflowConfigurator/Forms/ShowRecordsForm.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
public partial class ShowRecordsForm : Form
|
||||
{
|
||||
public ShowRecordsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ShowRecordsForm(IList<ReferenceRecord> refRecords)
|
||||
: this()
|
||||
{
|
||||
Text = string.Format(Strings._0_records, refRecords.Count);
|
||||
|
||||
recordsListView.Columns.Add("Time", 120);
|
||||
recordsListView.Columns.Add("Workplace", 100);
|
||||
recordsListView.Columns.Add("Part", 80);
|
||||
recordsListView.Columns.Add("Code", 200);
|
||||
|
||||
foreach (var rr in refRecords)
|
||||
{
|
||||
recordsListView.Items.Add(new ListViewItem(new string[] { string.Format("{0:dd.MM.yyyy HH:mm:ss}", rr.TimeStamp),
|
||||
rr.Workplace,
|
||||
rr.Workstep.ReferencePart.Name,
|
||||
rr.Code }));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/Forms/ShowRecordsForm.resx
Normal file
120
WorkflowConfigurator/Forms/ShowRecordsForm.resx
Normal 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>
|
||||
63
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.Designer.cs
generated
Normal file
63
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
partial class WorkflowAnalysisDlg
|
||||
{
|
||||
/// <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.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox1.Enabled = false;
|
||||
this.textBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(569, 359);
|
||||
this.textBox1.TabIndex = 0;
|
||||
//
|
||||
// ProcessAnalysisDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(569, 359);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Name = "ProcessAnalysisDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "ProcessAnalysisDlg";
|
||||
this.Load += new System.EventHandler(this.ProcessAnalysisDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
||||
60
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.cs
Normal file
60
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace WorkflowConfigurator.Forms
|
||||
{
|
||||
public partial class WorkflowAnalysisDlg : Form
|
||||
{
|
||||
readonly ISession session;
|
||||
readonly Process process;
|
||||
|
||||
public WorkflowAnalysisDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public WorkflowAnalysisDlg(ISession session, Process process)
|
||||
: this()
|
||||
{
|
||||
this.session = session;
|
||||
this.process = process;
|
||||
}
|
||||
|
||||
private void ProcessAnalysisDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (session == null || process == null) return;
|
||||
|
||||
for (int i = 1; i < process.Worksteps.Count; i++)
|
||||
{
|
||||
Workstep ws = process.Worksteps[i];
|
||||
ScanVerificationInfo svi = TracingDB.AnalyzeProcess(session, process, ws);
|
||||
if (svi != null)
|
||||
{
|
||||
if (svi.VerifyReferencePart)
|
||||
{
|
||||
textBox1.Text += string.Format("{0} ---> {1} / {2} ({3}){4}", ws.Name,
|
||||
svi.Workstep.Name,
|
||||
svi.Workstep.ReferencePart.Name,
|
||||
svi.Workstep.ReferencePart.Description,
|
||||
Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox1.Text += string.Format("{0} ---> {1} / {2} ({3}){4}", ws.Name,
|
||||
svi.Workstep.Name,
|
||||
svi.Part.Name,
|
||||
svi.Part.Description,
|
||||
Environment.NewLine);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox1.Text += string.Format("{0} ---> no checked part !!!{1}", ws.Name, Environment.NewLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.resx
Normal file
120
WorkflowConfigurator/Forms/WorkflowAnalysisDlg.resx
Normal 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>
|
||||
116
WorkflowConfigurator/LocalSettings.cs
Normal file
116
WorkflowConfigurator/LocalSettings.cs
Normal file
@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WorkflowConfigurator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to be serialized to an XML file...
|
||||
/// </summary>
|
||||
[XmlRootAttribute("WorkflowConfigurator")]
|
||||
public class LocalSettings
|
||||
{
|
||||
static XmlSerializer serializer = XmlSerializer.FromTypes(new[] { typeof(LocalSettings) })[0];
|
||||
|
||||
/// Common
|
||||
public string ConnectionString;
|
||||
public string UsersDBConnString;
|
||||
public string Language;
|
||||
|
||||
/// MainWnd
|
||||
public int MWndLeft;
|
||||
public int MWndTop;
|
||||
public int MWndWidth;
|
||||
public int MWndHeight;
|
||||
public bool MWndMaximized;
|
||||
|
||||
/// Overview
|
||||
public bool OverviewCB6;
|
||||
public bool OverviewCB7;
|
||||
public bool OverviewCB8;
|
||||
public bool OverviewCB9;
|
||||
|
||||
public string OverviewNameContains;
|
||||
public float SplDst1;
|
||||
public float SplDst2;
|
||||
|
||||
public int ColWid1;
|
||||
public int ColWid2;
|
||||
public int ColWid3;
|
||||
public int ColWid4;
|
||||
public int ColWid5;
|
||||
public int ColWid6;
|
||||
public int ColWid7;
|
||||
public int ColWid8;
|
||||
|
||||
public string LastWorkstep;
|
||||
|
||||
public LocalSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public LocalSettings(bool createNew)
|
||||
: this()
|
||||
{
|
||||
/// Default settings
|
||||
|
||||
/// Common
|
||||
ConnectionString = "SERVER=10.42.128.24; DATABASE=sledovanie2019; UID=vyroba2019; PASSWORD=qwerty; CHARSET=utf8";
|
||||
UsersDBConnString = "SERVER=10.42.128.24; DATABASE=st_wr_shared_config; UID=u9305784; PASSWORD=p89344390; CHARSET=utf8;";
|
||||
Language = "sk";
|
||||
|
||||
/// MainWnd
|
||||
MWndLeft = 20;
|
||||
MWndTop = 20;
|
||||
MWndWidth = 1250;
|
||||
MWndHeight = 750;
|
||||
MWndMaximized = false;
|
||||
|
||||
/// Overview
|
||||
OverviewCB6 = true;
|
||||
OverviewCB7 = true;
|
||||
OverviewCB8 = true;
|
||||
OverviewCB9 = true;
|
||||
SplDst1 = 600;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load public fields of this class from the XML file.
|
||||
/// </summary>
|
||||
/// <returns>LocalSettings object or null when Load() fails</returns>
|
||||
public static LocalSettings Load(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextReader reader = new StreamReader(fileName))
|
||||
{
|
||||
return serializer.Deserialize(reader) as LocalSettings;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save public fields of this class to the XML file.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextWriter writer = new StreamWriter(Program.LocalSettingsFileName))
|
||||
{
|
||||
serializer.Serialize(writer, this);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
51
WorkflowConfigurator/MainWnd.Designer.cs
generated
Normal file
51
WorkflowConfigurator/MainWnd.Designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
||||
namespace WorkflowConfigurator
|
||||
{
|
||||
partial class MainWnd
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// MainWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1184, 712);
|
||||
this.Name = "MainWnd";
|
||||
this.Text = "Workflow configurator";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWnd_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainWnd_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
140
WorkflowConfigurator/MainWnd.cs
Normal file
140
WorkflowConfigurator/MainWnd.cs
Normal file
@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator
|
||||
{
|
||||
public partial class MainWnd : Form
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
||||
|
||||
public MainWnd()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
///
|
||||
/// Loads processes from the database.
|
||||
/// In case of problems (missing database) makes it possible to create a new one.
|
||||
///
|
||||
DialogResult settingsDR = DialogResult.OK;
|
||||
do
|
||||
{
|
||||
if (settingsDR == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
TracingDB.Session = TracingDB.CreateSession(Program.LocalSettings.ConnectionString);
|
||||
IList<WorkplaceRegistration> wPlaceRegistations = TracingDB.Session.QueryOver<WorkplaceRegistration>().List(); /// Try DB connection
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.FatalFormat("{0}:{1}{2}", Strings.Opening_database_failed, Environment.NewLine, exc.Message);
|
||||
|
||||
DialogResult rslt = MessageBox.Show(string.Format("{0}:{1}{2}{3}{1}{4}",
|
||||
Strings.Opening_database_failed,
|
||||
Environment.NewLine,
|
||||
exc.Message,
|
||||
exc.InnerException != null ? Environment.NewLine + exc.InnerException.Message : string.Empty,
|
||||
Strings.Do_you_want_to_change_settingsQM),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Exclamation);
|
||||
if (rslt != DialogResult.Yes)
|
||||
{
|
||||
/// Settings ware not changed -> exit
|
||||
throw new QuitAppException(Strings.Opening_database_failed);
|
||||
}
|
||||
|
||||
settingsDR = new Forms.SettingsDlg().ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
while (settingsDR != DialogResult.Cancel && (TracingDB.Session == null));
|
||||
|
||||
if (settingsDR == DialogResult.Cancel)
|
||||
{
|
||||
/// Settings were not changed -> exit
|
||||
throw new QuitAppException(Strings.Opening_database_failed);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Program.LocalSettings.UsersDBConnString))
|
||||
{
|
||||
GlobalData.LocalUsersDB = new DBSettings(Common.DBType.MySql, Program.LocalSettings.UsersDBConnString);
|
||||
}
|
||||
}
|
||||
|
||||
private void MainWnd_Load(object sender, EventArgs e)
|
||||
{
|
||||
PrintTitle(false);
|
||||
|
||||
Controls.Add(new UserControls.OverviewOfProcessesCtrl(this));
|
||||
|
||||
Settings2UI();
|
||||
}
|
||||
|
||||
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
e.Cancel = false;
|
||||
UI2Settings();
|
||||
Program.LocalSettings.Save();
|
||||
}
|
||||
|
||||
#region Helper functions
|
||||
|
||||
public static void PrintTitle(bool busy)
|
||||
{
|
||||
string user = GlobalData.GetCurrentUserName();
|
||||
if (!string.IsNullOrEmpty(user)) user = string.Format(" ({0})", user);
|
||||
|
||||
Program.MainWnd.Text = string.Format(busy ? "{0} v.{1}{2} ... reading database" : "{0} v.{1}{2}",
|
||||
Strings.Workflow_configurator, Program.Version, user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set UI properties (determining the window position, etc) to values obtained from local settings
|
||||
/// </summary>
|
||||
void Settings2UI()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
///
|
||||
WindowState = (ls.MWndMaximized ? FormWindowState.Maximized : FormWindowState.Normal);
|
||||
Width = ls.MWndWidth;
|
||||
Height = ls.MWndHeight;
|
||||
Left = ls.MWndLeft;
|
||||
Top = ls.MWndTop;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve UI properties and save them to local settings
|
||||
/// </summary>
|
||||
void UI2Settings()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
///
|
||||
ls.MWndMaximized = (WindowState == FormWindowState.Maximized);
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
ls.MWndLeft = Location.X;
|
||||
ls.MWndTop = Location.Y;
|
||||
ls.MWndWidth = Size.Width;
|
||||
ls.MWndHeight = Size.Height; }
|
||||
else
|
||||
{
|
||||
/// Maximized or minimized (when restarted, minimized window is restored as normal)
|
||||
ls.MWndLeft = RestoreBounds.Left;
|
||||
ls.MWndTop = RestoreBounds.Top;
|
||||
ls.MWndWidth = RestoreBounds.Width;
|
||||
ls.MWndHeight = RestoreBounds.Height;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/MainWnd.resx
Normal file
120
WorkflowConfigurator/MainWnd.resx
Normal 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>
|
||||
BIN
WorkflowConfigurator/Pictures/0.bmp
Normal file
BIN
WorkflowConfigurator/Pictures/0.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
WorkflowConfigurator/Pictures/1.bmp
Normal file
BIN
WorkflowConfigurator/Pictures/1.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
WorkflowConfigurator/Pictures/2.bmp
Normal file
BIN
WorkflowConfigurator/Pictures/2.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
WorkflowConfigurator/Pictures/3.bmp
Normal file
BIN
WorkflowConfigurator/Pictures/3.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
WorkflowConfigurator/Pictures/4.bmp
Normal file
BIN
WorkflowConfigurator/Pictures/4.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
160
WorkflowConfigurator/Program.cs
Normal file
160
WorkflowConfigurator/Program.cs
Normal file
@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Common.Forms;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// Constants
|
||||
public static GID[] SettingsAccessLevel = new GID[] { GID.TraceabilityManagement }; /// Group membership to access settings
|
||||
public const string ConfigFName = "config.xml";
|
||||
public const string BackupConfigFName = "config.backup.xml";
|
||||
public const string Log4NetConfigFName = "log4netConfig.xml";
|
||||
|
||||
/// Program information
|
||||
public static readonly string Version; /// version string
|
||||
public static readonly DateTime BuildDateTime; /// date and time of program build
|
||||
public static readonly string ExeDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LogDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
|
||||
public static MainWnd MainWnd;
|
||||
|
||||
/// Local settings
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
static Program()
|
||||
{
|
||||
/// Program version string
|
||||
Assembly thisAssembly = Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
BuildDateTime = new FileInfo(thisAssembly.Location).LastWriteTime;
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExeDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
ConfigDirectory = Path.Combine(ExeDirectory, "..", "Cfg");
|
||||
LogDirectory = Path.Combine(ExeDirectory, "..", "Logs");
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, ConfigFName);
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, BackupConfigFName);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (Program.LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsBackupName);
|
||||
if (Program.LocalSettings == null)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Program_is_running_for_the_1st_time_on_this_PC,
|
||||
Environment.NewLine,
|
||||
Strings.Default_settings_are_used),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
Program.LocalSettings = new LocalSettings(true); /// Create new default local setting
|
||||
Directory.CreateDirectory(ConfigDirectory);
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
if (File.Exists(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName)))
|
||||
{
|
||||
File.Copy(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName),
|
||||
Path.Combine(ConfigDirectory, Log4NetConfigFName));
|
||||
}
|
||||
|
||||
File.SetAttributes(Path.Combine(ConfigDirectory, Log4NetConfigFName), FileAttributes.Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalSettings.Save(); /// Save the settings to overwrite the wrong file
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Loading local seetings from the regular config file was successful. Update the backup
|
||||
File.Copy(Program.LocalSettingsFileName, Program.LocalSettingsBackupName, true);
|
||||
}
|
||||
|
||||
///
|
||||
/// Configure and start logging
|
||||
///
|
||||
log4net.Config.XmlConfigurator.Configure(new FileInfo(Path.Combine(ConfigDirectory, Log4NetConfigFName)));
|
||||
ILog log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("------------------------------------------------------------------------------------------------");
|
||||
log.FatalFormat("WorkfowConfigurator v.{0} started", Version);
|
||||
|
||||
///
|
||||
/// Set language
|
||||
///
|
||||
try
|
||||
{
|
||||
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Program.LocalSettings.Language);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Selected language is not supported.\nGoing to use English.",
|
||||
"Warning",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Asterisk);
|
||||
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
|
||||
}
|
||||
|
||||
///
|
||||
/// Run the WinForm application
|
||||
///
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
try
|
||||
{
|
||||
MainWnd = new MainWnd();
|
||||
Application.Run(MainWnd);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
if (exc is QuitAppException)
|
||||
{
|
||||
ModelessForm.CloseForm();
|
||||
log.FatalFormat("Program was not running: {0}", exc.Message);
|
||||
MessageBox.Show(exc.Message,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat("Program crashed:{0}{1}Stack trace:{0}{2}", Environment.NewLine, exc.Message, exc.StackTrace);
|
||||
|
||||
MessageBox.Show("Program crashed:" +
|
||||
Environment.NewLine + Environment.NewLine + exc.Message +
|
||||
((exc.InnerException == null) ? string.Empty : (Environment.NewLine + exc.InnerException.Message)) +
|
||||
Environment.NewLine + exc.StackTrace,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
WorkflowConfigurator/Properties/AssemblyInfo.cs
Normal file
36
WorkflowConfigurator/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WorkflowConfigurator")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WorkflowConfigurator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019-2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3c654da0-465b-44a0-a7e3-a8a2b81c706f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.3.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.3.0")]
|
||||
63
WorkflowConfigurator/Properties/Resources.Designer.cs
generated
Normal file
63
WorkflowConfigurator/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WorkflowConfigurator.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WorkflowConfigurator.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
WorkflowConfigurator/Properties/Resources.resx
Normal file
117
WorkflowConfigurator/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
WorkflowConfigurator/Properties/Settings.Designer.cs
generated
Normal file
26
WorkflowConfigurator/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WorkflowConfigurator.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
WorkflowConfigurator/Properties/Settings.settings
Normal file
7
WorkflowConfigurator/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
927
WorkflowConfigurator/Resources/Strings.Designer.cs
generated
Normal file
927
WorkflowConfigurator/Resources/Strings.Designer.cs
generated
Normal file
@ -0,0 +1,927 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WorkflowConfigurator.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Strings {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Strings() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WorkflowConfigurator.Resources.Strings", typeof(Strings).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} records.
|
||||
/// </summary>
|
||||
internal static string _0_records {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_records", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <none>.
|
||||
/// </summary>
|
||||
internal static string _none_ {
|
||||
get {
|
||||
return ResourceManager.GetString("_none_", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Abandon changes and continue.
|
||||
/// </summary>
|
||||
internal static string Abandon_changes {
|
||||
get {
|
||||
return ResourceManager.GetString("Abandon_changes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activate.
|
||||
/// </summary>
|
||||
internal static string Activate {
|
||||
get {
|
||||
return ResourceManager.GetString("Activate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activate again.
|
||||
/// </summary>
|
||||
internal static string Activate_again {
|
||||
get {
|
||||
return ResourceManager.GetString("Activate_again", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add.
|
||||
/// </summary>
|
||||
internal static string Add {
|
||||
get {
|
||||
return ResourceManager.GetString("Add", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All workflows.
|
||||
/// </summary>
|
||||
internal static string All_workflows {
|
||||
get {
|
||||
return ResourceManager.GetString("All_workflows", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allow repairs on this workplace.
|
||||
/// </summary>
|
||||
internal static string Allow_repairs {
|
||||
get {
|
||||
return ResourceManager.GetString("Allow_repairs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Approve.
|
||||
/// </summary>
|
||||
internal static string Approve {
|
||||
get {
|
||||
return ResourceManager.GetString("Approve", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Approved by.
|
||||
/// </summary>
|
||||
internal static string Approved_by {
|
||||
get {
|
||||
return ResourceManager.GetString("Approved_by", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Back to editing.
|
||||
/// </summary>
|
||||
internal static string Back_to_editing {
|
||||
get {
|
||||
return ResourceManager.GetString("Back_to_editing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flowtubes.
|
||||
/// </summary>
|
||||
internal static string CB_Flowtubes {
|
||||
get {
|
||||
return ResourceManager.GetString("CB_Flowtubes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Watermeters (WM).
|
||||
/// </summary>
|
||||
internal static string CB_Watermeters {
|
||||
get {
|
||||
return ResourceManager.GetString("CB_Watermeters", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WM-s without PCB.
|
||||
/// </summary>
|
||||
internal static string CB_Without_PCB {
|
||||
get {
|
||||
return ResourceManager.GetString("CB_Without_PCB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WM-s from Flowt..
|
||||
/// </summary>
|
||||
internal static string CB_WMs_from_Flowt {
|
||||
get {
|
||||
return ResourceManager.GetString("CB_WMs_from_Flowt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WM-s from ft w/o PCB.
|
||||
/// </summary>
|
||||
internal static string CB_WMs_from_ft_wo_PCB {
|
||||
get {
|
||||
return ResourceManager.GetString("CB_WMs_from_ft_wo_PCB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chck..
|
||||
/// </summary>
|
||||
internal static string Chdr_Check {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_Check", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to s/n.
|
||||
/// </summary>
|
||||
internal static string Chdr_HasSN {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_HasSN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
internal static string Chdr_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Nr..
|
||||
/// </summary>
|
||||
internal static string Chdr_Nr {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_Nr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Oracle descr..
|
||||
/// </summary>
|
||||
internal static string Chdr_OraDBDescr {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_OraDBDescr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Oracle.
|
||||
/// </summary>
|
||||
internal static string Chdr_OraDBType {
|
||||
get {
|
||||
return ResourceManager.GetString("Chdr_OraDBType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Check part no..
|
||||
/// </summary>
|
||||
internal static string Check_part_no {
|
||||
get {
|
||||
return ResourceManager.GetString("Check_part_no", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Checked part.
|
||||
/// </summary>
|
||||
internal static string Checked_part {
|
||||
get {
|
||||
return ResourceManager.GetString("Checked_part", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Class.
|
||||
/// </summary>
|
||||
internal static string Class {
|
||||
get {
|
||||
return ResourceManager.GetString("Class", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Close.
|
||||
/// </summary>
|
||||
internal static string Close {
|
||||
get {
|
||||
return ResourceManager.GetString("Close", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm.
|
||||
/// </summary>
|
||||
internal static string Confirm {
|
||||
get {
|
||||
return ResourceManager.GetString("Confirm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to copy.
|
||||
/// </summary>
|
||||
internal static string copy {
|
||||
get {
|
||||
return ResourceManager.GetString("copy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy workflow.
|
||||
/// </summary>
|
||||
internal static string Copy_workflow {
|
||||
get {
|
||||
return ResourceManager.GetString("Copy_workflow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Count.
|
||||
/// </summary>
|
||||
internal static string Count {
|
||||
get {
|
||||
return ResourceManager.GetString("Count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Counters.
|
||||
/// </summary>
|
||||
internal static string Counters {
|
||||
get {
|
||||
return ResourceManager.GetString("Counters", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Created by.
|
||||
/// </summary>
|
||||
internal static string Created_by {
|
||||
get {
|
||||
return ResourceManager.GetString("Created_by", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deactivate.
|
||||
/// </summary>
|
||||
internal static string Deactivate {
|
||||
get {
|
||||
return ResourceManager.GetString("Deactivate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deactivated.
|
||||
/// </summary>
|
||||
internal static string Deactivated {
|
||||
get {
|
||||
return ResourceManager.GetString("Deactivated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default settings are used..
|
||||
/// </summary>
|
||||
internal static string Default_settings_are_used {
|
||||
get {
|
||||
return ResourceManager.GetString("Default_settings_are_used", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deleting records.
|
||||
/// </summary>
|
||||
internal static string Deleting_records {
|
||||
get {
|
||||
return ResourceManager.GetString("Deleting_records", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deleting records failed.
|
||||
/// </summary>
|
||||
internal static string Deleting_records_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Deleting_records_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Description.
|
||||
/// </summary>
|
||||
internal static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to change settings?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_change_settingsQM {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_change_settingsQM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to delete records created while testing ?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_delete_records_created_while_testing_QM {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_delete_records_created_while_testing_QM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to import parts from a list ?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_import_parts_from_a_list {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_import_parts_from_a_list", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to use template ?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_use_templateQM {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_use_templateQM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error.
|
||||
/// </summary>
|
||||
internal static string Error {
|
||||
get {
|
||||
return ResourceManager.GetString("Error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to import a list of parts.
|
||||
/// </summary>
|
||||
internal static string Failed_to_import_a_list_of_parts {
|
||||
get {
|
||||
return ResourceManager.GetString("Failed_to_import_a_list_of_parts", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filter.
|
||||
/// </summary>
|
||||
internal static string Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flowtube.
|
||||
/// </summary>
|
||||
internal static string Flowtube {
|
||||
get {
|
||||
return ResourceManager.GetString("Flowtube", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Import.
|
||||
/// </summary>
|
||||
internal static string Import {
|
||||
get {
|
||||
return ResourceManager.GetString("Import", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In preparation.
|
||||
/// </summary>
|
||||
internal static string In_preparation {
|
||||
get {
|
||||
return ResourceManager.GetString("In_preparation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid {0}.
|
||||
/// </summary>
|
||||
internal static string Invalid_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid data.
|
||||
/// </summary>
|
||||
internal static string Invalid_data {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_data", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid data: {0}.
|
||||
/// </summary>
|
||||
internal static string Invalid_data_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_data_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid data: {0}{1}Yes: Continue editing{1}No: Revert changes and finish.
|
||||
/// </summary>
|
||||
internal static string Invalid_data_01_Yes_Continue_editing_1_No_Revert_changes_and_finish {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_data_01_Yes_Continue_editing_1_No_Revert_changes_and_finish", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Modify.
|
||||
/// </summary>
|
||||
internal static string Modify {
|
||||
get {
|
||||
return ResourceManager.GetString("Modify", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name contains.
|
||||
/// </summary>
|
||||
internal static string Name_contains {
|
||||
get {
|
||||
return ResourceManager.GetString("Name_contains", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New part.
|
||||
/// </summary>
|
||||
internal static string New_part {
|
||||
get {
|
||||
return ResourceManager.GetString("New_part", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New workflow.
|
||||
/// </summary>
|
||||
internal static string New_workflow {
|
||||
get {
|
||||
return ResourceManager.GetString("New_workflow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No part selected.
|
||||
/// </summary>
|
||||
internal static string No_part_selected {
|
||||
get {
|
||||
return ResourceManager.GetString("No_part_selected", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No release notes..
|
||||
/// </summary>
|
||||
internal static string No_release_notes {
|
||||
get {
|
||||
return ResourceManager.GetString("No_release_notes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notes.
|
||||
/// </summary>
|
||||
internal static string Notes {
|
||||
get {
|
||||
return ResourceManager.GetString("Notes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Opening database failed.
|
||||
/// </summary>
|
||||
internal static string Opening_database_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Opening_database_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Overview of workflows.
|
||||
/// </summary>
|
||||
internal static string Overview_of_workflows {
|
||||
get {
|
||||
return ResourceManager.GetString("Overview_of_workflows", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Part is used in workfow kstep {0}.
|
||||
/// </summary>
|
||||
internal static string Part_is_used_in_workstep_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Part_is_used_in_workstep_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Part properties.
|
||||
/// </summary>
|
||||
internal static string Part_properties {
|
||||
get {
|
||||
return ResourceManager.GetString("Part_properties", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parts.
|
||||
/// </summary>
|
||||
internal static string Parts {
|
||||
get {
|
||||
return ResourceManager.GetString("Parts", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Production.
|
||||
/// </summary>
|
||||
internal static string Production {
|
||||
get {
|
||||
return ResourceManager.GetString("Production", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program is running for the 1st time on this PC..
|
||||
/// </summary>
|
||||
internal static string Program_is_running_for_the_1st_time_on_this_PC {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_is_running_for_the_1st_time_on_this_PC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Records created while testing will be deleted..
|
||||
/// </summary>
|
||||
internal static string Records_created_while_testing_will_be_deleted {
|
||||
get {
|
||||
return ResourceManager.GetString("Records_created_while_testing_will_be_deleted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reference part.
|
||||
/// </summary>
|
||||
internal static string Reference_part {
|
||||
get {
|
||||
return ResourceManager.GetString("Reference_part", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Refresh.
|
||||
/// </summary>
|
||||
internal static string Refresh {
|
||||
get {
|
||||
return ResourceManager.GetString("Refresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Release.
|
||||
/// </summary>
|
||||
internal static string Release {
|
||||
get {
|
||||
return ResourceManager.GetString("Release", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Release to production.
|
||||
/// </summary>
|
||||
internal static string Release_to_production {
|
||||
get {
|
||||
return ResourceManager.GetString("Release_to_production", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Released.
|
||||
/// </summary>
|
||||
internal static string Released {
|
||||
get {
|
||||
return ResourceManager.GetString("Released", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove.
|
||||
/// </summary>
|
||||
internal static string Remove {
|
||||
get {
|
||||
return ResourceManager.GetString("Remove", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save.
|
||||
/// </summary>
|
||||
internal static string Save {
|
||||
get {
|
||||
return ResourceManager.GetString("Save", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save changes.
|
||||
/// </summary>
|
||||
internal static string Save_changes {
|
||||
get {
|
||||
return ResourceManager.GetString("Save_changes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Saving changes failed..
|
||||
/// </summary>
|
||||
internal static string Saving_changes_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Saving_changes_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Selected part is already used in this workstep..
|
||||
/// </summary>
|
||||
internal static string Selected_part_is_already_used_in_this_workstep {
|
||||
get {
|
||||
return ResourceManager.GetString("Selected_part_is_already_used_in_this_workstep", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Selected part is the reference part in this workstep..
|
||||
/// </summary>
|
||||
internal static string Selected_part_is_the_reference_part_in_this_workstep {
|
||||
get {
|
||||
return ResourceManager.GetString("Selected_part_is_the_reference_part_in_this_workstep", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Settings.
|
||||
/// </summary>
|
||||
internal static string Settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show records.
|
||||
/// </summary>
|
||||
internal static string Show_records {
|
||||
get {
|
||||
return ResourceManager.GetString("Show_records", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to State.
|
||||
/// </summary>
|
||||
internal static string State {
|
||||
get {
|
||||
return ResourceManager.GetString("State", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Statistics.
|
||||
/// </summary>
|
||||
internal static string Statistics {
|
||||
get {
|
||||
return ResourceManager.GetString("Statistics", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test.
|
||||
/// </summary>
|
||||
internal static string Test {
|
||||
get {
|
||||
return ResourceManager.GetString("Test", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Testing.
|
||||
/// </summary>
|
||||
internal static string Testing {
|
||||
get {
|
||||
return ResourceManager.GetString("Testing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unlock.
|
||||
/// </summary>
|
||||
internal static string Unlock {
|
||||
get {
|
||||
return ResourceManager.GetString("Unlock", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There are unsaved changes. Do you want to save them now ?.
|
||||
/// </summary>
|
||||
internal static string Unsaved_changes_Do_you_want_to_save_them_nowQM {
|
||||
get {
|
||||
return ResourceManager.GetString("Unsaved_changes_Do_you_want_to_save_them_nowQM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
internal static string Warning {
|
||||
get {
|
||||
return ResourceManager.GetString("Warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Watermeter.
|
||||
/// </summary>
|
||||
internal static string Watermeter {
|
||||
get {
|
||||
return ResourceManager.GetString("Watermeter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow.
|
||||
/// </summary>
|
||||
internal static string Workflow {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow activation.
|
||||
/// </summary>
|
||||
internal static string Workflow_activation {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow_activation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow configurator.
|
||||
/// </summary>
|
||||
internal static string Workflow_configurator {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow_configurator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow from template {0}.
|
||||
/// </summary>
|
||||
internal static string Workflow_from_template_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow_from_template_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow with duplicate name already exists.
|
||||
/// </summary>
|
||||
internal static string Workflow_with_duplicate_name_exists {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow_with_duplicate_name_exists", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WorkflowConfigurator.
|
||||
/// </summary>
|
||||
internal static string WorkflowConfigurator {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowConfigurator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflows.
|
||||
/// </summary>
|
||||
internal static string Workflows {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflows", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow step.
|
||||
/// </summary>
|
||||
internal static string Workstep {
|
||||
get {
|
||||
return ResourceManager.GetString("Workstep", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
408
WorkflowConfigurator/Resources/Strings.resx
Normal file
408
WorkflowConfigurator/Resources/Strings.resx
Normal file
@ -0,0 +1,408 @@
|
||||
<?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>
|
||||
<data name="WorkflowConfigurator" xml:space="preserve">
|
||||
<value>WorkflowConfigurator</value>
|
||||
</data>
|
||||
<data name="Refresh" xml:space="preserve">
|
||||
<value>Refresh</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_change_settingsQM" xml:space="preserve">
|
||||
<value>Do you want to change settings?</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="Opening_database_failed" xml:space="preserve">
|
||||
<value>Opening database failed</value>
|
||||
</data>
|
||||
<data name="Statistics" xml:space="preserve">
|
||||
<value>Statistics</value>
|
||||
</data>
|
||||
<data name="Count" xml:space="preserve">
|
||||
<value>Count</value>
|
||||
</data>
|
||||
<data name="Workflow" xml:space="preserve">
|
||||
<value>Workflow</value>
|
||||
</data>
|
||||
<data name="Unlock" xml:space="preserve">
|
||||
<value>Unlock</value>
|
||||
</data>
|
||||
<data name="Flowtube" xml:space="preserve">
|
||||
<value>Flowtube</value>
|
||||
</data>
|
||||
<data name="CB_Flowtubes" xml:space="preserve">
|
||||
<value>Flowtubes</value>
|
||||
</data>
|
||||
<data name="Watermeter" xml:space="preserve">
|
||||
<value>Watermeter</value>
|
||||
</data>
|
||||
<data name="CB_Watermeters" xml:space="preserve">
|
||||
<value>Watermeters (WM)</value>
|
||||
</data>
|
||||
<data name="CB_Without_PCB" xml:space="preserve">
|
||||
<value>WM-s without PCB</value>
|
||||
</data>
|
||||
<data name="Save_changes" xml:space="preserve">
|
||||
<value>Save changes</value>
|
||||
</data>
|
||||
<data name="All_workflows" xml:space="preserve">
|
||||
<value>All workflows</value>
|
||||
</data>
|
||||
<data name="Workflow_activation" xml:space="preserve">
|
||||
<value>Workflow activation</value>
|
||||
</data>
|
||||
<data name="Counters" xml:space="preserve">
|
||||
<value>Counters</value>
|
||||
</data>
|
||||
<data name="Unsaved_changes_Do_you_want_to_save_them_nowQM" xml:space="preserve">
|
||||
<value>There are unsaved changes. Do you want to save them now ?</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
<data name="CB_WMs_from_Flowt" xml:space="preserve">
|
||||
<value>WM-s from Flowt.</value>
|
||||
</data>
|
||||
<data name="CB_WMs_from_ft_wo_PCB" xml:space="preserve">
|
||||
<value>WM-s from ft w/o PCB</value>
|
||||
</data>
|
||||
<data name="Workflows" xml:space="preserve">
|
||||
<value>Workflows</value>
|
||||
</data>
|
||||
<data name="Overview_of_workflows" xml:space="preserve">
|
||||
<value>Overview of workflows</value>
|
||||
</data>
|
||||
<data name="Chdr_Check" xml:space="preserve">
|
||||
<value>Chck.</value>
|
||||
</data>
|
||||
<data name="Chdr_Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="Chdr_Nr" xml:space="preserve">
|
||||
<value>Nr.</value>
|
||||
</data>
|
||||
<data name="Parts" xml:space="preserve">
|
||||
<value>Parts</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="Approved_by" xml:space="preserve">
|
||||
<value>Approved by</value>
|
||||
</data>
|
||||
<data name="Class" xml:space="preserve">
|
||||
<value>Class</value>
|
||||
</data>
|
||||
<data name="Created_by" xml:space="preserve">
|
||||
<value>Created by</value>
|
||||
</data>
|
||||
<data name="State" xml:space="preserve">
|
||||
<value>State</value>
|
||||
</data>
|
||||
<data name="Notes" xml:space="preserve">
|
||||
<value>Notes</value>
|
||||
</data>
|
||||
<data name="Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="Add" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="New_part" xml:space="preserve">
|
||||
<value>New part</value>
|
||||
</data>
|
||||
<data name="Part_properties" xml:space="preserve">
|
||||
<value>Part properties</value>
|
||||
</data>
|
||||
<data name="Name_contains" xml:space="preserve">
|
||||
<value>Name contains</value>
|
||||
</data>
|
||||
<data name="_none_" xml:space="preserve">
|
||||
<value><none></value>
|
||||
</data>
|
||||
<data name="No_release_notes" xml:space="preserve">
|
||||
<value>No release notes.</value>
|
||||
</data>
|
||||
<data name="Approve" xml:space="preserve">
|
||||
<value>Approve</value>
|
||||
</data>
|
||||
<data name="Release" xml:space="preserve">
|
||||
<value>Release</value>
|
||||
</data>
|
||||
<data name="Deactivate" xml:space="preserve">
|
||||
<value>Deactivate</value>
|
||||
</data>
|
||||
<data name="Activate" xml:space="preserve">
|
||||
<value>Activate</value>
|
||||
</data>
|
||||
<data name="Deactivated" xml:space="preserve">
|
||||
<value>Deactivated</value>
|
||||
</data>
|
||||
<data name="In_preparation" xml:space="preserve">
|
||||
<value>In preparation</value>
|
||||
</data>
|
||||
<data name="Confirm" xml:space="preserve">
|
||||
<value>Confirm</value>
|
||||
</data>
|
||||
<data name="Saving_changes_failed" xml:space="preserve">
|
||||
<value>Saving changes failed.</value>
|
||||
</data>
|
||||
<data name="Invalid_0" xml:space="preserve">
|
||||
<value>Invalid {0}</value>
|
||||
</data>
|
||||
<data name="Checked_part" xml:space="preserve">
|
||||
<value>Checked part</value>
|
||||
</data>
|
||||
<data name="Reference_part" xml:space="preserve">
|
||||
<value>Reference part</value>
|
||||
</data>
|
||||
<data name="Copy_workflow" xml:space="preserve">
|
||||
<value>Copy workflow</value>
|
||||
</data>
|
||||
<data name="New_workflow" xml:space="preserve">
|
||||
<value>New workflow</value>
|
||||
</data>
|
||||
<data name="Filter" xml:space="preserve">
|
||||
<value>Filter</value>
|
||||
</data>
|
||||
<data name="Invalid_data_01_Yes_Continue_editing_1_No_Revert_changes_and_finish" xml:space="preserve">
|
||||
<value>Invalid data: {0}{1}Yes: Continue editing{1}No: Revert changes and finish</value>
|
||||
</data>
|
||||
<data name="Invalid_data_0" xml:space="preserve">
|
||||
<value>Invalid data: {0}</value>
|
||||
</data>
|
||||
<data name="Failed_to_import_a_list_of_parts" xml:space="preserve">
|
||||
<value>Failed to import a list of parts</value>
|
||||
</data>
|
||||
<data name="Abandon_changes" xml:space="preserve">
|
||||
<value>Abandon changes and continue</value>
|
||||
</data>
|
||||
<data name="Back_to_editing" xml:space="preserve">
|
||||
<value>Back to editing</value>
|
||||
</data>
|
||||
<data name="Workstep" xml:space="preserve">
|
||||
<value>Workflow step</value>
|
||||
</data>
|
||||
<data name="Chdr_OraDBType" xml:space="preserve">
|
||||
<value>Oracle</value>
|
||||
</data>
|
||||
<data name="Chdr_OraDBDescr" xml:space="preserve">
|
||||
<value>Oracle descr.</value>
|
||||
</data>
|
||||
<data name="Remove" xml:space="preserve">
|
||||
<value>Remove</value>
|
||||
</data>
|
||||
<data name="Allow_repairs" xml:space="preserve">
|
||||
<value>Allow repairs on this workplace</value>
|
||||
</data>
|
||||
<data name="Check_part_no" xml:space="preserve">
|
||||
<value>Check part no.</value>
|
||||
</data>
|
||||
<data name="No_part_selected" xml:space="preserve">
|
||||
<value>No part selected</value>
|
||||
</data>
|
||||
<data name="Part_is_used_in_workstep_0" xml:space="preserve">
|
||||
<value>Part is used in workfow kstep {0}</value>
|
||||
</data>
|
||||
<data name="Production" xml:space="preserve">
|
||||
<value>Production</value>
|
||||
</data>
|
||||
<data name="Testing" xml:space="preserve">
|
||||
<value>Testing</value>
|
||||
</data>
|
||||
<data name="Modify" xml:space="preserve">
|
||||
<value>Modify</value>
|
||||
</data>
|
||||
<data name="Release_to_production" xml:space="preserve">
|
||||
<value>Release to production</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Test</value>
|
||||
</data>
|
||||
<data name="Chdr_HasSN" xml:space="preserve">
|
||||
<value>s/n</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_import_parts_from_a_list" xml:space="preserve">
|
||||
<value>Do you want to import parts from a list ?</value>
|
||||
</data>
|
||||
<data name="Import" xml:space="preserve">
|
||||
<value>Import</value>
|
||||
</data>
|
||||
<data name="Workflow_with_duplicate_name_exists" xml:space="preserve">
|
||||
<value>Workflow with duplicate name already exists</value>
|
||||
</data>
|
||||
<data name="Selected_part_is_already_used_in_this_workstep" xml:space="preserve">
|
||||
<value>Selected part is already used in this workstep.</value>
|
||||
</data>
|
||||
<data name="Selected_part_is_the_reference_part_in_this_workstep" xml:space="preserve">
|
||||
<value>Selected part is the reference part in this workstep.</value>
|
||||
</data>
|
||||
<data name="Show_records" xml:space="preserve">
|
||||
<value>Show records</value>
|
||||
</data>
|
||||
<data name="_0_records" xml:space="preserve">
|
||||
<value>{0} records</value>
|
||||
</data>
|
||||
<data name="Deleting_records" xml:space="preserve">
|
||||
<value>Deleting records</value>
|
||||
</data>
|
||||
<data name="Deleting_records_failed" xml:space="preserve">
|
||||
<value>Deleting records failed</value>
|
||||
</data>
|
||||
<data name="Records_created_while_testing_will_be_deleted" xml:space="preserve">
|
||||
<value>Records created while testing will be deleted.</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_delete_records_created_while_testing_QM" xml:space="preserve">
|
||||
<value>Do you want to delete records created while testing ?</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_use_templateQM" xml:space="preserve">
|
||||
<value>Do you want to use template ?</value>
|
||||
</data>
|
||||
<data name="copy" xml:space="preserve">
|
||||
<value>copy</value>
|
||||
</data>
|
||||
<data name="Workflow_from_template_0" xml:space="preserve">
|
||||
<value>Workflow from template {0}</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Default settings are used.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program is running for the 1st time on this PC.</value>
|
||||
</data>
|
||||
<data name="Activate_again" xml:space="preserve">
|
||||
<value>Activate again</value>
|
||||
</data>
|
||||
<data name="Released" xml:space="preserve">
|
||||
<value>Released</value>
|
||||
</data>
|
||||
<data name="Workflow_configurator" xml:space="preserve">
|
||||
<value>Workflow configurator</value>
|
||||
</data>
|
||||
<data name="Invalid_data" xml:space="preserve">
|
||||
<value>Invalid data</value>
|
||||
</data>
|
||||
</root>
|
||||
402
WorkflowConfigurator/Resources/Strings.sk.resx
Normal file
402
WorkflowConfigurator/Resources/Strings.sk.resx
Normal file
@ -0,0 +1,402 @@
|
||||
<?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>
|
||||
<data name="WorkflowConfigurator" xml:space="preserve">
|
||||
<value>WorkflowConfigurator</value>
|
||||
</data>
|
||||
<data name="Refresh" xml:space="preserve">
|
||||
<value>Obnoviť</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Nastavenia</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_change_settingsQM" xml:space="preserve">
|
||||
<value>Chcete zmeniť nastavenia?</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
<data name="Opening_database_failed" xml:space="preserve">
|
||||
<value>Nepodarilo sa otvoriť databázu</value>
|
||||
</data>
|
||||
<data name="Statistics" xml:space="preserve">
|
||||
<value>Štatistiky</value>
|
||||
</data>
|
||||
<data name="Count" xml:space="preserve">
|
||||
<value>Počet</value>
|
||||
</data>
|
||||
<data name="Workflow" xml:space="preserve">
|
||||
<value>Prac. postup</value>
|
||||
</data>
|
||||
<data name="Unlock" xml:space="preserve">
|
||||
<value>Odomkni</value>
|
||||
</data>
|
||||
<data name="Flowtube" xml:space="preserve">
|
||||
<value>Prietok. trubica</value>
|
||||
</data>
|
||||
<data name="CB_Flowtubes" xml:space="preserve">
|
||||
<value>Prietok. trubice</value>
|
||||
</data>
|
||||
<data name="Watermeter" xml:space="preserve">
|
||||
<value>Vodomer</value>
|
||||
</data>
|
||||
<data name="CB_Watermeters" xml:space="preserve">
|
||||
<value>Vodomery (Vm)</value>
|
||||
</data>
|
||||
<data name="CB_Without_PCB" xml:space="preserve">
|
||||
<value>Vm bez Pcb</value>
|
||||
</data>
|
||||
<data name="Save_changes" xml:space="preserve">
|
||||
<value>Uložiť zmeny</value>
|
||||
</data>
|
||||
<data name="Active_workflows" xml:space="preserve">
|
||||
<value>Aktívne postupy</value>
|
||||
</data>
|
||||
<data name="All_workflows" xml:space="preserve">
|
||||
<value>Všetky pracovné postupy</value>
|
||||
</data>
|
||||
<data name="Workflow_activation" xml:space="preserve">
|
||||
<value>Aktivácia pracovných postupov</value>
|
||||
</data>
|
||||
<data name="Counters" xml:space="preserve">
|
||||
<value>Počítadlá</value>
|
||||
</data>
|
||||
<data name="Unsaved_changes_Do_you_want_to_save_them_nowQM" xml:space="preserve">
|
||||
<value>Zmeny nie sú uložené. Chcete ich uložiť teraz?</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Upozornenie</value>
|
||||
</data>
|
||||
<data name="CB_WMs_from_Flowt" xml:space="preserve">
|
||||
<value>Vm z priet. tr.</value>
|
||||
</data>
|
||||
<data name="CB_WMs_from_ft_wo_PCB" xml:space="preserve">
|
||||
<value>Vm z pt bez Pcb</value>
|
||||
</data>
|
||||
<data name="Workflows" xml:space="preserve">
|
||||
<value>Pracovné postupy</value>
|
||||
</data>
|
||||
<data name="Inactive_workflows" xml:space="preserve">
|
||||
<value>Neaktívne postupy</value>
|
||||
</data>
|
||||
<data name="Overview_of_workflows" xml:space="preserve">
|
||||
<value>Prehľad pracovných postupov</value>
|
||||
</data>
|
||||
<data name="Chdr_Check" xml:space="preserve">
|
||||
<value>Kontr.</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Opis</value>
|
||||
</data>
|
||||
<data name="Chdr_Name" xml:space="preserve">
|
||||
<value>Meno</value>
|
||||
</data>
|
||||
<data name="Chdr_Nr" xml:space="preserve">
|
||||
<value>Č.</value>
|
||||
</data>
|
||||
<data name="Parts" xml:space="preserve">
|
||||
<value>Súčiastky</value>
|
||||
</data>
|
||||
<data name="Approved_by" xml:space="preserve">
|
||||
<value>Schválil</value>
|
||||
</data>
|
||||
<data name="Class" xml:space="preserve">
|
||||
<value>Skupina</value>
|
||||
</data>
|
||||
<data name="Created_by" xml:space="preserve">
|
||||
<value>Vytvoril</value>
|
||||
</data>
|
||||
<data name="State" xml:space="preserve">
|
||||
<value>Stav</value>
|
||||
</data>
|
||||
<data name="Notes" xml:space="preserve">
|
||||
<value>Poznámky</value>
|
||||
</data>
|
||||
<data name="Close" xml:space="preserve">
|
||||
<value>Zavrieť</value>
|
||||
</data>
|
||||
<data name="Add" xml:space="preserve">
|
||||
<value>Pridať</value>
|
||||
</data>
|
||||
<data name="New_part" xml:space="preserve">
|
||||
<value>Nová súčiastka</value>
|
||||
</data>
|
||||
<data name="Part_properties" xml:space="preserve">
|
||||
<value>Parametre súčiastky</value>
|
||||
</data>
|
||||
<data name="Name_contains" xml:space="preserve">
|
||||
<value>Meno obsahuje</value>
|
||||
</data>
|
||||
<data name="_none_" xml:space="preserve">
|
||||
<value><žiadna></value>
|
||||
</data>
|
||||
<data name="No_release_notes" xml:space="preserve">
|
||||
<value>Žiadne poznámky.</value>
|
||||
</data>
|
||||
<data name="Approve" xml:space="preserve">
|
||||
<value>Schváliť</value>
|
||||
</data>
|
||||
<data name="Release" xml:space="preserve">
|
||||
<value>Uvolniť</value>
|
||||
</data>
|
||||
<data name="Deactivate" xml:space="preserve">
|
||||
<value>Deaktivovať !</value>
|
||||
</data>
|
||||
<data name="Activate" xml:space="preserve">
|
||||
<value>Aktivuj</value>
|
||||
</data>
|
||||
<data name="Deactivated" xml:space="preserve">
|
||||
<value>Deaktivovaný</value>
|
||||
</data>
|
||||
<data name="In_preparation" xml:space="preserve">
|
||||
<value>Pripravuje sa</value>
|
||||
</data>
|
||||
<data name="Confirm" xml:space="preserve">
|
||||
<value>Potvrďte</value>
|
||||
</data>
|
||||
<data name="Saving_changes_failed" xml:space="preserve">
|
||||
<value>Nepodarilo sa uložiť zmeny.</value>
|
||||
</data>
|
||||
<data name="Invalid_0" xml:space="preserve">
|
||||
<value>{0} je nesprávna</value>
|
||||
</data>
|
||||
<data name="Checked_part" xml:space="preserve">
|
||||
<value>Kontrolovaná súčiastka</value>
|
||||
</data>
|
||||
<data name="Reference_part" xml:space="preserve">
|
||||
<value>Ref. súčiastka</value>
|
||||
</data>
|
||||
<data name="Copy_workflow" xml:space="preserve">
|
||||
<value>Kópia postupu</value>
|
||||
</data>
|
||||
<data name="New_workflow" xml:space="preserve">
|
||||
<value>Nový postup</value>
|
||||
</data>
|
||||
<data name="Filter" xml:space="preserve">
|
||||
<value>Filter</value>
|
||||
</data>
|
||||
<data name="Invalid_data_01_Yes_Continue_editing_1_No_Revert_changes_and_finish" xml:space="preserve">
|
||||
<value>Chybné údaje: {0}{1}Ano: Vrátiť sa a pokračovať v úpravách{1}Nie: Zrušiť zmeny</value>
|
||||
</data>
|
||||
<data name="Invalid_data_0" xml:space="preserve">
|
||||
<value>Chybné údaje: {0}</value>
|
||||
</data>
|
||||
<data name="Failed_to_import_a_list_of_parts" xml:space="preserve">
|
||||
<value>Nepodarilo sa naimportovať zoznam súčiaastok</value>
|
||||
</data>
|
||||
<data name="Abandon_changes" xml:space="preserve">
|
||||
<value>Zahodiť zmeny a pokračovať</value>
|
||||
</data>
|
||||
<data name="Back_to_editing" xml:space="preserve">
|
||||
<value>Vrátiť sa k editovaniu</value>
|
||||
</data>
|
||||
<data name="Workstep" xml:space="preserve">
|
||||
<value>Krok prac. postupu</value>
|
||||
</data>
|
||||
<data name="Remove" xml:space="preserve">
|
||||
<value>Odobrať</value>
|
||||
</data>
|
||||
<data name="Allow_repairs" xml:space="preserve">
|
||||
<value>Dovoliť opravy na tomto pracovisku</value>
|
||||
</data>
|
||||
<data name="Check_part_no" xml:space="preserve">
|
||||
<value>Kontrola súčiastky č.</value>
|
||||
</data>
|
||||
<data name="No_part_selected" xml:space="preserve">
|
||||
<value>Nie je vybraná súčiastka</value>
|
||||
</data>
|
||||
<data name="Part_is_used_in_workstep_0" xml:space="preserve">
|
||||
<value>Súčiaska je použitá v kroku {0}</value>
|
||||
</data>
|
||||
<data name="Production" xml:space="preserve">
|
||||
<value>Výroba</value>
|
||||
</data>
|
||||
<data name="Testing" xml:space="preserve">
|
||||
<value>Testuje sa</value>
|
||||
</data>
|
||||
<data name="Modify" xml:space="preserve">
|
||||
<value>Urobiť zmeny !</value>
|
||||
</data>
|
||||
<data name="Release_to_production" xml:space="preserve">
|
||||
<value>Uvoľniť do výroby !</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Testovať !</value>
|
||||
</data>
|
||||
<data name="Chdr_HasSN" xml:space="preserve">
|
||||
<value>s/n</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Uložiť</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_import_parts_from_a_list" xml:space="preserve">
|
||||
<value>Chcete naimportovať súčiastky zo zoznamu ?</value>
|
||||
</data>
|
||||
<data name="Import" xml:space="preserve">
|
||||
<value>Import</value>
|
||||
</data>
|
||||
<data name="Workflow_with_duplicate_name_exists" xml:space="preserve">
|
||||
<value>Postup s rovnakým menom už existuje</value>
|
||||
</data>
|
||||
<data name="Selected_part_is_already_used_in_this_workstep" xml:space="preserve">
|
||||
<value>Vybraný komponent je už použitý v tomto pracovnom postupe.</value>
|
||||
</data>
|
||||
<data name="Selected_part_is_the_reference_part_in_this_workstep" xml:space="preserve">
|
||||
<value>Vybraný komponent je už referenčným komponentom v tomto pracovnom postupe.</value>
|
||||
</data>
|
||||
<data name="Show_records" xml:space="preserve">
|
||||
<value>Ukázať záznamy</value>
|
||||
</data>
|
||||
<data name="_0_records" xml:space="preserve">
|
||||
<value>{0} záznamov</value>
|
||||
</data>
|
||||
<data name="Deleting_records" xml:space="preserve">
|
||||
<value>Mazanie záznamov</value>
|
||||
</data>
|
||||
<data name="Deleting_records_failed" xml:space="preserve">
|
||||
<value>Mazanie záznamov zlyhalo</value>
|
||||
</data>
|
||||
<data name="Records_created_while_testing_will_be_deleted" xml:space="preserve">
|
||||
<value>Záznamy vytvorené počas testovania budú vymazané.</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_delete_records_created_while_testing_QM" xml:space="preserve">
|
||||
<value>Chcete vymazať záznamy vytvorené počas testovania ?</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_use_templateQM" xml:space="preserve">
|
||||
<value>Chcete použiť template ?</value>
|
||||
</data>
|
||||
<data name="copy" xml:space="preserve">
|
||||
<value>kópia</value>
|
||||
</data>
|
||||
<data name="Workflow_from_template_0" xml:space="preserve">
|
||||
<value>Postup z templejtu {0}</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Použijú sa základné nastavenia.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Na tomto počítači nebol tento program ani raz spustený.</value>
|
||||
</data>
|
||||
<data name="Activate_again" xml:space="preserve">
|
||||
<value>Znova aktivovať</value>
|
||||
</data>
|
||||
<data name="Workflow_configurator" xml:space="preserve">
|
||||
<value>Konfigurátor pracovných postupov</value>
|
||||
</data>
|
||||
</root>
|
||||
22
WorkflowConfigurator/SampleConfig/log4netConfig.xml
Normal file
22
WorkflowConfigurator/SampleConfig/log4netConfig.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<log4net>
|
||||
<!-- Program log appenders -->
|
||||
<appender name="WorkflowConfigurator" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="..\Logs\MonitorLog.txt" />
|
||||
<appendToFile value="true" />
|
||||
<rollingMode value="Date" />
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger -->
|
||||
<root> <level value="WARN" /> </root>
|
||||
|
||||
<!-- Set program loggers -->
|
||||
<logger name="WorkflowConfigurator"> <appender-ref ref="WorkflowConfigurator" /> <level value="WARN" /> </logger>
|
||||
|
||||
<!-- Set program logging levels -->
|
||||
<logger name="WorkflowConfigurator.MainWnd"> <level value="INFO" /> </logger>
|
||||
<logger name="WorkflowConfigurator.Program"> <level value="INFO" /> </logger>
|
||||
</log4net>
|
||||
88
WorkflowConfigurator/UserControls/DraggableTabControl.cs
Normal file
88
WorkflowConfigurator/UserControls/DraggableTabControl.cs
Normal file
@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public class DraggableTabControl : TabControl
|
||||
{
|
||||
public bool TabOrderChanged = false;
|
||||
|
||||
private TabPage predraggedTab;
|
||||
|
||||
public DraggableTabControl()
|
||||
{
|
||||
this.AllowDrop = false;
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
predraggedTab = getPointedTab();
|
||||
base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
predraggedTab = null;
|
||||
base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && predraggedTab != null)
|
||||
this.DoDragDrop(predraggedTab, DragDropEffects.Move);
|
||||
|
||||
base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override void OnDragOver(DragEventArgs drgevent)
|
||||
{
|
||||
TabPage draggedTab = (TabPage)drgevent.Data.GetData(typeof(TabPage));
|
||||
TabPage pointedTab = getPointedTab();
|
||||
|
||||
if (draggedTab == predraggedTab && pointedTab != null)
|
||||
{
|
||||
drgevent.Effect = DragDropEffects.Move;
|
||||
|
||||
if (pointedTab != draggedTab)
|
||||
{
|
||||
swapTabPages(draggedTab, pointedTab);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDragOver(drgevent);
|
||||
}
|
||||
|
||||
private TabPage getPointedTab()
|
||||
{
|
||||
for (int i = 0; i < this.TabPages.Count; i++)
|
||||
{
|
||||
if (this.GetTabRect(i).Contains(this.PointToClient(Cursor.Position)))
|
||||
return this.TabPages[i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void swapTabPages(TabPage src, TabPage dst)
|
||||
{
|
||||
int srci = this.TabPages.IndexOf(src);
|
||||
int dsti = this.TabPages.IndexOf(dst);
|
||||
|
||||
this.TabPages[dsti] = src;
|
||||
this.TabPages[srci] = dst;
|
||||
|
||||
if (this.SelectedIndex == srci)
|
||||
{
|
||||
this.SelectedIndex = dsti;
|
||||
}
|
||||
else if (this.SelectedIndex == dsti)
|
||||
{
|
||||
this.SelectedIndex = srci;
|
||||
}
|
||||
|
||||
TabOrderChanged = true;
|
||||
this.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
360
WorkflowConfigurator/UserControls/EditProcessCtrl.Designer.cs
generated
Normal file
360
WorkflowConfigurator/UserControls/EditProcessCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,360 @@
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
partial class EditProcessCtrl
|
||||
{
|
||||
/// <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.splitContainerH1 = new System.Windows.Forms.SplitContainer();
|
||||
this.showRecordsButton = new System.Windows.Forms.Button();
|
||||
this.deactivatedButton = new System.Windows.Forms.Button();
|
||||
this.productionButton = new System.Windows.Forms.Button();
|
||||
this.testingButton = new System.Windows.Forms.Button();
|
||||
this.inPreparationButton = new System.Windows.Forms.Button();
|
||||
this.statePictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.unlockButton = new System.Windows.Forms.Button();
|
||||
this.notesButton = new System.Windows.Forms.Button();
|
||||
this.approvedOnTextBox = new System.Windows.Forms.TextBox();
|
||||
this.createdOnTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvedByTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvedByLabel = new System.Windows.Forms.Label();
|
||||
this.createdByTextBox = new System.Windows.Forms.TextBox();
|
||||
this.createdByLabel = new System.Windows.Forms.Label();
|
||||
this.processDescriptionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.processNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.processDescriptionLabel = new System.Windows.Forms.Label();
|
||||
this.processNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainerV2 = new System.Windows.Forms.SplitContainer();
|
||||
this.partsCtrl = new WorkflowConfigurator.UserControls.PartsCtrl();
|
||||
this.workstepsCtrl = new WorkflowConfigurator.UserControls.WorkstepsCtrl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerH1)).BeginInit();
|
||||
this.splitContainerH1.Panel1.SuspendLayout();
|
||||
this.splitContainerH1.Panel2.SuspendLayout();
|
||||
this.splitContainerH1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statePictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerV2)).BeginInit();
|
||||
this.splitContainerV2.Panel1.SuspendLayout();
|
||||
this.splitContainerV2.Panel2.SuspendLayout();
|
||||
this.splitContainerV2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainerH1
|
||||
//
|
||||
this.splitContainerH1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainerH1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainerH1.IsSplitterFixed = true;
|
||||
this.splitContainerH1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainerH1.Name = "splitContainerH1";
|
||||
this.splitContainerH1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainerH1.Panel1
|
||||
//
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.showRecordsButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.deactivatedButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.productionButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.testingButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.inPreparationButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.statePictureBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.saveButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.unlockButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.notesButton);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.approvedOnTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.createdOnTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.approvedByTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.approvedByLabel);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.createdByTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.createdByLabel);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.processDescriptionTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.processNameTextBox);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.processDescriptionLabel);
|
||||
this.splitContainerH1.Panel1.Controls.Add(this.processNameLabel);
|
||||
//
|
||||
// splitContainerH1.Panel2
|
||||
//
|
||||
this.splitContainerH1.Panel2.Controls.Add(this.splitContainerV2);
|
||||
this.splitContainerH1.Size = new System.Drawing.Size(850, 500);
|
||||
this.splitContainerH1.SplitterDistance = 175;
|
||||
this.splitContainerH1.TabIndex = 0;
|
||||
//
|
||||
// showRecordsButton
|
||||
//
|
||||
this.showRecordsButton.Location = new System.Drawing.Point(587, 150);
|
||||
this.showRecordsButton.Name = "showRecordsButton";
|
||||
this.showRecordsButton.Size = new System.Drawing.Size(114, 23);
|
||||
this.showRecordsButton.TabIndex = 27;
|
||||
this.showRecordsButton.Text = "Show records";
|
||||
this.showRecordsButton.UseVisualStyleBackColor = true;
|
||||
this.showRecordsButton.Visible = false;
|
||||
this.showRecordsButton.Click += new System.EventHandler(this.showRecordsButton_Click);
|
||||
//
|
||||
// deactivatedButton
|
||||
//
|
||||
this.deactivatedButton.Location = new System.Drawing.Point(587, 117);
|
||||
this.deactivatedButton.Name = "deactivatedButton";
|
||||
this.deactivatedButton.Size = new System.Drawing.Size(114, 23);
|
||||
this.deactivatedButton.TabIndex = 26;
|
||||
this.deactivatedButton.Text = "Deactivated";
|
||||
this.deactivatedButton.UseVisualStyleBackColor = true;
|
||||
this.deactivatedButton.Click += new System.EventHandler(this.deactivatedButton_Click);
|
||||
//
|
||||
// productionButton
|
||||
//
|
||||
this.productionButton.Location = new System.Drawing.Point(587, 84);
|
||||
this.productionButton.Name = "productionButton";
|
||||
this.productionButton.Size = new System.Drawing.Size(114, 23);
|
||||
this.productionButton.TabIndex = 25;
|
||||
this.productionButton.Text = "Production";
|
||||
this.productionButton.UseVisualStyleBackColor = true;
|
||||
this.productionButton.Click += new System.EventHandler(this.productionButton_Click);
|
||||
//
|
||||
// testingButton
|
||||
//
|
||||
this.testingButton.Location = new System.Drawing.Point(587, 51);
|
||||
this.testingButton.Name = "testingButton";
|
||||
this.testingButton.Size = new System.Drawing.Size(114, 23);
|
||||
this.testingButton.TabIndex = 24;
|
||||
this.testingButton.Text = "Testing";
|
||||
this.testingButton.UseVisualStyleBackColor = true;
|
||||
this.testingButton.Click += new System.EventHandler(this.testingButton_Click);
|
||||
//
|
||||
// inPreparationButton
|
||||
//
|
||||
this.inPreparationButton.Location = new System.Drawing.Point(587, 18);
|
||||
this.inPreparationButton.Name = "inPreparationButton";
|
||||
this.inPreparationButton.Size = new System.Drawing.Size(114, 23);
|
||||
this.inPreparationButton.TabIndex = 23;
|
||||
this.inPreparationButton.Text = "In preparation";
|
||||
this.inPreparationButton.UseVisualStyleBackColor = true;
|
||||
this.inPreparationButton.Click += new System.EventHandler(this.inPreparationButton_Click);
|
||||
//
|
||||
// statePictureBox
|
||||
//
|
||||
this.statePictureBox.Location = new System.Drawing.Point(552, 15);
|
||||
this.statePictureBox.Name = "statePictureBox";
|
||||
this.statePictureBox.Size = new System.Drawing.Size(29, 131);
|
||||
this.statePictureBox.TabIndex = 22;
|
||||
this.statePictureBox.TabStop = false;
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.saveButton.Location = new System.Drawing.Point(755, 44);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(75, 30);
|
||||
this.saveButton.TabIndex = 21;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.UseVisualStyleBackColor = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// 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(755, 8);
|
||||
this.unlockButton.Name = "unlockButton";
|
||||
this.unlockButton.Size = new System.Drawing.Size(75, 30);
|
||||
this.unlockButton.TabIndex = 15;
|
||||
this.unlockButton.Text = "Unlock";
|
||||
this.unlockButton.UseVisualStyleBackColor = true;
|
||||
this.unlockButton.Click += new System.EventHandler(this.unlockButton_Click);
|
||||
//
|
||||
// notesButton
|
||||
//
|
||||
this.notesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.notesButton.Location = new System.Drawing.Point(755, 78);
|
||||
this.notesButton.Name = "notesButton";
|
||||
this.notesButton.Size = new System.Drawing.Size(75, 30);
|
||||
this.notesButton.TabIndex = 14;
|
||||
this.notesButton.Text = "Notes";
|
||||
this.notesButton.UseVisualStyleBackColor = true;
|
||||
this.notesButton.Click += new System.EventHandler(this.notesButton_Click);
|
||||
//
|
||||
// approvedOnTextBox
|
||||
//
|
||||
this.approvedOnTextBox.Enabled = false;
|
||||
this.approvedOnTextBox.Location = new System.Drawing.Point(303, 137);
|
||||
this.approvedOnTextBox.Name = "approvedOnTextBox";
|
||||
this.approvedOnTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.approvedOnTextBox.TabIndex = 9;
|
||||
//
|
||||
// createdOnTextBox
|
||||
//
|
||||
this.createdOnTextBox.Enabled = false;
|
||||
this.createdOnTextBox.Location = new System.Drawing.Point(303, 113);
|
||||
this.createdOnTextBox.Name = "createdOnTextBox";
|
||||
this.createdOnTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.createdOnTextBox.TabIndex = 8;
|
||||
//
|
||||
// approvedByTextBox
|
||||
//
|
||||
this.approvedByTextBox.Enabled = false;
|
||||
this.approvedByTextBox.Location = new System.Drawing.Point(92, 137);
|
||||
this.approvedByTextBox.Name = "approvedByTextBox";
|
||||
this.approvedByTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.approvedByTextBox.TabIndex = 7;
|
||||
//
|
||||
// approvedByLabel
|
||||
//
|
||||
this.approvedByLabel.AutoSize = true;
|
||||
this.approvedByLabel.Location = new System.Drawing.Point(16, 140);
|
||||
this.approvedByLabel.Name = "approvedByLabel";
|
||||
this.approvedByLabel.Size = new System.Drawing.Size(70, 13);
|
||||
this.approvedByLabel.TabIndex = 6;
|
||||
this.approvedByLabel.Text = "Approved by:";
|
||||
//
|
||||
// createdByTextBox
|
||||
//
|
||||
this.createdByTextBox.Enabled = false;
|
||||
this.createdByTextBox.Location = new System.Drawing.Point(92, 113);
|
||||
this.createdByTextBox.Name = "createdByTextBox";
|
||||
this.createdByTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.createdByTextBox.TabIndex = 5;
|
||||
//
|
||||
// createdByLabel
|
||||
//
|
||||
this.createdByLabel.AutoSize = true;
|
||||
this.createdByLabel.Location = new System.Drawing.Point(15, 116);
|
||||
this.createdByLabel.Name = "createdByLabel";
|
||||
this.createdByLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.createdByLabel.TabIndex = 4;
|
||||
this.createdByLabel.Text = "Created by:";
|
||||
//
|
||||
// processDescriptionTextBox
|
||||
//
|
||||
this.processDescriptionTextBox.Location = new System.Drawing.Point(92, 37);
|
||||
this.processDescriptionTextBox.Multiline = true;
|
||||
this.processDescriptionTextBox.Name = "processDescriptionTextBox";
|
||||
this.processDescriptionTextBox.Size = new System.Drawing.Size(450, 70);
|
||||
this.processDescriptionTextBox.TabIndex = 3;
|
||||
this.processDescriptionTextBox.TextChanged += new System.EventHandler(this.processDescriptionTextBox_TextChanged);
|
||||
//
|
||||
// processNameTextBox
|
||||
//
|
||||
this.processNameTextBox.Location = new System.Drawing.Point(92, 12);
|
||||
this.processNameTextBox.Name = "processNameTextBox";
|
||||
this.processNameTextBox.Size = new System.Drawing.Size(450, 20);
|
||||
this.processNameTextBox.TabIndex = 2;
|
||||
this.processNameTextBox.TextChanged += new System.EventHandler(this.processNameTextBox_TextChanged);
|
||||
//
|
||||
// processDescriptionLabel
|
||||
//
|
||||
this.processDescriptionLabel.AutoSize = true;
|
||||
this.processDescriptionLabel.Location = new System.Drawing.Point(15, 40);
|
||||
this.processDescriptionLabel.Name = "processDescriptionLabel";
|
||||
this.processDescriptionLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.processDescriptionLabel.TabIndex = 1;
|
||||
this.processDescriptionLabel.Text = "Description:";
|
||||
//
|
||||
// processNameLabel
|
||||
//
|
||||
this.processNameLabel.AutoSize = true;
|
||||
this.processNameLabel.Location = new System.Drawing.Point(15, 15);
|
||||
this.processNameLabel.Name = "processNameLabel";
|
||||
this.processNameLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.processNameLabel.TabIndex = 0;
|
||||
this.processNameLabel.Text = "Process:";
|
||||
//
|
||||
// splitContainerV2
|
||||
//
|
||||
this.splitContainerV2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainerV2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainerV2.Name = "splitContainerV2";
|
||||
//
|
||||
// splitContainerV2.Panel1
|
||||
//
|
||||
this.splitContainerV2.Panel1.Controls.Add(this.partsCtrl);
|
||||
//
|
||||
// splitContainerV2.Panel2
|
||||
//
|
||||
this.splitContainerV2.Panel2.Controls.Add(this.workstepsCtrl);
|
||||
this.splitContainerV2.Size = new System.Drawing.Size(850, 321);
|
||||
this.splitContainerV2.SplitterDistance = 424;
|
||||
this.splitContainerV2.TabIndex = 1;
|
||||
//
|
||||
// partsCtrl
|
||||
//
|
||||
this.partsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.partsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.partsCtrl.Name = "partsCtrl";
|
||||
this.partsCtrl.Size = new System.Drawing.Size(424, 321);
|
||||
this.partsCtrl.TabIndex = 0;
|
||||
//
|
||||
// workstepsCtrl
|
||||
//
|
||||
this.workstepsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.workstepsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.workstepsCtrl.Name = "workstepsCtrl";
|
||||
this.workstepsCtrl.Size = new System.Drawing.Size(422, 321);
|
||||
this.workstepsCtrl.TabIndex = 0;
|
||||
//
|
||||
// EditProcessCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainerH1);
|
||||
this.Name = "EditProcessCtrl";
|
||||
this.Size = new System.Drawing.Size(850, 500);
|
||||
this.splitContainerH1.Panel1.ResumeLayout(false);
|
||||
this.splitContainerH1.Panel1.PerformLayout();
|
||||
this.splitContainerH1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerH1)).EndInit();
|
||||
this.splitContainerH1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.statePictureBox)).EndInit();
|
||||
this.splitContainerV2.Panel1.ResumeLayout(false);
|
||||
this.splitContainerV2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerV2)).EndInit();
|
||||
this.splitContainerV2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainerH1;
|
||||
private System.Windows.Forms.TextBox processDescriptionTextBox;
|
||||
private System.Windows.Forms.TextBox processNameTextBox;
|
||||
private System.Windows.Forms.Label processDescriptionLabel;
|
||||
private System.Windows.Forms.Label processNameLabel;
|
||||
private System.Windows.Forms.TextBox approvedOnTextBox;
|
||||
private System.Windows.Forms.TextBox createdOnTextBox;
|
||||
private System.Windows.Forms.TextBox approvedByTextBox;
|
||||
private System.Windows.Forms.Label approvedByLabel;
|
||||
private System.Windows.Forms.TextBox createdByTextBox;
|
||||
private System.Windows.Forms.Label createdByLabel;
|
||||
private System.Windows.Forms.Button notesButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainerV2;
|
||||
private System.Windows.Forms.Button unlockButton;
|
||||
private System.Windows.Forms.Button saveButton;
|
||||
private WorkstepsCtrl workstepsCtrl;
|
||||
private PartsCtrl partsCtrl;
|
||||
private System.Windows.Forms.Button deactivatedButton;
|
||||
private System.Windows.Forms.Button productionButton;
|
||||
private System.Windows.Forms.Button testingButton;
|
||||
private System.Windows.Forms.Button inPreparationButton;
|
||||
private System.Windows.Forms.PictureBox statePictureBox;
|
||||
private System.Windows.Forms.Button showRecordsButton;
|
||||
}
|
||||
}
|
||||
789
WorkflowConfigurator/UserControls/EditProcessCtrl.cs
Normal file
789
WorkflowConfigurator/UserControls/EditProcessCtrl.cs
Normal file
@ -0,0 +1,789 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using Common.Forms;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using SharedDatabase.Forms;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public partial class EditProcessCtrl : UserControl, IMyUI
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EditProcessCtrl));
|
||||
|
||||
/// <summary>
|
||||
/// Group membership to unlock this screen
|
||||
/// </summary>
|
||||
public static GID[] UnlockAccessLevel = new GID[] { GID.TraceabilityManagement };
|
||||
public static GID[] ChangeReleaseState = new GID[] { GID.TraceabilityManagement };
|
||||
|
||||
public OverviewOfProcessesCtrl OverviewCtrl; /// Parent control reference
|
||||
|
||||
///
|
||||
/// The following section contains 'state'
|
||||
///
|
||||
public Process Process; /// Process.ReleaseStatus
|
||||
bool suppressNotifications;
|
||||
bool limitedUnlock;
|
||||
bool completeUnlock;
|
||||
bool unsavedChanges;
|
||||
|
||||
IList<Process> allProcesses; /// Auxiliary, list of all processes used in checks, updated in UpdateProcess()
|
||||
|
||||
public IEnumerable<Part> SelectedParts { get { return partsCtrl.SelectedParts; } }
|
||||
|
||||
public IList<Part> PartsToBeDeleted;
|
||||
public IList<Workstep> WorkstepsToBeDeleted;
|
||||
|
||||
|
||||
public EditProcessCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
unsavedChanges = false;
|
||||
suppressNotifications = false;
|
||||
saveButton.Enabled = false;
|
||||
PartsToBeDeleted = new List<Part>();
|
||||
WorkstepsToBeDeleted = new List<Workstep>();
|
||||
|
||||
partsCtrl.EditProcessCtrl = this;
|
||||
workstepsCtrl.EditProcessCtrl = this;
|
||||
|
||||
Localize();
|
||||
|
||||
UpdateLockState(false, false); /// Locked
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
/// Labels
|
||||
string colon = ":";
|
||||
processNameLabel.Text = Strings.Workflow + colon;
|
||||
processDescriptionLabel.Text = Strings.Description + colon;
|
||||
createdByLabel.Text = Strings.Created_by + colon;
|
||||
approvedByLabel.Text = Strings.Approved_by + colon;
|
||||
|
||||
inPreparationButton.Text = Strings.In_preparation;
|
||||
testingButton.Text = Strings.Testing;
|
||||
productionButton.Text = Strings.Production;
|
||||
deactivatedButton.Text = Strings.Deactivated;
|
||||
showRecordsButton.Text = Strings.Show_records;
|
||||
|
||||
/// Buttons
|
||||
saveButton.Text = Strings.Save;
|
||||
unlockButton.Text = Strings.Unlock;
|
||||
notesButton.Text = Strings.Notes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called from Overview...
|
||||
/// </summary>
|
||||
public void UpdateProcess(Process process, Reason reason, IList<Process> allProcesses)
|
||||
{
|
||||
if (allProcesses != null) this.allProcesses = allProcesses;
|
||||
|
||||
/// Update content
|
||||
this.Process = process;
|
||||
partsCtrl.UpdateProcess(process, reason, allProcesses);
|
||||
workstepsCtrl.UpdateProcess(process, reason, allProcesses);
|
||||
Data2UI();
|
||||
|
||||
/// Update UI state
|
||||
StateChange(reason);
|
||||
|
||||
/// Reset 'unsavedChanges', a new or copied process always contains unsaved changes
|
||||
unsavedChanges = (reason == Reason.NewProcess) || (reason == Reason.CopyProcess) || ((process != null) && (process.Id == 0));
|
||||
saveButton.Enabled = unsavedChanges;
|
||||
|
||||
PartsToBeDeleted.Clear();
|
||||
WorkstepsToBeDeleted.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called from Overview...
|
||||
/// Finish editing the current process.
|
||||
/// </summary>
|
||||
/// <returns>true : proces was modified, false : process was not modified</returns>
|
||||
public EditFinishedInfo FinishEditing()
|
||||
{
|
||||
string message;
|
||||
|
||||
if (!unsavedChanges)
|
||||
{
|
||||
/// No changes done => just return
|
||||
return EditFinishedInfo.NoChanges;
|
||||
}
|
||||
else if (!VerifyUIData(out message))
|
||||
{
|
||||
/// Data in UI are not correct => Yes/No message box
|
||||
|
||||
if (new Forms.EditOrAbandonMsgBox(string.Format(Strings.Invalid_data_0, string.Empty), message).ShowDialog() == DialogResult.Retry)
|
||||
|
||||
{
|
||||
/// Yes = continue editing, cancel callers action
|
||||
return EditFinishedInfo.Cancel;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// No = abandon changes, continue callers action
|
||||
return EditFinishedInfo.NoChanges;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Data in UI are correct => ask whether to save them
|
||||
|
||||
if (MessageBox.Show(Strings.Unsaved_changes_Do_you_want_to_save_them_nowQM,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
/// Yes = save changes
|
||||
return SaveChanges() ? EditFinishedInfo.DataChanged : EditFinishedInfo.NoChanges;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// No = abandon changes (just return)
|
||||
return EditFinishedInfo.NoChanges;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve data from UI and save them to database
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
bool SaveChanges()
|
||||
{
|
||||
/// Retrieve data from UI
|
||||
UI2Data();
|
||||
partsCtrl.UI2Data();
|
||||
workstepsCtrl.UI2Data();
|
||||
|
||||
if (SaveDataToDB(SharedDatabase.TracingDB.Session))
|
||||
{
|
||||
/// Saving data was successful
|
||||
SharedDatabase.TracingDB.Session.Refresh(Process);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Saving data failed
|
||||
MessageBox.Show(Strings.Saving_changes_failed);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
suppressNotifications = true;
|
||||
|
||||
if (Process != null)
|
||||
{
|
||||
processNameTextBox.Text = Process.Name;
|
||||
processDescriptionTextBox.Text = Process.Description;
|
||||
}
|
||||
else
|
||||
{
|
||||
processNameTextBox.Text = string.Empty;
|
||||
processDescriptionTextBox.Text = string.Empty;
|
||||
}
|
||||
|
||||
CreatedByOn2UI(Process);
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
partsCtrl.Data2UI();
|
||||
workstepsCtrl.Data2UI();
|
||||
|
||||
suppressNotifications = false;
|
||||
}
|
||||
|
||||
void CreatedByOn2UI(Process process)
|
||||
{
|
||||
createdByTextBox.Text = (process == null) ? string.Empty : process.CreatedBy;
|
||||
createdOnTextBox.Text = (process == null) ? string.Empty : process.TimeStamp.ToString("dd.MM.yyyy HH:mm");
|
||||
approvedByTextBox.Text = (process == null) ? string.Empty : process.ApprovedBy;
|
||||
approvedOnTextBox.Text = (process == null) ? string.Empty : process.TimeStamp2.ToString("dd.MM.yyyy HH:mm");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when (modified) UI data are OK
|
||||
/// </summary>
|
||||
/// <returns>true when UI data are valid</returns>
|
||||
public bool VerifyUIData(out string message)
|
||||
{
|
||||
bool uiDataValid = true;
|
||||
message = string.Empty;
|
||||
|
||||
if (Process == null) return uiDataValid;
|
||||
|
||||
if (allProcesses != null)
|
||||
{
|
||||
foreach (var p in allProcesses)
|
||||
{
|
||||
if ((processNameTextBox.Text == p.Name) && (Process.Id != p.Id))
|
||||
{
|
||||
uiDataValid = false;
|
||||
message += string.Format(Strings.Workflow_with_duplicate_name_exists) + Environment.NewLine;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string msg;
|
||||
if (!partsCtrl.VerifyUIData(out msg)) { uiDataValid = false; message += msg; } /// Parts
|
||||
if (!workstepsCtrl.VerifyUIData(out msg)) { uiDataValid = false; message += msg; } /// Worksteps
|
||||
|
||||
return uiDataValid;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
if (this.Process != null)
|
||||
{
|
||||
Process.Name = processNameTextBox.Text;
|
||||
Process.Description = processDescriptionTextBox.Text;
|
||||
|
||||
//createdByTextBox.Text = this.Process.CreatedBy;
|
||||
//createdOnTextBox.Text = this.Process.TimeStamp.ToShortDateString();
|
||||
//approvedByTextBox.Text = this.Process.ApprovedBy;
|
||||
//approvedOnTextBox.Text = this.Process.TimeStamp2.ToShortDateString();
|
||||
//stateLabel.Text = this.Process.ReleaseStatus.ToString();
|
||||
}
|
||||
|
||||
partsCtrl.UI2Data();
|
||||
workstepsCtrl.UI2Data();
|
||||
}
|
||||
|
||||
public void Settings2UI()
|
||||
{
|
||||
var ls = Program.LocalSettings;
|
||||
splitContainerV2.SplitterDistance = Math.Max(splitContainerV2.Panel1MinSize,
|
||||
Math.Min(splitContainerV2.Width - splitContainerV2.Panel2MinSize,
|
||||
(ls.SplDst2 > 0) ? Convert.ToInt32(ls.SplDst2 * Width) : 50));
|
||||
partsCtrl.Settings2UI();
|
||||
workstepsCtrl.Settings2UI();
|
||||
}
|
||||
|
||||
public void UI2Settings()
|
||||
{
|
||||
Program.LocalSettings.SplDst2 = (float)splitContainerV2.SplitterDistance / (float)Width;
|
||||
partsCtrl.UI2Settings();
|
||||
workstepsCtrl.UI2Settings();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set 'unsavedChanges' and enable 'Save' button
|
||||
/// </summary>
|
||||
public void SetUnsavedFlag()
|
||||
{
|
||||
unsavedChanges = true;
|
||||
saveButton.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset 'unsavedChanges' and disable 'Save' button
|
||||
/// </summary>
|
||||
public void ResetUnsavedFlag()
|
||||
{
|
||||
unsavedChanges = false;
|
||||
partsCtrl.ResetUnsavedFlag();
|
||||
workstepsCtrl.ResetUnsavedFlag();
|
||||
saveButton.Enabled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable/hide UI elements based on lock/unlock/complete unlock state
|
||||
/// </summary>
|
||||
/// <param name="limitedUnlock">true = unlock for released processes</param>
|
||||
/// <param name="completeUnlock">true = unlock for processes in preparation (complete unlock)</param>
|
||||
public void UpdateLockState(bool limitedUnlock, bool completeUnlock)
|
||||
{
|
||||
this.limitedUnlock = limitedUnlock;
|
||||
this.completeUnlock = completeUnlock;
|
||||
partsCtrl.UpdateLockState(limitedUnlock, completeUnlock); /// Parts
|
||||
workstepsCtrl.UpdateLockState(limitedUnlock, completeUnlock); /// Worksteps
|
||||
|
||||
unlockButton.Enabled = !(completeUnlock || limitedUnlock);
|
||||
processNameTextBox.Enabled = (limitedUnlock || completeUnlock);
|
||||
processDescriptionTextBox.Enabled = (limitedUnlock || completeUnlock);
|
||||
createdByTextBox.Enabled = false;
|
||||
createdOnTextBox.Enabled = false;
|
||||
approvedByTextBox.Enabled = false;
|
||||
approvedOnTextBox.Enabled = false;
|
||||
}
|
||||
|
||||
void UpdateProcessStateButtonsAndPicture(Process process)
|
||||
{
|
||||
inPreparationButton.Text = Strings.In_preparation;
|
||||
testingButton.Text = Strings.Testing;
|
||||
productionButton.Text = Strings.Production;
|
||||
deactivatedButton.Text = Strings.Deactivated;
|
||||
showRecordsButton.Visible = false;
|
||||
|
||||
if (process == null)
|
||||
{
|
||||
inPreparationButton.Enabled = false;
|
||||
testingButton.Enabled = false;
|
||||
productionButton.Enabled = false;
|
||||
deactivatedButton.Enabled = false;
|
||||
statePictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\{1}.bmp", Program.ExeDirectory, "0"), true);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (process.ReleaseStatus)
|
||||
{
|
||||
default:
|
||||
case ReleaseStatus.In_preparation:
|
||||
inPreparationButton.Enabled = false;
|
||||
testingButton.Enabled = (limitedUnlock || completeUnlock);
|
||||
testingButton.Text = Strings.Test;
|
||||
productionButton.Enabled = false;
|
||||
deactivatedButton.Enabled = false;
|
||||
statePictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\{1}.bmp", Program.ExeDirectory, "1"), true);
|
||||
break;
|
||||
|
||||
case ReleaseStatus.ToBeApproved:
|
||||
inPreparationButton.Enabled = (limitedUnlock || completeUnlock);
|
||||
inPreparationButton.Text = Strings.Modify;
|
||||
testingButton.Enabled = false;
|
||||
productionButton.Enabled = (limitedUnlock || completeUnlock);
|
||||
productionButton.Text = Strings.Release_to_production;
|
||||
deactivatedButton.Enabled = false;
|
||||
statePictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\{1}.bmp", Program.ExeDirectory, "2"), true);
|
||||
showRecordsButton.Visible = true;
|
||||
break;
|
||||
|
||||
case ReleaseStatus.ReleasedActive:
|
||||
case ReleaseStatus.Released:
|
||||
inPreparationButton.Enabled = false;
|
||||
testingButton.Enabled = false;
|
||||
productionButton.Enabled = false;
|
||||
deactivatedButton.Enabled = (limitedUnlock || completeUnlock);
|
||||
deactivatedButton.Text = Strings.Deactivate;
|
||||
statePictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\{1}.bmp", Program.ExeDirectory, "3"), true);
|
||||
showRecordsButton.Visible = true;
|
||||
break;
|
||||
|
||||
case ReleaseStatus.Deactivated:
|
||||
inPreparationButton.Enabled = false;
|
||||
testingButton.Enabled = false;
|
||||
productionButton.Enabled = (limitedUnlock || completeUnlock);
|
||||
deactivatedButton.Enabled = true;
|
||||
deactivatedButton.Text = Strings.Activate_again;
|
||||
statePictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\{1}.bmp", Program.ExeDirectory, "4"), true);
|
||||
showRecordsButton.Visible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a part to the currently selected workstep.
|
||||
/// Display amesssage box when addin a part fails.
|
||||
/// </summary>
|
||||
/// <param name="part">Part to be added</param>
|
||||
/// <returns>true when a part was successfully added</returns>
|
||||
public bool AddPartsToCurrentWorkstep(Part part)
|
||||
{
|
||||
return workstepsCtrl.AddPartsToCurrentWorkstep(part);
|
||||
}
|
||||
|
||||
public Part RemovePartFromCurrentWorkstep()
|
||||
{
|
||||
return workstepsCtrl.RemovePartFromCurrentWorkstep();
|
||||
}
|
||||
|
||||
private void notesButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
//sb.AppendLine(string.Format("AnyChange = {0}", workstepsTabControl.TabOrderChanged));
|
||||
//foreach (TabPage tp in workstepsTabControl.TabPages)
|
||||
//{
|
||||
// sb.AppendLine(tp.Text);
|
||||
//}
|
||||
//MessageBox.Show(sb.ToString());
|
||||
|
||||
//if ((Process == null) || string.IsNullOrEmpty(Process.ReleaseNotes))
|
||||
//{
|
||||
// MessageBox.Show(Strings.No_release_notes);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show(Process.ReleaseNotes);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save a process to the DB
|
||||
/// </summary>
|
||||
/// <param name="session">DB session</param>
|
||||
/// <returns>true when successful</returns>
|
||||
public bool SaveDataToDB(ISession session)
|
||||
{
|
||||
if (Process == null) return true;
|
||||
|
||||
string message;
|
||||
if (!VerifyUIData(out message))
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Invalid_data_0, message),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
|
||||
UI2Data();
|
||||
partsCtrl.UI2Data();
|
||||
workstepsCtrl.UI2Data();
|
||||
|
||||
ITransaction transaction = session.BeginTransaction();
|
||||
try
|
||||
{
|
||||
session.SaveOrUpdate(Process);
|
||||
|
||||
foreach (var part in PartsToBeDeleted) session.Delete(part);
|
||||
foreach (var ws in WorkstepsToBeDeleted)
|
||||
{
|
||||
ws.Workflow = null;
|
||||
ws.ReferencePart = null;
|
||||
ws.Parts.Clear();
|
||||
session.Delete(ws);
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
|
||||
PartsToBeDeleted.Clear();
|
||||
WorkstepsToBeDeleted.Clear();
|
||||
|
||||
ResetUnsavedFlag();
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
log.ErrorFormat("Saving process '{0}' to DB failed: {1}", Process.Name, exc.Message);
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Saving_changes_failed, Environment.NewLine, exc.Message),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void processNameTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
unsavedChanges = true;
|
||||
saveButton.Enabled = true;
|
||||
}
|
||||
|
||||
private void processDescriptionTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
unsavedChanges = true;
|
||||
saveButton.Enabled = true;
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SaveDataToDB(SharedDatabase.TracingDB.Session))
|
||||
{
|
||||
ResetUnsavedFlag();
|
||||
if (OverviewCtrl != null) OverviewCtrl.RedrawLeftPane(RedrawType.FromScratch, Process);
|
||||
}
|
||||
}
|
||||
|
||||
private void unlockButton_Click(object sender, EventArgs e) { StateChange(Reason.UnlockBtn); }
|
||||
private void inPreparationButton_Click(object sender, EventArgs e) { StateChange(Reason.PrepareBtn); }
|
||||
private void testingButton_Click(object sender, EventArgs e) { StateChange(Reason.TestBtn); }
|
||||
private void productionButton_Click(object sender, EventArgs e) { StateChange(Reason.ReleaseBtn); }
|
||||
private void deactivatedButton_Click(object sender, EventArgs e) { StateChange(Reason.DeactivateBtn); }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change 'ReleaseStatus' of the procedure and update UI / enable/disable UI controls accordingly
|
||||
/// when changing the state of the procedure, unlocking UI or opening/creating/copying a procedure.
|
||||
/// </summary>
|
||||
/// <param name="reason">Reason of the state change</param>
|
||||
void StateChange(Reason reason)
|
||||
{
|
||||
if (Process == null) return; /// No process
|
||||
|
||||
bool unlocked = (limitedUnlock || completeUnlock);
|
||||
|
||||
if (reason == Reason.OpenProcess)
|
||||
{
|
||||
/// Existing process was opened --> locked
|
||||
UpdateLockState(false, false);
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
return;
|
||||
}
|
||||
else if (reason == Reason.NewProcess)
|
||||
{
|
||||
/// A new process was created --> completely unlocked, optionally import a parts list
|
||||
UpdateLockState(true, true);
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
SetUnsavedFlag();
|
||||
if (MessageBox.Show(Strings.Do_you_want_to_import_parts_from_a_list, Strings.Import, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
ImportParts();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (reason == Reason.CopyProcess)
|
||||
{
|
||||
/// A new process was created as a copy of an existing process --> completely unlocked
|
||||
UpdateLockState(true, true);
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
else if (reason == Reason.UnlockBtn)
|
||||
{
|
||||
/// Unlock button pressed
|
||||
if (unlocked) return; /// Already unlocked
|
||||
|
||||
if (GlobalData.CurrentUser.IsMemberOf(UnlockAccessLevel) || new SharedDatabase.Forms.LoginDlg(UnlockAccessLevel).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
MainWnd.PrintTitle(false);
|
||||
UpdateLockState(true, (Process.ReleaseStatus == ReleaseStatus.In_preparation));
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return; /// Access not granted --> locked
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Change the state of the current process
|
||||
///
|
||||
FinishEditing();
|
||||
///
|
||||
ReleaseStatus oriState = Process.ReleaseStatus;
|
||||
///
|
||||
switch (reason)
|
||||
{
|
||||
case Reason.PrepareBtn:
|
||||
if (!GetAccessToStateChange(false)) return; /// Login if unsufficient access right
|
||||
if (!DeleteTestRecords(true)) return; /// Always delete records created while testing
|
||||
UpdateLockState(unlocked, unlocked);
|
||||
Process.ReleaseStatus = ReleaseStatus.In_preparation;
|
||||
break;
|
||||
|
||||
case Reason.TestBtn:
|
||||
if (!GetAccessToStateChange(false)) return;
|
||||
UpdateLockState(unlocked, false);
|
||||
Process.ReleaseStatus = ReleaseStatus.ToBeApproved;
|
||||
break;
|
||||
|
||||
case Reason.ReleaseBtn:
|
||||
if (!GetAccessToStateChange(true)) return; /// Obligatory login when releasing a process to production
|
||||
if (!DeleteTestRecords(false)) return; /// Optionally delete records created while testing
|
||||
UpdateLockState(false, false);
|
||||
Process.ReleaseStatus = ReleaseStatus.Released;
|
||||
Process.ApprovedBy = GlobalData.GetCurrentUserName();
|
||||
Process.TimeStamp2 = DateTime.Now;
|
||||
break;
|
||||
|
||||
case Reason.DeactivateBtn:
|
||||
if (!GetAccessToStateChange(false)) return;
|
||||
UpdateLockState(false, false);
|
||||
if (Process.ReleaseStatus == ReleaseStatus.ReleasedActive ||
|
||||
Process.ReleaseStatus == ReleaseStatus.Released)
|
||||
{
|
||||
Process.ReleaseStatus = ReleaseStatus.Deactivated;
|
||||
}
|
||||
else
|
||||
{
|
||||
Process.ReleaseStatus = ReleaseStatus.Released;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return; /// Otherwise do nothing
|
||||
}
|
||||
|
||||
///
|
||||
/// Save the process after changing the state, revert state to original if saving fails
|
||||
///
|
||||
if (SaveDataToDB(SharedDatabase.TracingDB.Session))
|
||||
{
|
||||
/// Saving successful
|
||||
UpdateProcessStateButtonsAndPicture(Process);
|
||||
CreatedByOn2UI(Process);
|
||||
ResetUnsavedFlag();
|
||||
if (OverviewCtrl != null) OverviewCtrl.RedrawLeftPane(RedrawType.FromScratch, Process);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Saving failed
|
||||
Process.ReleaseStatus = oriState;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete records created while testing when swithing either to 'InPreparation' or 'Released' state.
|
||||
/// </summary>
|
||||
/// <param name="deleteObligatory">true = bypassing deletion is not possible</param>
|
||||
/// <returns>true when successful, false when failed or aborted by user</returns>
|
||||
bool DeleteTestRecords(bool deleteObligatory)
|
||||
{
|
||||
if (SharedDatabase.TracingDB.Session == null)
|
||||
{
|
||||
MessageBox.Show(Strings.Deleting_records_failed, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
|
||||
DialogResult dr = deleteObligatory
|
||||
? MessageBox.Show(Strings.Records_created_while_testing_will_be_deleted, Strings.Warning, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation)
|
||||
: MessageBox.Show(Strings.Do_you_want_to_delete_records_created_while_testing_QM, Strings.Warning, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
|
||||
if (dr == DialogResult.No)
|
||||
{
|
||||
return true; /// User decided not to delete records => OK, continue
|
||||
}
|
||||
else if (dr == DialogResult.OK || dr == DialogResult.Yes)
|
||||
{
|
||||
new Thread(() => Application.Run(new ModelessForm(Strings.Deleting_records))).Start();
|
||||
|
||||
ITransaction transaction = SharedDatabase.TracingDB.Session.BeginTransaction();
|
||||
try
|
||||
{
|
||||
IList<ReferenceRecord> refRecords = SharedDatabase.TracingDB.Session.QueryOver<ReferenceRecord>()
|
||||
.Where(x => (x.Workflow == Process))
|
||||
.List();
|
||||
foreach (var rr in refRecords) SharedDatabase.TracingDB.Session.Delete(rr);
|
||||
transaction.Commit();
|
||||
ModelessForm.CloseForm();
|
||||
|
||||
return true; /// Records successfully deleted
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
transaction.Rollback();
|
||||
ModelessForm.CloseForm();
|
||||
MessageBox.Show(Strings.Deleting_records_failed, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return false; /// Deleting records failed
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false; /// Obligatory deletion was cancelled
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ImportParts()
|
||||
{
|
||||
partsCtrl.ImportParts();
|
||||
}
|
||||
|
||||
public void ImportPartsUsingTemplate()
|
||||
{
|
||||
IList<string[]> patterns = new List<string[]>();
|
||||
foreach (var pt in Process.Parts)
|
||||
{
|
||||
if (pt.Name == "0")
|
||||
{
|
||||
patterns.Add(pt.Description.Split(new char[]{'|'}));
|
||||
}
|
||||
else
|
||||
{
|
||||
patterns.Add(new string[] { string.Empty });
|
||||
}
|
||||
}
|
||||
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextReader reader = new StreamReader(dlg.FileName))
|
||||
{
|
||||
bool lineOK;
|
||||
bool lineAssigned;
|
||||
do
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
lineOK = false;
|
||||
lineAssigned = false;
|
||||
if (line != null)
|
||||
{
|
||||
string[] items = line.Split(new char[] { ';' });
|
||||
if (items.Length >= 2)
|
||||
{
|
||||
lineOK = true;
|
||||
for (int i = 0; i < Process.Parts.Count; i++)
|
||||
{
|
||||
if (Process.Parts[i].Name == "0")
|
||||
{
|
||||
foreach (var pattern in patterns[i])
|
||||
{
|
||||
if (items[1].Contains(pattern))
|
||||
{
|
||||
Process.Parts[i].Name = items[0];
|
||||
Process.Parts[i].Description = items[1];
|
||||
lineAssigned = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lineAssigned) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (lineOK);
|
||||
}
|
||||
|
||||
Data2UI();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show(Strings.Failed_to_import_a_list_of_parts,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool GetAccessToStateChange(bool forceLogin)
|
||||
{
|
||||
GID[] rqrdMmbrshp = ChangeReleaseState;
|
||||
if (forceLogin)
|
||||
{
|
||||
return new LoginDlg(rqrdMmbrshp).ShowDialog() == DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Common.GlobalData.CurrentUser.IsMemberOf(rqrdMmbrshp) || new LoginDlg(rqrdMmbrshp).ShowDialog() == DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
private void showRecordsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SharedDatabase.TracingDB.Session != null)
|
||||
{
|
||||
IList<ReferenceRecord> refRecords = SharedDatabase.TracingDB.Session.QueryOver<ReferenceRecord>().Where(x => (x.Workflow == Process)).List();
|
||||
new Forms.ShowRecordsForm(refRecords).ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/UserControls/EditProcessCtrl.resx
Normal file
120
WorkflowConfigurator/UserControls/EditProcessCtrl.resx
Normal 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>
|
||||
59
WorkflowConfigurator/UserControls/IMyUI.cs
Normal file
59
WorkflowConfigurator/UserControls/IMyUI.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface to be implemented by (sub)controls
|
||||
/// for process/part/workstep modification.
|
||||
/// </summary>
|
||||
public interface IMyUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Update UI elements lock state (visible/enabled/etc.)
|
||||
/// </summary>
|
||||
/// <param name="limitedUnlock">Process name, descriptions, checks and Oracle parameters can be changed</param>
|
||||
/// <param name="completeUnlock">Everything can be changed</param>
|
||||
void UpdateLockState(bool limitedUnlock, bool completeUnlock);
|
||||
|
||||
/// <summary>
|
||||
/// Update UI elements from data objects.
|
||||
/// </summary>
|
||||
void Data2UI();
|
||||
|
||||
/// <summary>
|
||||
/// Verify validity of data in UI elements.
|
||||
/// </summary>
|
||||
/// <param name="message">Messgae when data are not valid</param>
|
||||
/// <returns>true = data valid</returns>
|
||||
bool VerifyUIData(out string message);
|
||||
|
||||
/// <summary>
|
||||
/// Update data objects from UI elements.
|
||||
/// </summary>
|
||||
void UI2Data();
|
||||
|
||||
/// <summary>
|
||||
/// Save UI settings like splitter positions, column widths, etc. to Program.LocalSettings object.
|
||||
/// </summary>
|
||||
void Settings2UI();
|
||||
|
||||
/// <summary>
|
||||
/// SRestore UI settings like splitter positions, column widths, etc. from Program.LocalSettings object.
|
||||
/// </summary>
|
||||
void UI2Settings();
|
||||
|
||||
/// <summary>
|
||||
/// Set 'unsavedChanges' etc. Called from bottom to top.
|
||||
/// </summary>
|
||||
void SetUnsavedFlag();
|
||||
|
||||
/// <summary>
|
||||
/// Reset 'unsavedChanges' etc. Called from top to bottom.
|
||||
/// </summary>
|
||||
void ResetUnsavedFlag();
|
||||
|
||||
void UpdateProcess(Process process, Reason reason, IList<Process> allProcesses);
|
||||
}
|
||||
}
|
||||
321
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.cs
Normal file
321
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.cs
Normal file
@ -0,0 +1,321 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using SharedDatabase.Entities;
|
||||
using SharedDatabase.Forms;
|
||||
using WorkflowConfigurator.Resources;
|
||||
using NHibernate;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public partial class OverviewOfProcessesCtrl : UserControl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(OverviewOfProcessesCtrl));
|
||||
|
||||
MainWnd parent;
|
||||
IList<Process> allProcesses;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor used by designer only.
|
||||
/// </summary>
|
||||
private OverviewOfProcessesCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor used in runtime, the control is created and added to the tab page dunamically by code.
|
||||
/// </summary>
|
||||
/// <param name="parent">Parent</param>
|
||||
public OverviewOfProcessesCtrl(MainWnd parent)
|
||||
: this()
|
||||
{
|
||||
this.parent = parent;
|
||||
Dock = DockStyle.Fill;
|
||||
|
||||
allProcesses = new List<Process>();
|
||||
|
||||
editProcessCtrl.OverviewCtrl = this;
|
||||
}
|
||||
|
||||
private void OverviewOfProcessesCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (parent != null)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Settings2UI();
|
||||
|
||||
((Form)parent).Closing += new CancelEventHandler(ParentClosing);
|
||||
|
||||
allProcesses = SharedDatabase.TracingDB.Session.QueryOver<Process>().OrderBy(x => x.Name).Asc.List(); ;
|
||||
RedrawLeftPane(RedrawType.FromScratch, null);
|
||||
editProcessCtrl.UpdateProcess(null, Reason.OpenProcess, allProcesses);
|
||||
}
|
||||
}
|
||||
|
||||
private void settingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
GID[] rqrdMmbrshp = Program.SettingsAccessLevel;
|
||||
///
|
||||
if (GlobalData.CurrentUser.IsMemberOf(rqrdMmbrshp) || new LoginDlg(rqrdMmbrshp).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
MainWnd.PrintTitle(false);
|
||||
new Forms.SettingsDlg().ShowDialog(); /// Logged in => Show settings dialog
|
||||
}
|
||||
}
|
||||
|
||||
private void allListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
/// TODO: Check whether the process really changed
|
||||
|
||||
int selectedIx = allListBox.SelectedIndex;
|
||||
Process selectedProcess = (selectedIx >= 0) ? (allListBox.Items[selectedIx] as Process) : null;
|
||||
|
||||
if (selectedProcess != editProcessCtrl.Process)
|
||||
{
|
||||
switch (editProcessCtrl.FinishEditing())
|
||||
{
|
||||
case EditFinishedInfo.Cancel:
|
||||
/// Continue editing, redraw left pane so that the previously selected item is selected again
|
||||
RedrawLeftPane(RedrawType.FromScratch, editProcessCtrl.Process);
|
||||
break;
|
||||
|
||||
case EditFinishedInfo.DataChanged:
|
||||
/// Left pane might have been changed => redraw it
|
||||
editProcessCtrl.UpdateProcess(selectedProcess, Reason.OpenProcess, allProcesses);
|
||||
RedrawLeftPane(RedrawType.FromScratch, selectedProcess);
|
||||
break;
|
||||
|
||||
default:
|
||||
editProcessCtrl.UpdateProcess(selectedProcess, Reason.OpenProcess, allProcesses);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkBox6_CheckedChanged(object sender, EventArgs e) { AnyFilterChanged(); }
|
||||
private void checkBox7_CheckedChanged(object sender, EventArgs e) { AnyFilterChanged(); }
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e) { AnyFilterChanged(); }
|
||||
private void checkBox9_CheckedChanged(object sender, EventArgs e) { AnyFilterChanged(); }
|
||||
private void nameContainsTextBox_TextChanged(object sender, EventArgs e) { AnyFilterChanged(); }
|
||||
|
||||
void AnyFilterChanged()
|
||||
{
|
||||
RedrawLeftPane(RedrawType.FromScratch, editProcessCtrl.Process);
|
||||
}
|
||||
|
||||
void ParentClosing(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (editProcessCtrl.FinishEditing() == EditFinishedInfo.Cancel)
|
||||
{
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
UI2Settings();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Redraw a list of processes selected by filters.
|
||||
/// </summary>
|
||||
/// <param name="fromScratch"></param>
|
||||
public void RedrawLeftPane(RedrawType redrawType, Process selectedProcess)
|
||||
{
|
||||
int count;
|
||||
|
||||
if (redrawType == RedrawType.FromScratch)
|
||||
{
|
||||
allListBox.Items.Clear();
|
||||
count = 0;
|
||||
foreach (var process in allProcesses)
|
||||
{
|
||||
if (IsProcessEnabled(process))
|
||||
{
|
||||
allListBox.Items.Add(process);
|
||||
if ((selectedProcess != null) && (selectedProcess == process))
|
||||
{
|
||||
allListBox.SetSelected(count, true);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Not supported now
|
||||
count = allListBox.Items.Count;
|
||||
}
|
||||
|
||||
allProcessesLabel.Text = string.Format("{0} ({1})", Strings.Workflows, count);
|
||||
}
|
||||
|
||||
#region Helper functions
|
||||
|
||||
void Localize()
|
||||
{
|
||||
settingsButton.Text = Strings.Settings;
|
||||
newButton.Text = Strings.New_workflow;
|
||||
copyButton.Text = Strings.Copy_workflow;
|
||||
|
||||
filterGroupBox.Text = Strings.Filter;
|
||||
checkBox6.Text = Strings.In_preparation;
|
||||
checkBox7.Text = Strings.Testing;
|
||||
checkBox8.Text = Strings.Released;
|
||||
checkBox9.Text = Strings.Deactivated;
|
||||
nameContainsGroupBox.Text = Strings.Name_contains + ':';
|
||||
|
||||
allProcessesLabel.Text = Strings.Workflows;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set UI properties (determining the window position, etc) to values obtained from local settings
|
||||
/// </summary>
|
||||
void Settings2UI()
|
||||
{
|
||||
try
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
///
|
||||
checkBox6.Checked = ls.OverviewCB6;
|
||||
checkBox7.Checked = ls.OverviewCB7;
|
||||
checkBox8.Checked = ls.OverviewCB8;
|
||||
checkBox9.Checked = ls.OverviewCB9;
|
||||
nameContainsTextBox.Text = ls.OverviewNameContains;
|
||||
rootSplitContainer.SplitterDistance = Math.Max(rootSplitContainer.Panel1MinSize,
|
||||
Math.Min(rootSplitContainer.Width - rootSplitContainer.Panel2MinSize,
|
||||
(ls.SplDst2 > 0) ? Convert.ToInt32(ls.SplDst1 * Width) : 400));
|
||||
|
||||
editProcessCtrl.Settings2UI();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Cannot restore settings: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve UI properties and save them to local settings
|
||||
/// </summary>
|
||||
void UI2Settings()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
///
|
||||
ls.OverviewCB6 = checkBox6.Checked;
|
||||
ls.OverviewCB7 = checkBox7.Checked;
|
||||
ls.OverviewCB8 = checkBox8.Checked;
|
||||
ls.OverviewCB9 = checkBox9.Checked;
|
||||
ls.OverviewNameContains = nameContainsTextBox.Text;
|
||||
ls.SplDst1 = (float)rootSplitContainer.SplitterDistance / (float)Width;
|
||||
|
||||
editProcessCtrl.UI2Settings();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a process is enabled for display based on process.ReleaseStatus,
|
||||
/// process.Name and a combination of process.SubClass and checked states of checkBoxes.
|
||||
/// </summary>
|
||||
/// <param name="process">Process</param>
|
||||
/// <returns>true when enabled</returns>
|
||||
bool IsProcessEnabled(Process process)
|
||||
{
|
||||
/// Display a newly created process even if it would be hidden by the filter
|
||||
if (process.Id == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(nameContainsTextBox.Text))
|
||||
{
|
||||
/// Hide processes that do not contain a search pattern (in case there is any search patrtern)
|
||||
if (!process.Name.Contains(nameContainsTextBox.Text)) return false;
|
||||
}
|
||||
|
||||
return ((process.ReleaseStatus == SharedDatabase.ReleaseStatus.In_preparation && checkBox6.Checked) ||
|
||||
(process.ReleaseStatus == SharedDatabase.ReleaseStatus.ToBeApproved && checkBox7.Checked) ||
|
||||
((process.ReleaseStatus == SharedDatabase.ReleaseStatus.Released ||
|
||||
process.ReleaseStatus == SharedDatabase.ReleaseStatus.ReleasedActive) && checkBox8.Checked) ||
|
||||
(process.ReleaseStatus == SharedDatabase.ReleaseStatus.Deactivated && checkBox9.Checked));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Find an unused process name.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string NewProcessName(string rootName)
|
||||
{
|
||||
int nameId = 1;
|
||||
string newName;
|
||||
|
||||
bool nameIsUsed;
|
||||
do
|
||||
{
|
||||
newName = string.Format("{0} {1}", rootName, nameId++);
|
||||
nameIsUsed = false;
|
||||
foreach (var t in allProcesses)
|
||||
{
|
||||
if (t.Name.Equals(newName))
|
||||
{
|
||||
nameIsUsed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
while (nameIsUsed);
|
||||
|
||||
return newName;
|
||||
}
|
||||
|
||||
|
||||
private void newButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
GID[] rqrdMmbrshp = EditProcessCtrl.UnlockAccessLevel;
|
||||
///
|
||||
if (GlobalData.CurrentUser.IsMemberOf(rqrdMmbrshp) || new LoginDlg(rqrdMmbrshp).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
MainWnd.PrintTitle(false);
|
||||
|
||||
if (editProcessCtrl.FinishEditing() == EditFinishedInfo.Cancel) return;
|
||||
|
||||
Process newProcess = new Process(NewProcessName(Strings.Workflow));
|
||||
newProcess.CreatedBy = GlobalData.GetCurrentUserName();
|
||||
allProcesses.Add(newProcess);
|
||||
editProcessCtrl.UpdateProcess(newProcess, Reason.NewProcess, allProcesses);
|
||||
RedrawLeftPane(RedrawType.FromScratch, newProcess); /// By this the new process will be selected
|
||||
}
|
||||
}
|
||||
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainWnd.PrintTitle(false);
|
||||
|
||||
if ((editProcessCtrl.Process == null) || (editProcessCtrl.FinishEditing() == EditFinishedInfo.Cancel)) return;
|
||||
|
||||
Process processCopy = editProcessCtrl.Process.Clone(NewProcessName(string.Format("{0} - {1}", editProcessCtrl.Process.Name, Strings.copy)), GlobalData.GetCurrentUserName());
|
||||
allProcesses.Add(processCopy);
|
||||
editProcessCtrl.UpdateProcess(processCopy, Reason.CopyProcess, allProcesses);
|
||||
RedrawLeftPane(RedrawType.FromScratch, processCopy); /// By this the copied process will be selected
|
||||
}
|
||||
|
||||
private void wizardButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainWnd.PrintTitle(false);
|
||||
|
||||
if ((editProcessCtrl.Process == null) || (editProcessCtrl.FinishEditing() == EditFinishedInfo.Cancel)) return;
|
||||
|
||||
Process processFromTemplate = editProcessCtrl.Process.Clone(NewProcessName(string.Format(Strings.Workflow_from_template_0, editProcessCtrl.Process.Name)), GlobalData.GetCurrentUserName());
|
||||
allProcesses.Add(processFromTemplate);
|
||||
editProcessCtrl.UpdateProcess(processFromTemplate, Reason.CopyProcess, allProcesses);
|
||||
RedrawLeftPane(RedrawType.FromScratch, processFromTemplate); /// By this the process created from a template will be selected
|
||||
|
||||
editProcessCtrl.ImportPartsUsingTemplate();
|
||||
}
|
||||
}
|
||||
}
|
||||
319
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.designer.cs
generated
Normal file
319
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.designer.cs
generated
Normal file
@ -0,0 +1,319 @@
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
partial class OverviewOfProcessesCtrl
|
||||
{
|
||||
/// <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.leftSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.wizardButton = new System.Windows.Forms.Button();
|
||||
this.filterGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.nameContainsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.nameContainsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.copyButton = new System.Windows.Forms.Button();
|
||||
this.newButton = new System.Windows.Forms.Button();
|
||||
this.settingsButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.allProcessesLabel = new System.Windows.Forms.Label();
|
||||
this.allListBox = new System.Windows.Forms.ListBox();
|
||||
this.rootSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.editProcessCtrl = new WorkflowConfigurator.UserControls.EditProcessCtrl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.leftSplitContainer)).BeginInit();
|
||||
this.leftSplitContainer.Panel1.SuspendLayout();
|
||||
this.leftSplitContainer.Panel2.SuspendLayout();
|
||||
this.leftSplitContainer.SuspendLayout();
|
||||
this.filterGroupBox.SuspendLayout();
|
||||
this.nameContainsGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rootSplitContainer)).BeginInit();
|
||||
this.rootSplitContainer.Panel1.SuspendLayout();
|
||||
this.rootSplitContainer.Panel2.SuspendLayout();
|
||||
this.rootSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// leftSplitContainer
|
||||
//
|
||||
this.leftSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.leftSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.leftSplitContainer.IsSplitterFixed = true;
|
||||
this.leftSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.leftSplitContainer.Name = "leftSplitContainer";
|
||||
//
|
||||
// leftSplitContainer.Panel1
|
||||
//
|
||||
this.leftSplitContainer.Panel1.Controls.Add(this.wizardButton);
|
||||
this.leftSplitContainer.Panel1.Controls.Add(this.filterGroupBox);
|
||||
this.leftSplitContainer.Panel1.Controls.Add(this.copyButton);
|
||||
this.leftSplitContainer.Panel1.Controls.Add(this.newButton);
|
||||
this.leftSplitContainer.Panel1.Controls.Add(this.settingsButton);
|
||||
//
|
||||
// leftSplitContainer.Panel2
|
||||
//
|
||||
this.leftSplitContainer.Panel2.Controls.Add(this.splitContainer1);
|
||||
this.leftSplitContainer.Size = new System.Drawing.Size(525, 638);
|
||||
this.leftSplitContainer.SplitterDistance = 125;
|
||||
this.leftSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// wizardButton
|
||||
//
|
||||
this.wizardButton.Location = new System.Drawing.Point(18, 125);
|
||||
this.wizardButton.Name = "wizardButton";
|
||||
this.wizardButton.Size = new System.Drawing.Size(89, 30);
|
||||
this.wizardButton.TabIndex = 3;
|
||||
this.wizardButton.Text = "Wizard";
|
||||
this.wizardButton.UseVisualStyleBackColor = true;
|
||||
this.wizardButton.Click += new System.EventHandler(this.wizardButton_Click);
|
||||
//
|
||||
// filterGroupBox
|
||||
//
|
||||
this.filterGroupBox.Controls.Add(this.checkBox7);
|
||||
this.filterGroupBox.Controls.Add(this.checkBox6);
|
||||
this.filterGroupBox.Controls.Add(this.nameContainsGroupBox);
|
||||
this.filterGroupBox.Controls.Add(this.checkBox9);
|
||||
this.filterGroupBox.Controls.Add(this.checkBox8);
|
||||
this.filterGroupBox.Location = new System.Drawing.Point(3, 177);
|
||||
this.filterGroupBox.Name = "filterGroupBox";
|
||||
this.filterGroupBox.Size = new System.Drawing.Size(122, 194);
|
||||
this.filterGroupBox.TabIndex = 4;
|
||||
this.filterGroupBox.TabStop = false;
|
||||
this.filterGroupBox.Text = "Filter";
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
this.checkBox7.AutoSize = true;
|
||||
this.checkBox7.Location = new System.Drawing.Point(4, 50);
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.Size = new System.Drawing.Size(61, 17);
|
||||
this.checkBox7.TabIndex = 6;
|
||||
this.checkBox7.Text = "Testing";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
this.checkBox7.CheckedChanged += new System.EventHandler(this.checkBox7_CheckedChanged);
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
this.checkBox6.AutoSize = true;
|
||||
this.checkBox6.Location = new System.Drawing.Point(4, 27);
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.Size = new System.Drawing.Size(91, 17);
|
||||
this.checkBox6.TabIndex = 5;
|
||||
this.checkBox6.Text = "In preparation";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged);
|
||||
//
|
||||
// nameContainsGroupBox
|
||||
//
|
||||
this.nameContainsGroupBox.Controls.Add(this.nameContainsTextBox);
|
||||
this.nameContainsGroupBox.Location = new System.Drawing.Point(6, 133);
|
||||
this.nameContainsGroupBox.Name = "nameContainsGroupBox";
|
||||
this.nameContainsGroupBox.Size = new System.Drawing.Size(110, 45);
|
||||
this.nameContainsGroupBox.TabIndex = 10;
|
||||
this.nameContainsGroupBox.TabStop = false;
|
||||
this.nameContainsGroupBox.Text = "Name contains";
|
||||
//
|
||||
// nameContainsTextBox
|
||||
//
|
||||
this.nameContainsTextBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.nameContainsTextBox.Name = "nameContainsTextBox";
|
||||
this.nameContainsTextBox.Size = new System.Drawing.Size(98, 20);
|
||||
this.nameContainsTextBox.TabIndex = 0;
|
||||
this.nameContainsTextBox.TextChanged += new System.EventHandler(this.nameContainsTextBox_TextChanged);
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.Location = new System.Drawing.Point(4, 95);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(84, 17);
|
||||
this.checkBox9.TabIndex = 8;
|
||||
this.checkBox9.Text = "Deactivated";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
this.checkBox9.CheckedChanged += new System.EventHandler(this.checkBox9_CheckedChanged);
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.Location = new System.Drawing.Point(4, 72);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(71, 17);
|
||||
this.checkBox8.TabIndex = 7;
|
||||
this.checkBox8.Text = "Released";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged);
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
this.copyButton.Location = new System.Drawing.Point(18, 89);
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.Size = new System.Drawing.Size(89, 30);
|
||||
this.copyButton.TabIndex = 2;
|
||||
this.copyButton.Text = "Copy process";
|
||||
this.copyButton.UseVisualStyleBackColor = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// newButton
|
||||
//
|
||||
this.newButton.Location = new System.Drawing.Point(18, 53);
|
||||
this.newButton.Name = "newButton";
|
||||
this.newButton.Size = new System.Drawing.Size(89, 30);
|
||||
this.newButton.TabIndex = 1;
|
||||
this.newButton.Text = "New process";
|
||||
this.newButton.UseVisualStyleBackColor = true;
|
||||
this.newButton.Click += new System.EventHandler(this.newButton_Click);
|
||||
//
|
||||
// settingsButton
|
||||
//
|
||||
this.settingsButton.Location = new System.Drawing.Point(18, 14);
|
||||
this.settingsButton.Name = "settingsButton";
|
||||
this.settingsButton.Size = new System.Drawing.Size(89, 23);
|
||||
this.settingsButton.TabIndex = 0;
|
||||
this.settingsButton.Text = "Settings";
|
||||
this.settingsButton.UseVisualStyleBackColor = true;
|
||||
this.settingsButton.Click += new System.EventHandler(this.settingsButton_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.allProcessesLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.allListBox);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(396, 638);
|
||||
this.splitContainer1.SplitterDistance = 25;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// allProcessesLabel
|
||||
//
|
||||
this.allProcessesLabel.AutoSize = true;
|
||||
this.allProcessesLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.allProcessesLabel.Location = new System.Drawing.Point(3, 6);
|
||||
this.allProcessesLabel.Name = "allProcessesLabel";
|
||||
this.allProcessesLabel.Size = new System.Drawing.Size(103, 16);
|
||||
this.allProcessesLabel.TabIndex = 0;
|
||||
this.allProcessesLabel.Text = "All processes";
|
||||
//
|
||||
// allListBox
|
||||
//
|
||||
this.allListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.allListBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.allListBox.FormattingEnabled = true;
|
||||
this.allListBox.ItemHeight = 16;
|
||||
this.allListBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.allListBox.Name = "allListBox";
|
||||
this.allListBox.Size = new System.Drawing.Size(396, 609);
|
||||
this.allListBox.TabIndex = 0;
|
||||
this.allListBox.SelectedIndexChanged += new System.EventHandler(this.allListBox_SelectedIndexChanged);
|
||||
//
|
||||
// rootSplitContainer
|
||||
//
|
||||
this.rootSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rootSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.rootSplitContainer.Name = "rootSplitContainer";
|
||||
//
|
||||
// rootSplitContainer.Panel1
|
||||
//
|
||||
this.rootSplitContainer.Panel1.Controls.Add(this.leftSplitContainer);
|
||||
//
|
||||
// rootSplitContainer.Panel2
|
||||
//
|
||||
this.rootSplitContainer.Panel2.Controls.Add(this.editProcessCtrl);
|
||||
this.rootSplitContainer.Size = new System.Drawing.Size(1153, 638);
|
||||
this.rootSplitContainer.SplitterDistance = 525;
|
||||
this.rootSplitContainer.TabIndex = 3;
|
||||
//
|
||||
// editProcessCtrl
|
||||
//
|
||||
this.editProcessCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.editProcessCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.editProcessCtrl.Name = "editProcessCtrl";
|
||||
this.editProcessCtrl.Size = new System.Drawing.Size(624, 638);
|
||||
this.editProcessCtrl.TabIndex = 0;
|
||||
//
|
||||
// OverviewOfProcessesCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.rootSplitContainer);
|
||||
this.Name = "OverviewOfProcessesCtrl";
|
||||
this.Size = new System.Drawing.Size(1153, 638);
|
||||
this.Load += new System.EventHandler(this.OverviewOfProcessesCtrl_Load);
|
||||
this.leftSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.leftSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.leftSplitContainer)).EndInit();
|
||||
this.leftSplitContainer.ResumeLayout(false);
|
||||
this.filterGroupBox.ResumeLayout(false);
|
||||
this.filterGroupBox.PerformLayout();
|
||||
this.nameContainsGroupBox.ResumeLayout(false);
|
||||
this.nameContainsGroupBox.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.rootSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.rootSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.rootSplitContainer)).EndInit();
|
||||
this.rootSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer leftSplitContainer;
|
||||
private System.Windows.Forms.Button settingsButton;
|
||||
private System.Windows.Forms.SplitContainer rootSplitContainer;
|
||||
private System.Windows.Forms.ListBox allListBox;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Label allProcessesLabel;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
private EditProcessCtrl editProcessCtrl;
|
||||
private System.Windows.Forms.GroupBox nameContainsGroupBox;
|
||||
private System.Windows.Forms.TextBox nameContainsTextBox;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.Button copyButton;
|
||||
private System.Windows.Forms.Button newButton;
|
||||
private System.Windows.Forms.GroupBox filterGroupBox;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.Button wizardButton;
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.resx
Normal file
120
WorkflowConfigurator/UserControls/OverviewOfProcessesCtrl.resx
Normal 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>
|
||||
221
WorkflowConfigurator/UserControls/PartsCtrl.Designer.cs
generated
Normal file
221
WorkflowConfigurator/UserControls/PartsCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,221 @@
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
partial class PartsCtrl
|
||||
{
|
||||
/// <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.horSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.removePartButton = new System.Windows.Forms.Button();
|
||||
this.addPartButton = new System.Windows.Forms.Button();
|
||||
this.partsLabel = new System.Windows.Forms.Label();
|
||||
this.partsListView = new Common.Forms.ListViewEx();
|
||||
this.vertSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.partDownButton = new System.Windows.Forms.Button();
|
||||
this.partUpButton = new System.Windows.Forms.Button();
|
||||
this.removePartFromWorkstepButton = new System.Windows.Forms.Button();
|
||||
this.addPartToWorkstepButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.horSplitContainer)).BeginInit();
|
||||
this.horSplitContainer.Panel1.SuspendLayout();
|
||||
this.horSplitContainer.Panel2.SuspendLayout();
|
||||
this.horSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.vertSplitContainer)).BeginInit();
|
||||
this.vertSplitContainer.Panel1.SuspendLayout();
|
||||
this.vertSplitContainer.Panel2.SuspendLayout();
|
||||
this.vertSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// horSplitContainer
|
||||
//
|
||||
this.horSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.horSplitContainer.IsSplitterFixed = true;
|
||||
this.horSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.horSplitContainer.Name = "horSplitContainer";
|
||||
this.horSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// horSplitContainer.Panel1
|
||||
//
|
||||
this.horSplitContainer.Panel1.Controls.Add(this.removePartButton);
|
||||
this.horSplitContainer.Panel1.Controls.Add(this.addPartButton);
|
||||
this.horSplitContainer.Panel1.Controls.Add(this.partsLabel);
|
||||
//
|
||||
// horSplitContainer.Panel2
|
||||
//
|
||||
this.horSplitContainer.Panel2.Controls.Add(this.partsListView);
|
||||
this.horSplitContainer.Size = new System.Drawing.Size(338, 350);
|
||||
this.horSplitContainer.SplitterDistance = 30;
|
||||
this.horSplitContainer.SplitterWidth = 1;
|
||||
this.horSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// removePartButton
|
||||
//
|
||||
this.removePartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.removePartButton.Enabled = false;
|
||||
this.removePartButton.Location = new System.Drawing.Point(258, 4);
|
||||
this.removePartButton.Name = "removePartButton";
|
||||
this.removePartButton.Size = new System.Drawing.Size(75, 22);
|
||||
this.removePartButton.TabIndex = 8;
|
||||
this.removePartButton.Text = "Remove";
|
||||
this.removePartButton.UseVisualStyleBackColor = true;
|
||||
this.removePartButton.Click += new System.EventHandler(this.removePartButton_Click);
|
||||
//
|
||||
// addPartButton
|
||||
//
|
||||
this.addPartButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.addPartButton.Enabled = false;
|
||||
this.addPartButton.Location = new System.Drawing.Point(177, 4);
|
||||
this.addPartButton.Name = "addPartButton";
|
||||
this.addPartButton.Size = new System.Drawing.Size(75, 22);
|
||||
this.addPartButton.TabIndex = 7;
|
||||
this.addPartButton.Text = "Add";
|
||||
this.addPartButton.UseVisualStyleBackColor = true;
|
||||
this.addPartButton.Click += new System.EventHandler(this.addPartButton_Click);
|
||||
//
|
||||
// partsLabel
|
||||
//
|
||||
this.partsLabel.AutoSize = true;
|
||||
this.partsLabel.Location = new System.Drawing.Point(7, 9);
|
||||
this.partsLabel.Name = "partsLabel";
|
||||
this.partsLabel.Size = new System.Drawing.Size(31, 13);
|
||||
this.partsLabel.TabIndex = 3;
|
||||
this.partsLabel.Text = "Parts";
|
||||
//
|
||||
// partsListView
|
||||
//
|
||||
this.partsListView.AllowColumnReorder = true;
|
||||
this.partsListView.CheckBoxes = true;
|
||||
this.partsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.partsListView.DoubleClickActivation = false;
|
||||
this.partsListView.FullRowSelect = true;
|
||||
this.partsListView.GridLines = true;
|
||||
this.partsListView.Location = new System.Drawing.Point(0, 0);
|
||||
this.partsListView.Name = "partsListView";
|
||||
this.partsListView.Size = new System.Drawing.Size(338, 319);
|
||||
this.partsListView.TabIndex = 1;
|
||||
this.partsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.partsListView.View = System.Windows.Forms.View.Details;
|
||||
this.partsListView.SubItemClicked += new Common.Forms.SubItemEventHandler(this.partsListView_SubItemClicked);
|
||||
this.partsListView.SubItemEndEditing += new Common.Forms.SubItemEndEditingEventHandler(this.partsListView_SubItemEndEditing);
|
||||
this.partsListView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.partsListView_ItemCheck);
|
||||
this.partsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.partsListView_ItemChecked);
|
||||
//
|
||||
// vertSplitContainer
|
||||
//
|
||||
this.vertSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vertSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.vertSplitContainer.IsSplitterFixed = true;
|
||||
this.vertSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.vertSplitContainer.Name = "vertSplitContainer";
|
||||
//
|
||||
// vertSplitContainer.Panel1
|
||||
//
|
||||
this.vertSplitContainer.Panel1.Controls.Add(this.horSplitContainer);
|
||||
//
|
||||
// vertSplitContainer.Panel2
|
||||
//
|
||||
this.vertSplitContainer.Panel2.Controls.Add(this.partDownButton);
|
||||
this.vertSplitContainer.Panel2.Controls.Add(this.partUpButton);
|
||||
this.vertSplitContainer.Panel2.Controls.Add(this.removePartFromWorkstepButton);
|
||||
this.vertSplitContainer.Panel2.Controls.Add(this.addPartToWorkstepButton);
|
||||
this.vertSplitContainer.Size = new System.Drawing.Size(400, 350);
|
||||
this.vertSplitContainer.SplitterDistance = 338;
|
||||
this.vertSplitContainer.SplitterWidth = 1;
|
||||
this.vertSplitContainer.TabIndex = 1;
|
||||
//
|
||||
// partDownButton
|
||||
//
|
||||
this.partDownButton.Location = new System.Drawing.Point(16, 210);
|
||||
this.partDownButton.Name = "partDownButton";
|
||||
this.partDownButton.Size = new System.Drawing.Size(44, 39);
|
||||
this.partDownButton.TabIndex = 5;
|
||||
this.partDownButton.Text = "v";
|
||||
this.partDownButton.UseVisualStyleBackColor = true;
|
||||
this.partDownButton.Click += new System.EventHandler(this.partDownButton_Click);
|
||||
//
|
||||
// partUpButton
|
||||
//
|
||||
this.partUpButton.Location = new System.Drawing.Point(16, 60);
|
||||
this.partUpButton.Name = "partUpButton";
|
||||
this.partUpButton.Size = new System.Drawing.Size(44, 39);
|
||||
this.partUpButton.TabIndex = 4;
|
||||
this.partUpButton.Text = "^";
|
||||
this.partUpButton.UseVisualStyleBackColor = true;
|
||||
this.partUpButton.Click += new System.EventHandler(this.partUpButton_Click);
|
||||
//
|
||||
// removePartFromWorkstepButton
|
||||
//
|
||||
this.removePartFromWorkstepButton.Location = new System.Drawing.Point(16, 160);
|
||||
this.removePartFromWorkstepButton.Name = "removePartFromWorkstepButton";
|
||||
this.removePartFromWorkstepButton.Size = new System.Drawing.Size(44, 39);
|
||||
this.removePartFromWorkstepButton.TabIndex = 3;
|
||||
this.removePartFromWorkstepButton.Text = "<";
|
||||
this.removePartFromWorkstepButton.UseVisualStyleBackColor = true;
|
||||
this.removePartFromWorkstepButton.Click += new System.EventHandler(this.removePartFromWorkstepButton_Click);
|
||||
//
|
||||
// addPartToWorkstepButton
|
||||
//
|
||||
this.addPartToWorkstepButton.Location = new System.Drawing.Point(16, 110);
|
||||
this.addPartToWorkstepButton.Name = "addPartToWorkstepButton";
|
||||
this.addPartToWorkstepButton.Size = new System.Drawing.Size(44, 39);
|
||||
this.addPartToWorkstepButton.TabIndex = 2;
|
||||
this.addPartToWorkstepButton.Text = ">";
|
||||
this.addPartToWorkstepButton.UseVisualStyleBackColor = true;
|
||||
this.addPartToWorkstepButton.Click += new System.EventHandler(this.addPartToWorkstepButton_Click);
|
||||
//
|
||||
// PartsCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.vertSplitContainer);
|
||||
this.Name = "PartsCtrl";
|
||||
this.Size = new System.Drawing.Size(400, 350);
|
||||
this.horSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.horSplitContainer.Panel1.PerformLayout();
|
||||
this.horSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.horSplitContainer)).EndInit();
|
||||
this.horSplitContainer.ResumeLayout(false);
|
||||
this.vertSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.vertSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.vertSplitContainer)).EndInit();
|
||||
this.vertSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer horSplitContainer;
|
||||
private System.Windows.Forms.Label partsLabel;
|
||||
private Common.Forms.ListViewEx partsListView;
|
||||
private System.Windows.Forms.SplitContainer vertSplitContainer;
|
||||
private System.Windows.Forms.Button partDownButton;
|
||||
private System.Windows.Forms.Button partUpButton;
|
||||
private System.Windows.Forms.Button removePartFromWorkstepButton;
|
||||
private System.Windows.Forms.Button addPartToWorkstepButton;
|
||||
private System.Windows.Forms.Button removePartButton;
|
||||
private System.Windows.Forms.Button addPartButton;
|
||||
}
|
||||
}
|
||||
564
WorkflowConfigurator/UserControls/PartsCtrl.cs
Normal file
564
WorkflowConfigurator/UserControls/PartsCtrl.cs
Normal file
@ -0,0 +1,564 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Common.Forms;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public partial class PartsCtrl : UserControl, IMyUI
|
||||
{
|
||||
bool unsavedChanges;
|
||||
bool suppressNotifications;
|
||||
bool limitedUnlock;
|
||||
bool completeUnlock;
|
||||
|
||||
public EditProcessCtrl EditProcessCtrl; /// Parent control reference
|
||||
///
|
||||
Process currentProcess;
|
||||
|
||||
public IEnumerable<Part> SelectedParts { get { return null; /* TODO */ } }
|
||||
// TODO: replace ListView.SelectedListViewItemCollection partsListView.SelectedItems;
|
||||
|
||||
|
||||
public PartsCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitPartsListViewColumns();
|
||||
unsavedChanges = false;
|
||||
suppressNotifications = false;
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
addPartButton.Text = Strings.Add;
|
||||
removePartButton.Text = Strings.Remove;
|
||||
}
|
||||
|
||||
public void UpdateProcess(Process process, Reason reason, IList<Process> allProcesses)
|
||||
{
|
||||
this.currentProcess = process;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable/hide UI elements based on lock/unlock/complete unlock state
|
||||
/// </summary>
|
||||
/// <param name="unlock">true = unlock for released processes</param>
|
||||
/// <param name="completely">true = unlock for processes in preparation (complete unlock)</param>
|
||||
public void UpdateLockState(bool unlock, bool completely)
|
||||
{
|
||||
limitedUnlock = unlock;
|
||||
completeUnlock = completely;
|
||||
|
||||
addPartButton.Enabled = completely;
|
||||
removePartButton.Enabled = completely;
|
||||
partUpButton.Enabled = unlock;
|
||||
partDownButton.Enabled = unlock;
|
||||
addPartToWorkstepButton.Enabled = completely;
|
||||
removePartFromWorkstepButton.Enabled = completely;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
suppressNotifications = true;
|
||||
|
||||
partsListView.Items.Clear();
|
||||
int partsCount = 0;
|
||||
|
||||
if ((this.currentProcess != null) && (this.currentProcess.Parts != null))
|
||||
{
|
||||
/// Sort parts before displaying in a list view
|
||||
Part[] sortedParts = new Part[currentProcess.Parts.Count];
|
||||
int i = 0;
|
||||
foreach (var part in this.currentProcess.Parts) sortedParts[i++] = part;
|
||||
Array.Sort(sortedParts, (Part part1, Part part2) => part1.StepNumber.CompareTo(part2.StepNumber));
|
||||
|
||||
/// Display parts in the list view, rectify StepNumber-s
|
||||
foreach (var part in sortedParts)
|
||||
{
|
||||
part.StepNumber = ++partsCount; /// Rectify Part.StepNumber
|
||||
partsListView.Items.Add(Part2Lvi(part));
|
||||
}
|
||||
}
|
||||
|
||||
partsLabel.Text = string.Format("{0} ({1})", Strings.Parts, partsCount);
|
||||
|
||||
suppressNotifications = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when (modified) UI data are OK
|
||||
/// </summary>
|
||||
/// <returns>true when UI data are valid</returns>
|
||||
public bool VerifyUIData(out string message)
|
||||
{
|
||||
bool uiDataValid = true;
|
||||
message = string.Empty;
|
||||
/// TODO
|
||||
return uiDataValid;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
for (int i = 0; i < partsListView.Items.Count; i++)
|
||||
{
|
||||
ListViewItem lvi = partsListView.Items[i];
|
||||
Part part = lvi.Tag as Part;
|
||||
if (part != null)
|
||||
{
|
||||
UpdatePartFromLvi(lvi, part);
|
||||
part.StepNumber = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Settings2UI()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
if ((ls != null) && (partsListView.Columns.Count >= 6))
|
||||
{
|
||||
partsListView.Columns[0].Width = (ls.ColWid1 > 0) ? ls.ColWid1 : 28;
|
||||
partsListView.Columns[1].Width = (ls.ColWid2 > 0) ? ls.ColWid2 : 28;
|
||||
partsListView.Columns[2].Width = (ls.ColWid3 > 0) ? ls.ColWid3 : 70;
|
||||
partsListView.Columns[3].Width = (ls.ColWid4 > 0) ? ls.ColWid4 : 50;
|
||||
partsListView.Columns[4].Width = (ls.ColWid5 > 0) ? ls.ColWid5 : 50;
|
||||
partsListView.Columns[5].Width = (ls.ColWid6 > 0) ? ls.ColWid6 : 50;
|
||||
partsListView.Columns[6].Width = (ls.ColWid7 > 0) ? ls.ColWid7 : 200;
|
||||
}
|
||||
}
|
||||
|
||||
public void UI2Settings()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
if ((ls != null) && (partsListView.Columns.Count >= 6))
|
||||
{
|
||||
ls.ColWid1 = partsListView.Columns[0].Width;
|
||||
ls.ColWid2 = partsListView.Columns[1].Width;
|
||||
ls.ColWid3 = partsListView.Columns[2].Width;
|
||||
ls.ColWid4 = partsListView.Columns[3].Width;
|
||||
ls.ColWid5 = partsListView.Columns[4].Width;
|
||||
ls.ColWid6 = partsListView.Columns[5].Width;
|
||||
ls.ColWid7 = partsListView.Columns[6].Width;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetUnsavedFlag()
|
||||
{
|
||||
unsavedChanges = false;
|
||||
}
|
||||
|
||||
public void SetUnsavedFlag()
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
unsavedChanges = true;
|
||||
EditProcessCtrl.SetUnsavedFlag();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Control[] partsEditors;
|
||||
ComboBox checkComboBox;
|
||||
ComboBox oraTypeComboBox;
|
||||
ComboBox oraDescrComboBox;
|
||||
///
|
||||
public enum PartsColumn
|
||||
{
|
||||
HasSN,
|
||||
Nr,
|
||||
Name,
|
||||
Check,
|
||||
OraDBType,
|
||||
OraDBDescr,
|
||||
DefaultCode,
|
||||
Description,
|
||||
CoulumnsCount
|
||||
}
|
||||
///
|
||||
void InitPartsListViewColumns()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
partsListView.Columns.Add(Strings.Chdr_HasSN, ((ls != null) && (ls.ColWid1 > 0)) ? ls.ColWid1 : 28);
|
||||
partsListView.Columns.Add(Strings.Chdr_Nr, ((ls != null) && (ls.ColWid2 > 0)) ? ls.ColWid2 : 28);
|
||||
partsListView.Columns.Add(Strings.Chdr_Name, ((ls != null) && (ls.ColWid3 > 0)) ? ls.ColWid3 : 70);
|
||||
partsListView.Columns.Add(Strings.Chdr_Check, ((ls != null) && (ls.ColWid4 > 0)) ? ls.ColWid4 : 50);
|
||||
partsListView.Columns.Add(Strings.Chdr_OraDBType, ((ls != null) && (ls.ColWid5 > 0)) ? ls.ColWid5 : 50);
|
||||
partsListView.Columns.Add(Strings.Chdr_OraDBDescr, ((ls != null) && (ls.ColWid6 > 0)) ? ls.ColWid6 : 50);
|
||||
partsListView.Columns.Add("Dflt. code", ((ls != null) && (ls.ColWid7 > 0)) ? ls.ColWid7 : 70);
|
||||
partsListView.Columns.Add(Strings.Description, ((ls != null) && (ls.ColWid8 > 0)) ? ls.ColWid8 : 200);
|
||||
|
||||
checkComboBox = new ComboBox();
|
||||
for (CodeType ct = 0; ct < CodeType.Count; ct++) checkComboBox.Items.Add(ct.ToDescription());
|
||||
|
||||
oraTypeComboBox = new ComboBox();
|
||||
oraTypeComboBox.Items.Add("");
|
||||
oraTypeComboBox.Items.Add("Flowtube");
|
||||
oraTypeComboBox.Items.Add("Batt");
|
||||
oraTypeComboBox.Items.Add("Batt1");
|
||||
oraTypeComboBox.Items.Add("Batt2");
|
||||
oraTypeComboBox.Items.Add("Antena");
|
||||
oraTypeComboBox.Items.Add("Puzdro_620");
|
||||
|
||||
oraDescrComboBox = new ComboBox();
|
||||
oraDescrComboBox.Items.Add("");
|
||||
oraDescrComboBox.Items.Add("Tadiran");
|
||||
oraDescrComboBox.Items.Add("Vitzrocell");
|
||||
oraDescrComboBox.Items.Add("DN15");
|
||||
oraDescrComboBox.Items.Add("DN20");
|
||||
oraDescrComboBox.Items.Add("DN25");
|
||||
oraDescrComboBox.Items.Add("DN32");
|
||||
oraDescrComboBox.Items.Add("DN40");
|
||||
oraDescrComboBox.Items.Add("internal");
|
||||
oraDescrComboBox.Items.Add("external");
|
||||
|
||||
partsEditors = new Control[]
|
||||
{
|
||||
null, /// HasSN
|
||||
null, /// Nr.
|
||||
new TextBox(), /// Name
|
||||
checkComboBox, /// Check
|
||||
oraTypeComboBox, /// OraDBType
|
||||
oraDescrComboBox, /// OraDBDescr
|
||||
new TextBox(), /// DefaultCode
|
||||
new TextBox(), /// Description
|
||||
};
|
||||
|
||||
foreach (var ctrl in partsEditors)
|
||||
{
|
||||
if (ctrl != null) Controls.Add(ctrl);
|
||||
}
|
||||
}
|
||||
///
|
||||
ListViewItem Part2Lvi(Part part)
|
||||
{
|
||||
string oraType = null;
|
||||
string oraDescr = null;
|
||||
if (!string.IsNullOrEmpty(part.OraDBType))
|
||||
{
|
||||
string[] oraItems = part.OraDBType.Split(new char[] { ' ' });
|
||||
oraType = oraItems[0];
|
||||
oraDescr = (oraItems.Length > 1) ? oraItems[1] : string.Empty;
|
||||
}
|
||||
|
||||
ListViewItem lvi = new ListViewItem();
|
||||
lvi.Checked = (part.CodeLocation == CodeLocation.OnPart);
|
||||
lvi.SubItems.Add(part.StepNumber.ToString());
|
||||
lvi.SubItems.Add(part.Name);
|
||||
lvi.SubItems.Add(((CodeType)part.CodeType).ToDescription());
|
||||
lvi.SubItems.Add(oraType);
|
||||
lvi.SubItems.Add(oraDescr);
|
||||
lvi.SubItems.Add((part.DefaultCode != null) ? part.DefaultCode : string.Empty);
|
||||
lvi.SubItems.Add(part.Description);
|
||||
lvi.Tag = part;
|
||||
return lvi;
|
||||
}
|
||||
///
|
||||
bool UpdatePartFromLvi(ListViewItem lvi, Part part)
|
||||
{
|
||||
part.CodeLocation = lvi.Checked ? CodeLocation.OnPart : CodeLocation.OnPallet;
|
||||
part.Name = lvi.SubItems[(int)PartsColumn.Name].Text;
|
||||
|
||||
part.CodeType = (sbyte)CodeType.UniqueNr;
|
||||
for (CodeType ct = 0; ct < CodeType.Count; ct++)
|
||||
{
|
||||
if (lvi.SubItems[(int)PartsColumn.Check].Text == ct.ToDescription())
|
||||
{
|
||||
part.CodeType = (sbyte)ct;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string oraDescr = lvi.SubItems[(int)PartsColumn.OraDBDescr].Text;
|
||||
part.OraDBType = string.Format(string.IsNullOrEmpty(oraDescr) ? "{0}" : "{0} {1}", lvi.SubItems[(int)PartsColumn.OraDBType].Text, oraDescr);
|
||||
|
||||
part.DefaultCode = lvi.SubItems[(int)PartsColumn.DefaultCode].Text;
|
||||
part.Description = lvi.SubItems[(int)PartsColumn.Description].Text;
|
||||
return true;
|
||||
}
|
||||
///
|
||||
private void partsListView_SubItemClicked(object sender, SubItemEventArgs e)
|
||||
{
|
||||
if (e.SubItem == (int)PartsColumn.HasSN) return; /// HasSN cannot be changed this way
|
||||
if (e.SubItem == (int)PartsColumn.Nr) return; /// Part nr. cannot be changed this way
|
||||
if (!completeUnlock && e.SubItem == (int)PartsColumn.Name) return; /// Part name cannot be changed when released
|
||||
|
||||
if (limitedUnlock && (e.SubItem < (int)PartsColumn.CoulumnsCount))
|
||||
{
|
||||
partsListView.StartEditing(partsEditors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
}
|
||||
///
|
||||
private void partsListView_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e)
|
||||
{
|
||||
if (e.SubItem == (int)PartsColumn.HasSN) return;
|
||||
if (e.SubItem == (int)PartsColumn.Nr) return;
|
||||
|
||||
if (e.SubItem == (int)PartsColumn.Name)
|
||||
{
|
||||
(e.Item.Tag as Part).Name = e.DisplayText;
|
||||
EditProcessCtrl.Data2UI(); /// Redraw worksteps as well
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
else if (e.SubItem == (int)PartsColumn.Description)
|
||||
{
|
||||
(e.Item.Tag as Part).Description = e.DisplayText;
|
||||
EditProcessCtrl.Data2UI(); /// Redraw worksteps as well
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
else if ((e.SubItem == (int)PartsColumn.Check) && checkComboBox.Items.Contains(e.DisplayText))
|
||||
{
|
||||
(e.Item.Tag as Part).CodeType = (sbyte)CodeType.UniqueNr;
|
||||
for (CodeType ct = 0; ct < CodeType.Count; ct++)
|
||||
{
|
||||
if (e.DisplayText == ct.ToDescription())
|
||||
{
|
||||
(e.Item.Tag as Part).CodeType = (sbyte)ct;
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.SubItem == (int)PartsColumn.OraDBType)
|
||||
{
|
||||
string oraDescr = e.Item.SubItems[(int)PartsColumn.OraDBDescr].Text;
|
||||
(e.Item.Tag as Part).OraDBType = string.Format(string.IsNullOrEmpty(oraDescr) ? "{0}" : "{0} {1}", e.DisplayText, oraDescr);
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
else if (e.SubItem == (int)PartsColumn.OraDBDescr)
|
||||
{
|
||||
string oraDescr = e.DisplayText;
|
||||
(e.Item.Tag as Part).OraDBType = string.Format(string.IsNullOrEmpty(oraDescr) ? "{0}" : "{0} {1}", e.Item.SubItems[(int)PartsColumn.OraDBType].Text, oraDescr);
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
else if (e.SubItem == (int)PartsColumn.DefaultCode)
|
||||
{
|
||||
if (e.DisplayText != e.Item.SubItems[e.SubItem].Text)
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// Editted item is NOK - revert the change
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
private void addPartButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Forms.PartDlg dlg = new Forms.PartDlg(Strings.New_part, currentProcess);
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
dlg.Part.StepNumber = currentProcess.Parts.Count + 1;
|
||||
currentProcess.Parts.Add(dlg.Part);
|
||||
partsListView.Items.Add(Part2Lvi(dlg.Part));
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void removePartButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (partsListView.SelectedItems.Count != 1)
|
||||
{
|
||||
MessageBox.Show(Strings.No_part_selected);
|
||||
return;
|
||||
}
|
||||
|
||||
Part selectedPart = partsListView.SelectedItems[0].Tag as Part;
|
||||
foreach (var ws in currentProcess.Worksteps)
|
||||
{
|
||||
if (ws.ReferencePart == selectedPart || ws.Parts.Contains(selectedPart))
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Part_is_used_in_workstep_0, ws.Name));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int oriCount = currentProcess.Parts.Count;
|
||||
currentProcess.Parts.Remove(selectedPart);
|
||||
if (currentProcess.Parts.Count == oriCount)
|
||||
{
|
||||
MessageBox.Show("Part cannot be deleted", Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditProcessCtrl.PartsToBeDeleted.Add(selectedPart);
|
||||
Data2UI();
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void partUpButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (partsListView.SelectedItems.Count != 1) return;
|
||||
|
||||
if (!CheckAndRetrieveData()) return;
|
||||
|
||||
/// Retrieve data from list view items
|
||||
foreach (var item in partsListView.Items) UpdatePartFromLvi(item as ListViewItem, (item as ListViewItem).Tag as Part);
|
||||
|
||||
int ix = partsListView.SelectedIndices[0];
|
||||
if (ix > 0)
|
||||
{
|
||||
int tmpStepNr = (partsListView.Items[ix].Tag as Part).StepNumber;
|
||||
(partsListView.Items[ix].Tag as Part).StepNumber = (partsListView.Items[ix - 1].Tag as Part).StepNumber;
|
||||
(partsListView.Items[ix - 1].Tag as Part).StepNumber = tmpStepNr;
|
||||
|
||||
EditProcessCtrl.Data2UI(); /// Redraw all including worksteps
|
||||
|
||||
partsListView.Focus();
|
||||
partsListView.Items[ix - 1].Selected = true;
|
||||
partsListView.Items[ix - 1].EnsureVisible();
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void partDownButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (partsListView.SelectedItems.Count != 1) return;
|
||||
|
||||
if (!CheckAndRetrieveData()) return;
|
||||
|
||||
int ix = partsListView.SelectedIndices[0];
|
||||
if (ix < partsListView.Items.Count - 1)
|
||||
{
|
||||
int tmpStepNr = (partsListView.Items[ix].Tag as Part).StepNumber;
|
||||
(partsListView.Items[ix].Tag as Part).StepNumber = (partsListView.Items[ix + 1].Tag as Part).StepNumber;
|
||||
(partsListView.Items[ix + 1].Tag as Part).StepNumber = tmpStepNr;
|
||||
|
||||
EditProcessCtrl.Data2UI(); /// Redraw all including worksteps
|
||||
|
||||
partsListView.Focus();
|
||||
partsListView.Items[ix + 1].Selected = true;
|
||||
partsListView.Items[ix + 1].EnsureVisible();
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void addPartToWorkstepButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((partsListView.SelectedItems.Count == 1) &&
|
||||
EditProcessCtrl.AddPartsToCurrentWorkstep(partsListView.Items[partsListView.SelectedIndices[0]].Tag as Part))
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void removePartFromWorkstepButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Part removedPart = EditProcessCtrl.RemovePartFromCurrentWorkstep();
|
||||
if (removedPart != null)
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ImportParts()
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextReader reader = new StreamReader(dlg.FileName))
|
||||
{
|
||||
bool partOK;
|
||||
int partsCount = 0;
|
||||
do
|
||||
{
|
||||
partOK = false;
|
||||
string line = reader.ReadLine();
|
||||
if (line != null)
|
||||
{
|
||||
string[] items = line.Split(new char[] { ';' });
|
||||
if (items.Length >= 4)
|
||||
{
|
||||
Part newPart = new Part(items[2], currentProcess, items[3]);
|
||||
newPart.StepNumber = ++partsCount;
|
||||
currentProcess.Parts.Add(newPart);
|
||||
partsListView.Items.Add(Part2Lvi(newPart));
|
||||
partOK = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (partOK);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show(Strings.Failed_to_import_a_list_of_parts,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void partsListView_ItemChecked(object sender, ItemCheckedEventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
if (completeUnlock && (e.Item.Tag is Part))
|
||||
{
|
||||
if (!CheckAndRetrieveData()) return;
|
||||
|
||||
(e.Item.Tag as Part).CodeLocation = e.Item.Checked ? CodeLocation.OnPart : CodeLocation.OnPallet;
|
||||
EditProcessCtrl.Data2UI();
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void partsListView_ItemCheck(object sender, ItemCheckEventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
if (!completeUnlock)
|
||||
{
|
||||
e.NewValue = (e.NewValue == CheckState.Checked) ? CheckState.Unchecked : CheckState.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks data and retrieves them from UI.
|
||||
/// Displays a message box with related message when data are NOK.
|
||||
/// </summary>
|
||||
/// <returns>true when data valid and retrieved from UI</returns>
|
||||
bool CheckAndRetrieveData()
|
||||
{
|
||||
/// Verify data in list view items
|
||||
string message;
|
||||
if (!VerifyUIData(out message))
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Invalid_data_0, message),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Retrieve data from list view items
|
||||
foreach (var item in partsListView.Items) UpdatePartFromLvi(item as ListViewItem, (item as ListViewItem).Tag as Part);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/UserControls/PartsCtrl.resx
Normal file
120
WorkflowConfigurator/UserControls/PartsCtrl.resx
Normal 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>
|
||||
203
WorkflowConfigurator/UserControls/WorkstepCtrl.Designer.cs
generated
Normal file
203
WorkflowConfigurator/UserControls/WorkstepCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,203 @@
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
partial class WorkstepCtrl
|
||||
{
|
||||
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.refPartComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.refPartLabel = new System.Windows.Forms.Label();
|
||||
this.workstepDescriptionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.workstepNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.workstepDescriptionLabel = new System.Windows.Forms.Label();
|
||||
this.workstepNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.listBox2 = new System.Windows.Forms.ListBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.refPartComboBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.refPartLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.workstepDescriptionTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.workstepNameTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.workstepDescriptionLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.workstepNameLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(622, 420);
|
||||
this.splitContainer1.SplitterDistance = 80;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// refPartComboBox
|
||||
//
|
||||
this.refPartComboBox.FormattingEnabled = true;
|
||||
this.refPartComboBox.Location = new System.Drawing.Point(114, 57);
|
||||
this.refPartComboBox.Name = "refPartComboBox";
|
||||
this.refPartComboBox.Size = new System.Drawing.Size(282, 21);
|
||||
this.refPartComboBox.TabIndex = 13;
|
||||
this.refPartComboBox.SelectedIndexChanged += new System.EventHandler(this.refPartComboBox_SelectedIndexChanged);
|
||||
this.refPartComboBox.TextChanged += new System.EventHandler(this.refPartComboBox_TextChanged);
|
||||
//
|
||||
// refPartLabel
|
||||
//
|
||||
this.refPartLabel.AutoSize = true;
|
||||
this.refPartLabel.Location = new System.Drawing.Point(14, 61);
|
||||
this.refPartLabel.Name = "refPartLabel";
|
||||
this.refPartLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.refPartLabel.TabIndex = 9;
|
||||
this.refPartLabel.Text = "Ref. part";
|
||||
//
|
||||
// workstepDescriptionTextBox
|
||||
//
|
||||
this.workstepDescriptionTextBox.Enabled = false;
|
||||
this.workstepDescriptionTextBox.Location = new System.Drawing.Point(114, 34);
|
||||
this.workstepDescriptionTextBox.Name = "workstepDescriptionTextBox";
|
||||
this.workstepDescriptionTextBox.Size = new System.Drawing.Size(496, 20);
|
||||
this.workstepDescriptionTextBox.TabIndex = 8;
|
||||
this.workstepDescriptionTextBox.TextChanged += new System.EventHandler(this.workstepDescriptionTextBox_TextChanged);
|
||||
//
|
||||
// workstepNameTextBox
|
||||
//
|
||||
this.workstepNameTextBox.Enabled = false;
|
||||
this.workstepNameTextBox.Location = new System.Drawing.Point(114, 11);
|
||||
this.workstepNameTextBox.Name = "workstepNameTextBox";
|
||||
this.workstepNameTextBox.Size = new System.Drawing.Size(282, 20);
|
||||
this.workstepNameTextBox.TabIndex = 7;
|
||||
this.workstepNameTextBox.TextChanged += new System.EventHandler(this.workstepNameTextBox_TextChanged);
|
||||
//
|
||||
// workstepDescriptionLabel
|
||||
//
|
||||
this.workstepDescriptionLabel.AutoSize = true;
|
||||
this.workstepDescriptionLabel.Location = new System.Drawing.Point(14, 38);
|
||||
this.workstepDescriptionLabel.Name = "workstepDescriptionLabel";
|
||||
this.workstepDescriptionLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.workstepDescriptionLabel.TabIndex = 6;
|
||||
this.workstepDescriptionLabel.Text = "Description:";
|
||||
//
|
||||
// workstepNameLabel
|
||||
//
|
||||
this.workstepNameLabel.AutoSize = true;
|
||||
this.workstepNameLabel.Location = new System.Drawing.Point(14, 15);
|
||||
this.workstepNameLabel.Name = "workstepNameLabel";
|
||||
this.workstepNameLabel.Size = new System.Drawing.Size(78, 13);
|
||||
this.workstepNameLabel.TabIndex = 5;
|
||||
this.workstepNameLabel.Text = "Workflow step:";
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.listBox1);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.listBox2);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(622, 336);
|
||||
this.splitContainer2.SplitterDistance = 110;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(622, 110);
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
//
|
||||
// listBox2
|
||||
//
|
||||
this.listBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox2.FormattingEnabled = true;
|
||||
this.listBox2.Location = new System.Drawing.Point(0, 0);
|
||||
this.listBox2.Name = "listBox2";
|
||||
this.listBox2.Size = new System.Drawing.Size(622, 222);
|
||||
this.listBox2.TabIndex = 0;
|
||||
this.listBox2.SelectedIndexChanged += new System.EventHandler(this.listBox2_SelectedIndexChanged);
|
||||
//
|
||||
// WorkstepCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "WorkstepCtrl";
|
||||
this.Size = new System.Drawing.Size(622, 420);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private System.Windows.Forms.ListBox listBox2;
|
||||
private System.Windows.Forms.TextBox workstepDescriptionTextBox;
|
||||
private System.Windows.Forms.TextBox workstepNameTextBox;
|
||||
private System.Windows.Forms.Label workstepDescriptionLabel;
|
||||
private System.Windows.Forms.Label workstepNameLabel;
|
||||
private System.Windows.Forms.Label refPartLabel;
|
||||
private System.Windows.Forms.ComboBox refPartComboBox;
|
||||
|
||||
}
|
||||
}
|
||||
273
WorkflowConfigurator/UserControls/WorkstepCtrl.cs
Normal file
273
WorkflowConfigurator/UserControls/WorkstepCtrl.cs
Normal file
@ -0,0 +1,273 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase.Entities;
|
||||
using WorkflowConfigurator.Resources;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public partial class WorkstepCtrl : UserControl, IMyUI
|
||||
{
|
||||
bool unsavedChanges;
|
||||
bool suppressNotifications;
|
||||
bool limitedUnlock;
|
||||
bool completeUnlock;
|
||||
|
||||
WorkstepsCtrl wstepsCtrl;
|
||||
TabPage tabPage;
|
||||
|
||||
Process process;
|
||||
Workstep workstep;
|
||||
|
||||
/// <summary> Constructor </summary>
|
||||
public WorkstepCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
suppressNotifications = false;
|
||||
}
|
||||
|
||||
public WorkstepCtrl(WorkstepsCtrl workstepsCtrl, TabPage tabPage, Process process, Workstep workstep)
|
||||
: this()
|
||||
{
|
||||
this.wstepsCtrl = workstepsCtrl;
|
||||
this.tabPage = tabPage;
|
||||
this.process = process;
|
||||
this.workstep = workstep;
|
||||
Data2UI();
|
||||
}
|
||||
|
||||
/// <summary> Localizes constant strings </summary>
|
||||
void Localize()
|
||||
{
|
||||
workstepNameLabel.Text = Strings.Workstep;
|
||||
workstepDescriptionLabel.Text = Strings.Description;
|
||||
refPartLabel.Text = Strings.Reference_part;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable/hide UI elements based on lock/unlock/complete unlock state
|
||||
/// </summary>
|
||||
/// <param name="unlock">true = unlock for released processes</param>
|
||||
/// <param name="completely">true = unlock for processes in preparation (complete unlock)</param>
|
||||
public void UpdateLockState(bool unlock, bool completely)
|
||||
{
|
||||
workstepNameTextBox.Enabled = completely;
|
||||
workstepDescriptionTextBox.Enabled = unlock;
|
||||
refPartComboBox.Enabled = completely;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates UI elements with workstep data entities.
|
||||
/// </summary>
|
||||
public void Data2UI()
|
||||
{
|
||||
suppressNotifications = true;
|
||||
|
||||
workstepNameTextBox.Text = workstep.Name;
|
||||
workstepDescriptionTextBox.Text = workstep.Description;
|
||||
|
||||
/// Show reference part, update combo box items
|
||||
refPartComboBox.Items.Clear();
|
||||
refPartComboBox.Items.Add(Strings._none_);
|
||||
foreach (var p in process.Parts)
|
||||
{
|
||||
if (p.CodeLocation == SharedDatabase.CodeLocation.OnPart) refPartComboBox.Items.Add(p.ToString());
|
||||
}
|
||||
refPartComboBox.Text = (workstep.ReferencePart != null) ? workstep.ReferencePart.ToString() : Strings._none_;
|
||||
|
||||
/// Sort non-reference workstep parts before displaying
|
||||
Part[] sortedParts = new Part[workstep.Parts.Count];
|
||||
int i = 0;
|
||||
foreach (var part in this.workstep.Parts) sortedParts[i++] = part;
|
||||
Array.Sort(sortedParts, (Part part1, Part part2) => part1.StepNumber.CompareTo(part2.StepNumber));
|
||||
|
||||
/// Display non-reference workstep parts
|
||||
listBox1.Items.Clear();
|
||||
listBox2.Items.Clear();
|
||||
foreach (var p in sortedParts)
|
||||
{
|
||||
if (p.CodeLocation == SharedDatabase.CodeLocation.OnPart)
|
||||
{
|
||||
listBox1.Items.Add(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
listBox2.Items.Add(p);
|
||||
}
|
||||
}
|
||||
|
||||
suppressNotifications = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates data in UI elements.
|
||||
/// </summary>
|
||||
/// <param name="message">Explanation message when UI data are NOT OK and this function returns false</param>
|
||||
/// <returns>true when data are OK</returns>
|
||||
public bool VerifyUIData(out string message)
|
||||
{
|
||||
bool allValid = true;
|
||||
message = string.Empty;
|
||||
|
||||
/// Reference part
|
||||
if (!refPartComboBox.Items.Contains(refPartComboBox.Text))
|
||||
{
|
||||
message += string.Format(Strings.Invalid_0, Strings.Reference_part) + Environment.NewLine;
|
||||
allValid = false;
|
||||
}
|
||||
|
||||
return allValid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates workstep data entities from UI elements.
|
||||
/// </summary>
|
||||
public void UI2Data()
|
||||
{
|
||||
UI2Data(workstep.WorkstepNr);
|
||||
}
|
||||
|
||||
public void UI2Data(int workstepNr)
|
||||
{
|
||||
workstep.WorkstepNr = workstepNr;
|
||||
workstep.Name = workstepNameTextBox.Text;
|
||||
workstep.Description = workstepDescriptionTextBox.Text;
|
||||
|
||||
foreach (var part in process.Parts)
|
||||
{
|
||||
if (part.ToString().Equals(refPartComboBox.Text))
|
||||
{
|
||||
workstep.ReferencePart = part;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateProcess(Process process, Reason reason, IList<Process> allProcesses) { }
|
||||
public void Settings2UI() { }
|
||||
public void UI2Settings() { }
|
||||
|
||||
public void ResetUnsavedFlag()
|
||||
{
|
||||
unsavedChanges = false;
|
||||
}
|
||||
|
||||
public void SetUnsavedFlag()
|
||||
{
|
||||
if (!suppressNotifications)
|
||||
{
|
||||
unsavedChanges = true;
|
||||
wstepsCtrl.SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool AddPart(Part part)
|
||||
{
|
||||
if (part == null)
|
||||
{
|
||||
return true; /// There was no part to add = OK
|
||||
}
|
||||
else if (part == workstep.ReferencePart)
|
||||
{
|
||||
MessageBox.Show(Strings.Selected_part_is_the_reference_part_in_this_workstep,
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
return false; /// NOK
|
||||
}
|
||||
else if (workstep.Parts.Contains(part))
|
||||
{
|
||||
MessageBox.Show(Strings.Selected_part_is_already_used_in_this_workstep,
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
return false; /// NOK
|
||||
}
|
||||
|
||||
part.Workstep = workstep;
|
||||
workstep.Parts.Add(part);
|
||||
|
||||
Data2UI();
|
||||
|
||||
return true; /// Part added = OK
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a part from UI and Workstep entity.
|
||||
/// Returns the part to be deleted from the DB.
|
||||
/// </summary>
|
||||
/// <returns>Part to be deleted from the DB</returns>
|
||||
public Part RemovePart()
|
||||
{
|
||||
ListBox currentListBox;
|
||||
|
||||
if (listBox1.SelectedIndices.Count == 1 && listBox2.SelectedIndices.Count == 0)
|
||||
{
|
||||
currentListBox = listBox1;
|
||||
}
|
||||
else if (listBox1.SelectedIndices.Count == 0 && listBox2.SelectedIndices.Count == 1)
|
||||
{
|
||||
currentListBox = listBox2;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int ix = currentListBox.SelectedIndex;
|
||||
Part partToBedeleted = currentListBox.Items[ix] as Part;
|
||||
currentListBox.Items.RemoveAt(ix);
|
||||
workstep.Parts.Remove(partToBedeleted);
|
||||
partToBedeleted.Workstep = null;
|
||||
return partToBedeleted;
|
||||
}
|
||||
|
||||
|
||||
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
if (listBox1.SelectedIndices.Count == 1)
|
||||
{
|
||||
listBox2.SelectedIndices.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
if (listBox2.SelectedIndices.Count == 1)
|
||||
{
|
||||
listBox1.SelectedIndices.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void workstepNameTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
tabPage.Text = workstepNameTextBox.Text;
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
|
||||
private void workstepDescriptionTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
|
||||
private void refPartComboBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
|
||||
private void refPartComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (suppressNotifications) return;
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/UserControls/WorkstepCtrl.resx
Normal file
120
WorkflowConfigurator/UserControls/WorkstepCtrl.resx
Normal 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>
|
||||
135
WorkflowConfigurator/UserControls/WorkstepsCtrl.Designer.cs
generated
Normal file
135
WorkflowConfigurator/UserControls/WorkstepsCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,135 @@
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
partial class WorkstepsCtrl
|
||||
{
|
||||
/// <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.removeWsButton = new System.Windows.Forms.Button();
|
||||
this.addWsButton = new System.Windows.Forms.Button();
|
||||
this.analyzeButton = new System.Windows.Forms.Button();
|
||||
this.workstepsTabControl = new WorkflowConfigurator.UserControls.DraggableTabControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
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.Controls.Add(this.analyzeButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.removeWsButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.addWsButton);
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.workstepsTabControl);
|
||||
this.splitContainer.Size = new System.Drawing.Size(300, 321);
|
||||
this.splitContainer.SplitterDistance = 30;
|
||||
this.splitContainer.SplitterWidth = 1;
|
||||
this.splitContainer.TabIndex = 0;
|
||||
//
|
||||
// removeWsButton
|
||||
//
|
||||
this.removeWsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.removeWsButton.Enabled = false;
|
||||
this.removeWsButton.Location = new System.Drawing.Point(140, 5);
|
||||
this.removeWsButton.Name = "removeWsButton";
|
||||
this.removeWsButton.Size = new System.Drawing.Size(75, 22);
|
||||
this.removeWsButton.TabIndex = 6;
|
||||
this.removeWsButton.Text = "Remove";
|
||||
this.removeWsButton.UseVisualStyleBackColor = true;
|
||||
this.removeWsButton.Click += new System.EventHandler(this.removeWsButton_Click);
|
||||
//
|
||||
// addWsButton
|
||||
//
|
||||
this.addWsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.addWsButton.Enabled = false;
|
||||
this.addWsButton.Location = new System.Drawing.Point(60, 5);
|
||||
this.addWsButton.Name = "addWsButton";
|
||||
this.addWsButton.Size = new System.Drawing.Size(75, 22);
|
||||
this.addWsButton.TabIndex = 5;
|
||||
this.addWsButton.Text = "Add";
|
||||
this.addWsButton.UseVisualStyleBackColor = true;
|
||||
this.addWsButton.Click += new System.EventHandler(this.addWsButton_Click);
|
||||
//
|
||||
// analyzeButton
|
||||
//
|
||||
this.analyzeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.analyzeButton.Location = new System.Drawing.Point(220, 5);
|
||||
this.analyzeButton.Name = "analyzeButton";
|
||||
this.analyzeButton.Size = new System.Drawing.Size(75, 22);
|
||||
this.analyzeButton.TabIndex = 7;
|
||||
this.analyzeButton.Text = "Analyze";
|
||||
this.analyzeButton.UseVisualStyleBackColor = true;
|
||||
this.analyzeButton.Click += new System.EventHandler(this.analyzeButton_Click);
|
||||
//
|
||||
// workstepsTabControl
|
||||
//
|
||||
this.workstepsTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.workstepsTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.workstepsTabControl.Name = "workstepsTabControl";
|
||||
this.workstepsTabControl.SelectedIndex = 0;
|
||||
this.workstepsTabControl.Size = new System.Drawing.Size(300, 290);
|
||||
this.workstepsTabControl.TabIndex = 1;
|
||||
this.workstepsTabControl.SelectedIndexChanged += new System.EventHandler(this.workstepsTabControl_SelectedIndexChanged);
|
||||
this.workstepsTabControl.Selected += new System.Windows.Forms.TabControlEventHandler(this.workstepsTabControl_Selected);
|
||||
this.workstepsTabControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.workstepsTabControl_MouseUp);
|
||||
//
|
||||
// WorkstepsCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer);
|
||||
this.Name = "WorkstepsCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 321);
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer;
|
||||
private System.Windows.Forms.Button addWsButton;
|
||||
private System.Windows.Forms.Button removeWsButton;
|
||||
private DraggableTabControl workstepsTabControl;
|
||||
private System.Windows.Forms.Button analyzeButton;
|
||||
|
||||
}
|
||||
}
|
||||
285
WorkflowConfigurator/UserControls/WorkstepsCtrl.cs
Normal file
285
WorkflowConfigurator/UserControls/WorkstepsCtrl.cs
Normal file
@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using WorkflowConfigurator.Resources;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace WorkflowConfigurator.UserControls
|
||||
{
|
||||
public partial class WorkstepsCtrl : UserControl, IMyUI
|
||||
{
|
||||
bool unsavedChanges;
|
||||
bool suppressNotifications;
|
||||
bool limitedUnlock;
|
||||
bool completeUnlock;
|
||||
|
||||
public EditProcessCtrl EditProcessCtrl; /// Parent control reference
|
||||
|
||||
Process currentProcess;
|
||||
Workstep currentWorkstep;
|
||||
WorkstepCtrl currentWsCtrl;
|
||||
string lastWorkstepName;
|
||||
|
||||
public WorkstepsCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
suppressNotifications = false;
|
||||
lastWorkstepName = string.Empty;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
addWsButton.Text = Strings.Add;
|
||||
removeWsButton.Text = Strings.Remove;
|
||||
}
|
||||
|
||||
public void UpdateProcess(Process process, Reason reason, IList<Process> allProcesses)
|
||||
{
|
||||
this.currentProcess = process;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable/hide UI elements based on lock/unlock/complete unlock state
|
||||
/// </summary>
|
||||
/// <param name="unlock">true = unlock for released processes</param>
|
||||
/// <param name="completely">true = unlock for processes in preparation (complete unlock)</param>
|
||||
public void UpdateLockState(bool unlock, bool completely)
|
||||
{
|
||||
limitedUnlock = unlock;
|
||||
completeUnlock = completely;
|
||||
|
||||
/// Enable or disable adding/removing/reordering worksteps
|
||||
addWsButton.Enabled = completely;
|
||||
removeWsButton.Enabled = completely;
|
||||
workstepsTabControl.AllowDrop = completely;
|
||||
|
||||
/// Propagate to subcontrols
|
||||
foreach (TabPage tp in workstepsTabControl.TabPages)
|
||||
{
|
||||
(tp.Controls[0] as IMyUI).UpdateLockState(unlock, completely);
|
||||
}
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
suppressNotifications = true;
|
||||
|
||||
string prefferedWorkstepName = (currentWorkstep != null) ? currentWorkstep.Name : lastWorkstepName;
|
||||
|
||||
workstepsTabControl.TabPages.Clear();
|
||||
workstepsTabControl.TabOrderChanged = false;
|
||||
|
||||
currentWorkstep = null;
|
||||
currentWsCtrl = null;
|
||||
|
||||
if ((currentProcess != null) && (currentProcess.Worksteps != null))
|
||||
{
|
||||
/// Sort worksteps by WorkstepNr before displaying
|
||||
List<Workstep> displayedWorksteps = new List<Workstep>();
|
||||
foreach (var ws in currentProcess.Worksteps) displayedWorksteps.Add(ws);
|
||||
displayedWorksteps.Sort(delegate(Workstep x, Workstep y) { return x.WorkstepNr.CompareTo(y.WorkstepNr); });
|
||||
|
||||
int tabIx = 0;
|
||||
int selectedtabIx = -1;
|
||||
foreach (var ws in displayedWorksteps)
|
||||
{
|
||||
WorkstepCtrl wsCtrl = AddWorkstepToTabs(ws);
|
||||
|
||||
if (ws.Name == prefferedWorkstepName)
|
||||
{
|
||||
lastWorkstepName = prefferedWorkstepName;
|
||||
currentWorkstep = ws;
|
||||
currentWsCtrl = wsCtrl;
|
||||
selectedtabIx = tabIx;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentWorkstep == null)
|
||||
{
|
||||
currentWorkstep = ws;
|
||||
currentWsCtrl = wsCtrl;
|
||||
selectedtabIx = tabIx;
|
||||
}
|
||||
}
|
||||
|
||||
tabIx++;
|
||||
}
|
||||
|
||||
if (selectedtabIx >= 0)
|
||||
{
|
||||
workstepsTabControl.SelectedIndex = selectedtabIx;
|
||||
}
|
||||
}
|
||||
|
||||
suppressNotifications = false;
|
||||
}
|
||||
|
||||
public bool VerifyUIData(out string message)
|
||||
{
|
||||
bool uiDataValid = true;
|
||||
message = string.Empty;
|
||||
|
||||
foreach (TabPage tp in workstepsTabControl.TabPages)
|
||||
{
|
||||
string msg;
|
||||
if ((tp.Controls.Count > 0) && (tp.Controls[0] is WorkstepCtrl) && !(tp.Controls[0] as WorkstepCtrl).VerifyUIData(out msg))
|
||||
{
|
||||
message += string.Format("{0} in workstep {1}", msg, (tp.Tag as Workstep).Name);
|
||||
uiDataValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
return uiDataValid;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
int workstepNr = 1;
|
||||
foreach (TabPage tp in workstepsTabControl.TabPages)
|
||||
{
|
||||
if ((tp.Controls.Count > 0) && (tp.Controls[0] is WorkstepCtrl))
|
||||
{
|
||||
(tp.Controls[0] as WorkstepCtrl).UI2Data(workstepNr++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Settings2UI()
|
||||
{
|
||||
lastWorkstepName = Program.LocalSettings.LastWorkstep;
|
||||
}
|
||||
|
||||
public void UI2Settings()
|
||||
{
|
||||
Program.LocalSettings.LastWorkstep = (currentWorkstep != null) ? currentWorkstep.Name : lastWorkstepName;
|
||||
}
|
||||
|
||||
public void ResetUnsavedFlag()
|
||||
{
|
||||
unsavedChanges = false;
|
||||
workstepsTabControl.TabOrderChanged = false;
|
||||
}
|
||||
|
||||
public void SetUnsavedFlag()
|
||||
{
|
||||
if (!suppressNotifications)
|
||||
{
|
||||
unsavedChanges = true;
|
||||
EditProcessCtrl.SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool AddPartsToCurrentWorkstep(Part part)
|
||||
{
|
||||
if (currentWsCtrl != null)
|
||||
{
|
||||
return currentWsCtrl.AddPart(part);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public Part RemovePartFromCurrentWorkstep()
|
||||
{
|
||||
return currentWsCtrl.RemovePart();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new workstep tab page.
|
||||
/// Called from Data2UI() and addWsButton_Click()
|
||||
/// </summary>
|
||||
/// <param name="ws">Workstep to be displayed</param>
|
||||
/// <returns>Created WorkstepCtrl</returns>
|
||||
WorkstepCtrl AddWorkstepToTabs(Workstep ws)
|
||||
{
|
||||
TabPage tabPage = new TabPage(ws.Name);
|
||||
WorkstepCtrl wsCtrl = new WorkstepCtrl(this, tabPage, currentProcess, ws);
|
||||
wsCtrl.Dock = DockStyle.Fill;
|
||||
wsCtrl.UpdateLockState(limitedUnlock, completeUnlock);
|
||||
tabPage.Tag = ws;
|
||||
tabPage.Controls.Add(wsCtrl);
|
||||
workstepsTabControl.TabPages.Add(tabPage);
|
||||
|
||||
return wsCtrl;
|
||||
}
|
||||
|
||||
private void addWsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
int wsNr = currentProcess.Worksteps.Count + 1;
|
||||
Workstep ws = new Workstep(wsNr, string.Format("Workstep {0}", wsNr), currentProcess);
|
||||
|
||||
currentProcess.Worksteps.Add(ws);
|
||||
WorkstepCtrl wsCtrl = AddWorkstepToTabs(ws);
|
||||
workstepsTabControl.SelectedIndex = wsNr - 1;
|
||||
|
||||
lastWorkstepName = ws.Name;
|
||||
currentWorkstep = ws;
|
||||
currentWsCtrl = wsCtrl;
|
||||
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
|
||||
|
||||
private void removeWsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string wsName = workstepsTabControl.SelectedTab.Text;
|
||||
|
||||
if (MessageBox.Show(string.Format("Do you really want to delete workstep {0}?", wsName), "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditProcessCtrl.WorkstepsToBeDeleted.Add(currentWorkstep);
|
||||
currentProcess.Worksteps.Remove(currentWorkstep);
|
||||
workstepsTabControl.TabPages.Remove(workstepsTabControl.SelectedTab);
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
|
||||
private void workstepsTabControl_Selected(object sender, TabControlEventArgs e)
|
||||
{
|
||||
if (e.TabPage != null)
|
||||
{
|
||||
currentWorkstep = e.TabPage.Tag as Workstep;
|
||||
currentWsCtrl = e.TabPage.Controls[0] as WorkstepCtrl;
|
||||
}
|
||||
|
||||
if (workstepsTabControl.TabOrderChanged)
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void workstepsTabControl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (workstepsTabControl.SelectedTab != null)
|
||||
{
|
||||
currentWorkstep = workstepsTabControl.SelectedTab.Tag as Workstep;
|
||||
currentWsCtrl = workstepsTabControl.SelectedTab.Controls[0] as WorkstepCtrl;
|
||||
}
|
||||
|
||||
if (workstepsTabControl.TabOrderChanged)
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void workstepsTabControl_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (workstepsTabControl.TabOrderChanged)
|
||||
{
|
||||
SetUnsavedFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void analyzeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
new Forms.WorkflowAnalysisDlg(SharedDatabase.TracingDB.Session, currentProcess).ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
WorkflowConfigurator/UserControls/WorkstepsCtrl.resx
Normal file
120
WorkflowConfigurator/UserControls/WorkstepsCtrl.resx
Normal 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>
|
||||
34
WorkflowConfigurator/Utils.cs
Normal file
34
WorkflowConfigurator/Utils.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace WorkflowConfigurator
|
||||
{
|
||||
/// <summary> Specifies the way a window or control is redrawn </summary>
|
||||
public enum RedrawType
|
||||
{
|
||||
FromScratch,
|
||||
Iterative,
|
||||
}
|
||||
|
||||
/// <summary> Return value for FinishEditing() function. Caller does not have to care for details/UI/message boxes </summary>
|
||||
public enum EditFinishedInfo
|
||||
{
|
||||
NoChanges,
|
||||
DataChanged,
|
||||
Cancel,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When state of UI changes
|
||||
/// </summary>
|
||||
public enum Reason
|
||||
{
|
||||
NewProcess,
|
||||
CopyProcess,
|
||||
OpenProcess,
|
||||
UnlockBtn,
|
||||
PrepareBtn,
|
||||
TestBtn,
|
||||
ReleaseBtn,
|
||||
DeactivateBtn,
|
||||
}
|
||||
}
|
||||
246
WorkflowConfigurator/WorkflowConfigurator.csproj
Normal file
246
WorkflowConfigurator/WorkflowConfigurator.csproj
Normal file
@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{AE275D47-A33B-47E6-9541-B6EA29D12434}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WorkflowConfigurator</RootNamespace>
|
||||
<AssemblyName>WorkflowConfigurator</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>WorkflowConfigurator.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\EditOrAbandonMsgBox.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditOrAbandonMsgBox.Designer.cs">
|
||||
<DependentUpon>EditOrAbandonMsgBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\PartDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\PartDlg.designer.cs">
|
||||
<DependentUpon>PartDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\WorkflowAnalysisDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\WorkflowAnalysisDlg.Designer.cs">
|
||||
<DependentUpon>WorkflowAnalysisDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ShowRecordsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ShowRecordsForm.Designer.cs">
|
||||
<DependentUpon>ShowRecordsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\IMyUI.cs" />
|
||||
<Compile Include="UserControls\PartsCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\PartsCtrl.Designer.cs">
|
||||
<DependentUpon>PartsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\WorkstepsCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\WorkstepsCtrl.Designer.cs">
|
||||
<DependentUpon>WorkstepsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utils.cs" />
|
||||
<Compile Include="Forms\SettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SettingsDlg.designer.cs">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalSettings.cs" />
|
||||
<Compile Include="MainWnd.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWnd.Designer.cs">
|
||||
<DependentUpon>MainWnd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\DraggableTabControl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\EditProcessCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\EditProcessCtrl.Designer.cs">
|
||||
<DependentUpon>EditProcessCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\OverviewOfProcessesCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\OverviewOfProcessesCtrl.designer.cs">
|
||||
<DependentUpon>OverviewOfProcessesCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\WorkstepCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\WorkstepCtrl.designer.cs">
|
||||
<DependentUpon>WorkstepCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Forms\EditOrAbandonMsgBox.resx">
|
||||
<DependentUpon>EditOrAbandonMsgBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\PartDlg.resx">
|
||||
<DependentUpon>PartDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\WorkflowAnalysisDlg.resx">
|
||||
<DependentUpon>WorkflowAnalysisDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SettingsDlg.resx">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ShowRecordsForm.resx">
|
||||
<DependentUpon>ShowRecordsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainWnd.resx">
|
||||
<DependentUpon>MainWnd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.sk.resx" />
|
||||
<EmbeddedResource Include="UserControls\EditProcessCtrl.resx">
|
||||
<DependentUpon>EditProcessCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\OverviewOfProcessesCtrl.resx">
|
||||
<DependentUpon>OverviewOfProcessesCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\PartsCtrl.resx">
|
||||
<DependentUpon>PartsCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\WorkstepCtrl.resx">
|
||||
<DependentUpon>WorkstepCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\WorkstepsCtrl.resx">
|
||||
<DependentUpon>WorkstepsCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Pictures\0.bmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pictures\1.bmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pictures\2.bmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pictures\3.bmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pictures\4.bmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SampleConfig\log4netConfig.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common\Common.csproj">
|
||||
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj">
|
||||
<Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project>
|
||||
<Name>SharedDatabase</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
3
WorkflowConfigurator/app.config
Normal file
3
WorkflowConfigurator/app.config
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
Loading…
Reference in New Issue
Block a user