init: 潍柴发动机线 中央控制程序 项目首次入库

This commit is contained in:
XingCheng3
2026-06-08 12:05:16 +08:00
commit 196c66b9ff
547 changed files with 379162 additions and 0 deletions

260
SCADA/弹出窗口/D_Station.Designer.cs generated Normal file
View File

@@ -0,0 +1,260 @@
namespace MesToMs
{
partial class D_Station
{
/// <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.label3 = new System.Windows.Forms.Label();
this.txt_StationCode = new System.Windows.Forms.TextBox();
this.btn_Sure = new System.Windows.Forms.Button();
this.btn_Cancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.txt_StationName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txt_OpCode = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txt_OpName = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txt_IP = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txt_Zone = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.txt_StationType = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.txt_Enable_MES = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(84, 34);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 0;
this.label3.Text = "工位号";
//
// txt_StationCode
//
this.txt_StationCode.Location = new System.Drawing.Point(137, 29);
this.txt_StationCode.Multiline = true;
this.txt_StationCode.Name = "txt_StationCode";
this.txt_StationCode.Size = new System.Drawing.Size(212, 23);
this.txt_StationCode.TabIndex = 1;
//
// btn_Sure
//
this.btn_Sure.Location = new System.Drawing.Point(137, 277);
this.btn_Sure.Name = "btn_Sure";
this.btn_Sure.Size = new System.Drawing.Size(75, 30);
this.btn_Sure.TabIndex = 2;
this.btn_Sure.Text = "确定";
this.btn_Sure.UseVisualStyleBackColor = true;
this.btn_Sure.Click += new System.EventHandler(this.btn_Sure_Click);
//
// btn_Cancel
//
this.btn_Cancel.Location = new System.Drawing.Point(217, 277);
this.btn_Cancel.Name = "btn_Cancel";
this.btn_Cancel.Size = new System.Drawing.Size(75, 30);
this.btn_Cancel.TabIndex = 2;
this.btn_Cancel.Text = "取消";
this.btn_Cancel.UseVisualStyleBackColor = true;
this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(72, 63);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "工位名称";
//
// txt_StationName
//
this.txt_StationName.Location = new System.Drawing.Point(137, 58);
this.txt_StationName.Multiline = true;
this.txt_StationName.Name = "txt_StationName";
this.txt_StationName.Size = new System.Drawing.Size(212, 23);
this.txt_StationName.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(84, 92);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 0;
this.label2.Text = "工序号";
//
// txt_OpCode
//
this.txt_OpCode.Location = new System.Drawing.Point(137, 87);
this.txt_OpCode.Multiline = true;
this.txt_OpCode.Name = "txt_OpCode";
this.txt_OpCode.Size = new System.Drawing.Size(212, 23);
this.txt_OpCode.TabIndex = 1;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(72, 121);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 0;
this.label4.Text = "工序名称";
//
// txt_OpName
//
this.txt_OpName.Location = new System.Drawing.Point(137, 116);
this.txt_OpName.Multiline = true;
this.txt_OpName.Name = "txt_OpName";
this.txt_OpName.Size = new System.Drawing.Size(212, 23);
this.txt_OpName.TabIndex = 1;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(108, 150);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(17, 12);
this.label5.TabIndex = 0;
this.label5.Text = "IP";
//
// txt_IP
//
this.txt_IP.Location = new System.Drawing.Point(137, 145);
this.txt_IP.Multiline = true;
this.txt_IP.Name = "txt_IP";
this.txt_IP.Size = new System.Drawing.Size(212, 23);
this.txt_IP.TabIndex = 1;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(72, 184);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(53, 12);
this.label13.TabIndex = 0;
this.label13.Text = "区域代码";
//
// txt_Zone
//
this.txt_Zone.Location = new System.Drawing.Point(137, 179);
this.txt_Zone.Multiline = true;
this.txt_Zone.Name = "txt_Zone";
this.txt_Zone.Size = new System.Drawing.Size(212, 23);
this.txt_Zone.TabIndex = 1;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(72, 213);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(53, 12);
this.label14.TabIndex = 0;
this.label14.Text = "工位类型";
//
// txt_StationType
//
this.txt_StationType.Location = new System.Drawing.Point(137, 208);
this.txt_StationType.Multiline = true;
this.txt_StationType.Name = "txt_StationType";
this.txt_StationType.Size = new System.Drawing.Size(212, 23);
this.txt_StationType.TabIndex = 1;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(54, 242);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(71, 12);
this.label15.TabIndex = 0;
this.label15.Text = "是否启用MES";
//
// txt_Enable_MES
//
this.txt_Enable_MES.Location = new System.Drawing.Point(137, 237);
this.txt_Enable_MES.Multiline = true;
this.txt_Enable_MES.Name = "txt_Enable_MES";
this.txt_Enable_MES.Size = new System.Drawing.Size(212, 23);
this.txt_Enable_MES.TabIndex = 1;
//
// D_Station
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(438, 333);
this.Controls.Add(this.btn_Cancel);
this.Controls.Add(this.btn_Sure);
this.Controls.Add(this.txt_Enable_MES);
this.Controls.Add(this.label15);
this.Controls.Add(this.txt_StationType);
this.Controls.Add(this.label14);
this.Controls.Add(this.txt_Zone);
this.Controls.Add(this.label13);
this.Controls.Add(this.txt_IP);
this.Controls.Add(this.label5);
this.Controls.Add(this.txt_OpName);
this.Controls.Add(this.label4);
this.Controls.Add(this.txt_OpCode);
this.Controls.Add(this.label2);
this.Controls.Add(this.txt_StationName);
this.Controls.Add(this.label1);
this.Controls.Add(this.txt_StationCode);
this.Controls.Add(this.label3);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "D_Station";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "工位";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txt_StationCode;
private System.Windows.Forms.Button btn_Sure;
private System.Windows.Forms.Button btn_Cancel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txt_StationName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txt_OpCode;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txt_OpName;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txt_IP;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txt_Zone;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txt_StationType;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txt_Enable_MES;
}
}

View File

@@ -0,0 +1,163 @@
using SlMesDbIterface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
/// <summary>
///
/// </summary>
namespace MesToMs
{
/// <summary>
///
/// </summary>
public partial class D_Station : Form
{
/// <summary>
///
/// </summary>
public From_Opera from_Opera = From_Opera.Insert;
/// <summary>
///
/// </summary>
public string D_StationName = "";
/// <summary>
///
/// </summary>
public string D_工位名称 = "";
/// <summary>
///
/// </summary>
public string D_工序号 = "";
/// <summary>
///
/// </summary>
public string D_工序名称 = "";
/// <summary>
///
/// </summary>
public string D_PLC = "";
/// <summary>
///
/// </summary>
public string D_区域代码 = "";
/// <summary>
///
/// </summary>
public string D_机床类型 = "";
/// <summary>
///
/// </summary>
public string D_是否启用MES = "";
/// <summary>
///
/// </summary>
public D_Station()
{
InitializeComponent();
}
/// <summary>
///
/// </summary>
/// <param name="from_Opera"></param>
public D_Station(From_Opera from_Opera,string D_StationName, string D_工位名称, string D_工序号, string D_工序名称, string D_PLC
, string D_区域代码, string D_机床类型, string D_是否启用MES)
{
InitializeComponent();
switch (this.from_Opera = from_Opera)
{
case From_Opera.Insert:
Text = "添加工位";
txt_StationCode.ReadOnly = false;
break;
case From_Opera.Update:
Text = "修改工位";
txt_StationCode.Text = D_StationName;
txt_StationName.Text = D_工位名称;
txt_OpCode.Text = D_工序号;
txt_OpName.Text = D_工序名称;
txt_IP.Text = D_PLC;
txt_Zone.Text = D_区域代码;
txt_StationType.Text = D_机床类型;
txt_Enable_MES.Text = D_是否启用MES;
txt_StationCode.ReadOnly = true;
break;
default:
break;
}
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_Sure_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txt_StationCode.Text))
{
MessageBox.Show("请填写工位号!");
return;
}
if (string.IsNullOrEmpty(txt_StationName.Text))
{
MessageBox.Show("请填写工位名称!");
return;
}
if (string.IsNullOrEmpty(txt_OpCode.Text))
{
MessageBox.Show("请填写工序号!");
return;
}
if (string.IsNullOrEmpty(txt_OpName.Text))
{
MessageBox.Show("请填写工序名称!");
return;
}
if (string.IsNullOrEmpty(txt_IP.Text))
{
MessageBox.Show("请填写IP");
return;
}
if (string.IsNullOrEmpty(txt_Zone.Text))
{
MessageBox.Show("请填写区域代码!");
return;
}
if (string.IsNullOrEmpty(txt_StationType.Text))
{
MessageBox.Show("请填写工位类型!");
return;
}
if (string.IsNullOrEmpty(txt_Enable_MES.Text))
{
MessageBox.Show("请填写是否启用MES");
return;
}
D_StationName = txt_StationCode.Text;
D_工位名称 = txt_StationName.Text;
D_工序号 = txt_OpCode.Text;
D_工序名称 = txt_OpName.Text;
D_PLC = txt_IP.Text;
D_区域代码 = txt_Zone.Text;
D_机床类型 = txt_StationType.Text;
D_是否启用MES = txt_Enable_MES.Text;
DialogResult = DialogResult.OK;
}
private void btn_Cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}

View File

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