init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
+366
View File
@@ -0,0 +1,366 @@
namespace CommonLib.test
{
partial class FrmTestClient
{
/// <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.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnStartUpdate = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.txtSpeciesNo = new System.Windows.Forms.TextBox();
this.txtFileNum = new System.Windows.Forms.TextBox();
this.chkFileNum = new System.Windows.Forms.CheckBox();
this.txtFileIds = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtDiectoryId = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHeight = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtWidth = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtTop = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtLeft = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.CboType = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.btnDownloadBackground = new System.Windows.Forms.Button();
this.txtDownloadBackground = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(12, 2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(621, 366);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.btnStartUpdate);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.txtFileIds);
this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.txtDiectoryId);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.txtHeight);
this.tabPage1.Controls.Add(this.label5);
this.tabPage1.Controls.Add(this.txtWidth);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.txtTop);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.txtLeft);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.CboType);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(613, 340);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "批量上传下载";
this.tabPage1.UseVisualStyleBackColor = true;
//
// btnStartUpdate
//
this.btnStartUpdate.Location = new System.Drawing.Point(266, 292);
this.btnStartUpdate.Name = "btnStartUpdate";
this.btnStartUpdate.Size = new System.Drawing.Size(186, 23);
this.btnStartUpdate.TabIndex = 15;
this.btnStartUpdate.Text = "开始调用外部程序";
this.btnStartUpdate.UseVisualStyleBackColor = true;
this.btnStartUpdate.Click += new System.EventHandler(this.btnStartUpdate_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.txtSpeciesNo);
this.groupBox1.Controls.Add(this.txtFileNum);
this.groupBox1.Controls.Add(this.chkFileNum);
this.groupBox1.Location = new System.Drawing.Point(81, 223);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(483, 45);
this.groupBox1.TabIndex = 14;
this.groupBox1.TabStop = false;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(294, 20);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(77, 12);
this.label8.TabIndex = 9;
this.label8.Text = "物料类别编码";
//
// txtSpeciesNo
//
this.txtSpeciesNo.Location = new System.Drawing.Point(377, 15);
this.txtSpeciesNo.Name = "txtSpeciesNo";
this.txtSpeciesNo.Size = new System.Drawing.Size(100, 21);
this.txtSpeciesNo.TabIndex = 7;
//
// txtFileNum
//
this.txtFileNum.Location = new System.Drawing.Point(100, 16);
this.txtFileNum.Name = "txtFileNum";
this.txtFileNum.Size = new System.Drawing.Size(100, 21);
this.txtFileNum.TabIndex = 6;
//
// chkFileNum
//
this.chkFileNum.AutoSize = true;
this.chkFileNum.Location = new System.Drawing.Point(22, 20);
this.chkFileNum.Name = "chkFileNum";
this.chkFileNum.Size = new System.Drawing.Size(72, 16);
this.chkFileNum.TabIndex = 0;
this.chkFileNum.Text = "文件编码";
this.chkFileNum.UseVisualStyleBackColor = true;
//
// txtFileIds
//
this.txtFileIds.Location = new System.Drawing.Point(81, 180);
this.txtFileIds.Name = "txtFileIds";
this.txtFileIds.Size = new System.Drawing.Size(483, 21);
this.txtFileIds.TabIndex = 13;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(29, 154);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(227, 12);
this.label7.TabIndex = 12;
this.label7.Text = "文件ids 例如: 2,3,11,78,";
//
// txtDiectoryId
//
this.txtDiectoryId.Location = new System.Drawing.Point(464, 75);
this.txtDiectoryId.Name = "txtDiectoryId";
this.txtDiectoryId.Size = new System.Drawing.Size(100, 21);
this.txtDiectoryId.TabIndex = 11;
this.txtDiectoryId.Text = "1";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(400, 78);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(65, 12);
this.label6.TabIndex = 10;
this.label6.Text = "文件目录id";
//
// txtHeight
//
this.txtHeight.Location = new System.Drawing.Point(266, 111);
this.txtHeight.Name = "txtHeight";
this.txtHeight.Size = new System.Drawing.Size(100, 21);
this.txtHeight.TabIndex = 9;
this.txtHeight.Text = "500";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(214, 114);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(41, 12);
this.label5.TabIndex = 8;
this.label5.Text = "Height";
//
// txtWidth
//
this.txtWidth.Location = new System.Drawing.Point(266, 72);
this.txtWidth.Name = "txtWidth";
this.txtWidth.Size = new System.Drawing.Size(100, 21);
this.txtWidth.TabIndex = 7;
this.txtWidth.Text = "800";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(214, 75);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 12);
this.label4.TabIndex = 6;
this.label4.Text = "Width";
//
// txtTop
//
this.txtTop.Location = new System.Drawing.Point(81, 108);
this.txtTop.Name = "txtTop";
this.txtTop.Size = new System.Drawing.Size(100, 21);
this.txtTop.TabIndex = 5;
this.txtTop.Text = "100";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(29, 111);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(23, 12);
this.label3.TabIndex = 4;
this.label3.Text = "Top";
//
// txtLeft
//
this.txtLeft.Location = new System.Drawing.Point(81, 69);
this.txtLeft.Name = "txtLeft";
this.txtLeft.Size = new System.Drawing.Size(100, 21);
this.txtLeft.TabIndex = 3;
this.txtLeft.Text = "100";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(29, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 2;
this.label2.Text = "Left";
//
// CboType
//
this.CboType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CboType.FormattingEnabled = true;
this.CboType.Items.AddRange(new object[] {
"依据父目录最后一层id上传批量文件",
"依据父目录id批量下载",
"依据多个文件id下载"});
this.CboType.Location = new System.Drawing.Point(81, 31);
this.CboType.Name = "CboType";
this.CboType.Size = new System.Drawing.Size(483, 20);
this.CboType.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 31);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "操作类型";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.btnDownloadBackground);
this.tabPage2.Controls.Add(this.txtDownloadBackground);
this.tabPage2.Controls.Add(this.label9);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(613, 340);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "后台下载";
this.tabPage2.UseVisualStyleBackColor = true;
//
// btnDownloadBackground
//
this.btnDownloadBackground.Location = new System.Drawing.Point(276, 228);
this.btnDownloadBackground.Name = "btnDownloadBackground";
this.btnDownloadBackground.Size = new System.Drawing.Size(186, 23);
this.btnDownloadBackground.TabIndex = 18;
this.btnDownloadBackground.Text = "开始调用外部程序";
this.btnDownloadBackground.UseVisualStyleBackColor = true;
this.btnDownloadBackground.Click += new System.EventHandler(this.btnDownloadBackground_Click);
//
// txtDownloadBackground
//
this.txtDownloadBackground.Location = new System.Drawing.Point(27, 61);
this.txtDownloadBackground.Name = "txtDownloadBackground";
this.txtDownloadBackground.Size = new System.Drawing.Size(559, 21);
this.txtDownloadBackground.TabIndex = 17;
this.txtDownloadBackground.Text = "D:\\lserp\\filemanager\\server\\fileRoot\\原材料_#1\\01_frm_P_fm_FileTab.cs";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(25, 32);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(245, 12);
this.label9.TabIndex = 16;
this.label9.Text = "包含绝对路径的文件(这是服务器上存储位置)";
//
// FrmTestClient
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(645, 380);
this.Controls.Add(this.tabControl1);
this.Name = "FrmTestClient";
this.Text = "通讯客户端测试";
this.Load += new System.EventHandler(this.FrmTestClient_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.ComboBox CboType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtLeft;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtHeight;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtWidth;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtTop;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtDiectoryId;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtFileIds;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox chkFileNum;
private System.Windows.Forms.TextBox txtFileNum;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtSpeciesNo;
private System.Windows.Forms.Button btnStartUpdate;
private System.Windows.Forms.Button btnDownloadBackground;
private System.Windows.Forms.TextBox txtDownloadBackground;
private System.Windows.Forms.Label label9;
}
}
+107
View File
@@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CommonLib.test
{
public partial class FrmTestClient : Form
{
public FrmTestClient()
{
InitializeComponent();
}
private void FrmTestClient_Load(object sender, EventArgs e)
{
CboType.SelectedIndex = 0;
}
private IntPtr m_ClientTestHandle = IntPtr.Zero;
private void btnStartUpdate_Click(object sender, EventArgs e)
{
fmUpdateDownloadType type = (fmUpdateDownloadType)CboType.SelectedIndex;
TParamsData pd = new TParamsData(type, this.Handle);
pd.setLocation(int.Parse(txtLeft.Text), int.Parse(txtTop.Text));
pd.setSize(int.Parse(txtWidth.Text), int.Parse(txtHeight.Text));
pd.setParent(int.Parse(txtDiectoryId.Text));
string[] strFileIds = txtFileIds.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string sId in strFileIds)
{
pd.addFileId(int.Parse(sId));
}
if (chkFileNum.Checked)
{
pd.SetfileNumber(txtFileNum.Text);
pd.SetspecieNo(txtSpeciesNo.Text);
}
if (chkFileNum.Checked)
{
pd.CallUpdateUIEx();
}
else
{
pd.CallUpdateUI();
}
}
private void btnDownloadBackground_Click(object sender, EventArgs e)
{
TParamsData pd = new TParamsData(this.Handle);
pd.CallDownload(txtDownloadBackground.Text);
}
protected override void DefWndProc(ref Message m)
{
try
{
switch (m.Msg)
{
//接收到客户端发来的窗体句柄
case LSCustomWinMsg.REV_CLIENT_WINDOW_HANDLE:
{
m_ClientTestHandle = m.WParam;
break;
}
//接收到客户端处理错误消息
case LSCustomWinMsg.REV_CLIENT_DEAL_ERROR:
{
MessageBox.Show("通讯客户端处理出错了");
break;
}
//接收到客户端处理ok消息
case LSCustomWinMsg.REV_CLIENT_DEAL_OK:
{
MessageBox.Show("通讯客户端处理下载ok了");
break;
}
//批量上传关闭窗体之前的通知消息
case LSCustomWinMsg.BATCH_UPLOAD_COMPLETED:
{
MessageBox.Show("通讯客户端批量上传下载完毕关闭窗体");
break;
}
default:
{
base.DefWndProc(ref m);
break;
}
}
}
catch (Exception ex)
{
PubUtil.WriteLog(ex.Message);
}
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>