添加项目文件。

This commit is contained in:
gongxh
2021-06-05 14:17:30 +08:00
parent f24605d16b
commit f5dbabdfc9
247 changed files with 58383 additions and 0 deletions

View File

@@ -0,0 +1,358 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmCleanMode
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_CleanModeCode = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_CleanModeName = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 131);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 460);
this.kryptonGroupBox2.TabIndex = 6;
this.kryptonGroupBox2.Values.Heading = "";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 456);
this.dataGridView.TabIndex = 3;
//
// kryptonPanel1
//
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel1.TabIndex = 4;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 131);
this.kryptonGroupBox1.TabIndex = 0;
this.kryptonGroupBox1.Values.Heading = "";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(237, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 6;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_CleanModeCode, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_CleanModeName, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 5;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(546, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(245, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(147, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(245, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(134, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "清洁方式编码:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(457, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_CleanModeCode
//
this.ktb_CleanModeCode.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_CleanModeCode.Location = new System.Drawing.Point(147, 6);
this.ktb_CleanModeCode.Name = "ktb_CleanModeCode";
this.ktb_CleanModeCode.Size = new System.Drawing.Size(245, 23);
this.ktb_CleanModeCode.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(134, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(402, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(134, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "清洁方式名称:";
//
// ktb_CleanModeName
//
this.ktb_CleanModeName.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_CleanModeName.Location = new System.Drawing.Point(546, 6);
this.ktb_CleanModeName.Name = "ktb_CleanModeName";
this.ktb_CleanModeName.Size = new System.Drawing.Size(245, 23);
this.ktb_CleanModeName.TabIndex = 5;
//
// frmCleanMode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel1);
this.Name = "frmCleanMode";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmCleanMode_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_CleanModeCode;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_CleanModeName;
}
}

View File

@@ -0,0 +1,200 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.CleanMode)]
public partial class frmCleanMode : UserControl
{
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public frmCleanMode()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
public void Init()
{
var sql = $@"select CLEAN_MODE_ID 序号,CLEAN_MODE_CODE 清洁方式编码,CLEAN_MODE_NAME 清洁方式名称,CREATE_TIME 创建时间 from BAS_CLEAN_MODE where DEL_FLAG=0";
if (!string.IsNullOrEmpty(ktb_CleanModeCode.Text))
{
sql += $" AND CLEAN_MODE_CODE LIKE '%{ktb_CleanModeCode.Text}%'";
}
if (!string.IsNullOrEmpty(ktb_CleanModeName.Text))
{
sql += $" AND CLEAN_MODE_NAME LIKE '%{ktb_CleanModeName.Text}%'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_CleanModeCode.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_CleanModeCode.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_CleanModeName.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_CleanModeName.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmCleanMode_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_CleanModeCode.Text = "";
ktb_CleanModeName.Text = "";
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddCleanCode frm = new frmAddCleanCode();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditCleanCode frm = new frmEditCleanCode();
frm.CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的清洗方式数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_ID = '{CleanModeId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!");
}
}
}
}

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>

View File

@@ -0,0 +1,391 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmContaminationDTL
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonPanel3 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonPanel2 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_ContaminationDtlMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_ContaminationType = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).BeginInit();
this.kryptonPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
this.kryptonPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_ContaminationType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout();
this.SuspendLayout();
//
// kryptonPanel3
//
this.kryptonPanel3.Controls.Add(this.kryptonPanel2);
this.kryptonPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel3.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel3.Name = "kryptonPanel3";
this.kryptonPanel3.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel3.TabIndex = 1;
//
// kryptonPanel2
//
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel2.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel2.Name = "kryptonPanel2";
this.kryptonPanel2.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel2.TabIndex = 3;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 131);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 460);
this.kryptonGroupBox2.TabIndex = 7;
this.kryptonGroupBox2.Values.Heading = "";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 456);
this.dataGridView.TabIndex = 3;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 131);
this.kryptonGroupBox1.TabIndex = 0;
this.kryptonGroupBox1.Values.Heading = "";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(227, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 10;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 130F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_ContaminationDtlMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_ContaminationType, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 9;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(581, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(210, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(227, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(210, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(214, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "污染明细信息:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(497, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_ContaminationDtlMsg
//
this.ktb_ContaminationDtlMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_ContaminationDtlMsg.Location = new System.Drawing.Point(227, 6);
this.ktb_ContaminationDtlMsg.Name = "ktb_ContaminationDtlMsg";
this.ktb_ContaminationDtlMsg.Size = new System.Drawing.Size(210, 23);
this.ktb_ContaminationDtlMsg.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(214, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(447, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(124, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "污染类型:";
//
// kcmb_ContaminationType
//
this.kcmb_ContaminationType.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_ContaminationType.DropDownWidth = 246;
this.kcmb_ContaminationType.Location = new System.Drawing.Point(581, 7);
this.kcmb_ContaminationType.Name = "kcmb_ContaminationType";
this.kcmb_ContaminationType.Size = new System.Drawing.Size(210, 21);
this.kcmb_ContaminationType.TabIndex = 8;
//
// kryptonPanel1
//
this.kryptonPanel1.Controls.Add(this.kryptonPanel3);
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel1.TabIndex = 5;
//
// frmContaminationDTL
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel1);
this.Name = "frmContaminationDTL";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmContaminationDTL_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).EndInit();
this.kryptonPanel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).EndInit();
this.kryptonPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_ContaminationType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel3;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_ContaminationDtlMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_ContaminationType;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel1;
}
}

View File

@@ -0,0 +1,205 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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.Web.UI.WebControls;
using System.Windows.Forms;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.ContaminationDTL)]
public partial class frmContaminationDTL : UserControl
{
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public frmContaminationDTL()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
public void Init()
{
var sql = $@"SELECT A.CONTAMINATION_DTL_ID 序号,B.CONTAMINATION_TYPE_CODE 污染类型编码,B.CONTAMINATION_TYPE_NAME 污染类型名称,A.CONTAMINATION_DTL_CODE 污染明细编码,A.CONTAMINATION_DTL_NAME 污染明细名称,A.CREATE_TIME 创建时间 FROM BAS_CONTAMINATION_DTL A LEFT JOIN BAS_CONTAMINATION_TYPE B ON A.CONTAMINATION_TYPE_CODE = B.CONTAMINATION_TYPE_CODE WHERE 1=1 ";
if (!string.IsNullOrEmpty(ktb_ContaminationDtlMsg.Text))
{
sql += $" AND (A.CONTAMINATION_DTL_CODE LIKE '%{ktb_ContaminationDtlMsg.Text}%' or A.CONTAMINATION_DTL_NAME LIKE '%{ktb_ContaminationDtlMsg.Text}%')";
}
if (kcmb_ContaminationType.SelectedIndex != 0)
{
sql += $" AND B.CONTAMINATION_TYPE_CODE = '{((ListItem)kcmb_ContaminationType.SelectedItem).Value}'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND A.CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND A.CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_ContaminationDtlMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_ContaminationDtlMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmContaminationDTL_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
kcmb_ContaminationType.Items.Add(new ListItem
{
Value = "0",
Text = "Please Select",
});
foreach (DataRow item in dt.Rows)
{
kcmb_ContaminationType.Items.Add(new ListItem
{
Value = item["CONTAMINATION_TYPE_CODE"].ToString(),
Text = item["CONTAMINATION_TYPE_NAME"].ToString(),
});
}
kcmb_ContaminationType.SelectedIndex = 0;
}
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_ContaminationDtlMsg.Text = "";
kcmb_ContaminationType.SelectedIndex = 0;
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddContaminationDtl frm = new frmAddContaminationDtl();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditContaminationDtl frm = new frmEditContaminationDtl();
frm.ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的污染明细数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_CONTAMINATION_DTL WHERE CONTAMINATION_DTL_ID = '{ContaminationDtlId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!");
}
}
}
}

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>

View File

@@ -0,0 +1,391 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmContaminationType
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonPanel3 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonPanel2 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_ContaminationTypeMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_CleanMode = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).BeginInit();
this.kryptonPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
this.kryptonPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_CleanMode)).BeginInit();
this.SuspendLayout();
//
// kryptonPanel1
//
this.kryptonPanel1.Controls.Add(this.kryptonPanel3);
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel1.TabIndex = 4;
//
// kryptonPanel3
//
this.kryptonPanel3.Controls.Add(this.kryptonPanel2);
this.kryptonPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel3.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel3.Name = "kryptonPanel3";
this.kryptonPanel3.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel3.TabIndex = 1;
//
// kryptonPanel2
//
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel2.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel2.Name = "kryptonPanel2";
this.kryptonPanel2.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel2.TabIndex = 3;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 129);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 462);
this.kryptonGroupBox2.TabIndex = 6;
this.kryptonGroupBox2.Values.Heading = "";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 458);
this.dataGridView.TabIndex = 3;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 129);
this.kryptonGroupBox1.TabIndex = 0;
this.kryptonGroupBox1.Values.Heading = "";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(236, 76);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 8;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_ContaminationTypeMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_CleanMode, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 7;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(573, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(210, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(234, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(210, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(214, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "污染类型信息:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(497, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_ContaminationTypeMsg
//
this.ktb_ContaminationTypeMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_ContaminationTypeMsg.Location = new System.Drawing.Point(234, 6);
this.ktb_ContaminationTypeMsg.Name = "ktb_ContaminationTypeMsg";
this.ktb_ContaminationTypeMsg.Size = new System.Drawing.Size(210, 23);
this.ktb_ContaminationTypeMsg.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(214, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(462, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(94, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "清洁方式:";
//
// kcmb_CleanMode
//
this.kcmb_CleanMode.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_CleanMode.DropDownWidth = 246;
this.kcmb_CleanMode.Location = new System.Drawing.Point(573, 7);
this.kcmb_CleanMode.Name = "kcmb_CleanMode";
this.kcmb_CleanMode.Size = new System.Drawing.Size(210, 21);
this.kcmb_CleanMode.TabIndex = 8;
//
// frmContaminationType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel1);
this.Name = "frmContaminationType";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmContaminationType_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).EndInit();
this.kryptonPanel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).EndInit();
this.kryptonPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_CleanMode)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel3;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_ContaminationTypeMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_CleanMode;
}
}

View File

@@ -0,0 +1,215 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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.Web.UI.WebControls;
using System.Windows.Forms;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.ContaminationType)]
public partial class frmContaminationType : UserControl
{
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public frmContaminationType()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
public void Init()
{
var sql = $@"SELECT A.CONTAMINATION_TYPE_ID 序号,B.CLEAN_MODE_CODE 清洁方式编码,B.CLEAN_MODE_NAME 清洁方式名称,A.CONTAMINATION_TYPE_CODE 污染类型编码,A.CONTAMINATION_TYPE_NAME 污染类型名称,A.CREATE_TIME 创建时间 FROM BAS_CONTAMINATION_TYPE A LEFT JOIN BAS_CLEAN_MODE B ON A.CLEAN_MODE_CODE = B.CLEAN_MODE_CODE Where 1=1";
if (!string.IsNullOrEmpty(ktb_ContaminationTypeMsg.Text))
{
sql += $" AND (A.CONTAMINATION_TYPE_CODE LIKE '%{ktb_ContaminationTypeMsg.Text}%' or A.CONTAMINATION_TYPE_NAME LIKE '%{ktb_ContaminationTypeMsg.Text}%')";
}
if (kcmb_CleanMode.SelectedIndex != 0)
{
sql += $" AND B.CLEAN_MODE_CODE = '{((ListItem)kcmb_CleanMode.SelectedItem).Value}'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND A.CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND A.CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_ContaminationTypeMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_ContaminationTypeMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmContaminationType_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
string sql = $@"select CLEAN_MODE_CODE,CLEAN_MODE_NAME from BAS_CLEAN_MODE where DEL_FLAG=0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
kcmb_CleanMode.Items.Add(new ListItem
{
Value = "0",
Text = "Please Select",
});
foreach (DataRow item in dt.Rows)
{
kcmb_CleanMode.Items.Add(new ListItem
{
Value = item["CLEAN_MODE_CODE"].ToString(),
Text = item["CLEAN_MODE_NAME"].ToString(),
});
}
kcmb_CleanMode.SelectedIndex = 0;
}
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_ContaminationTypeMsg.Text = "";
kcmb_CleanMode.SelectedIndex = 0;
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddContaminationType frm = new frmAddContaminationType();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditContaminationType frm = new frmEditContaminationType();
frm.ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的污染类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_CONTAMINATION_TYPE WHERE CONTAMINATION_TYPE_ID = '{ContaminationId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!");
}
}
}
}

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>

View File

@@ -0,0 +1,413 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmRole
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonPanel6 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.ktb_setRoleMenuPermission = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_roleGrade = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.ktb_roleMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).BeginInit();
this.kryptonPanel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_roleGrade)).BeginInit();
this.SuspendLayout();
//
// kryptonPanel6
//
this.kryptonPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel6.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel6.Name = "kryptonPanel6";
this.kryptonPanel6.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel6.TabIndex = 6;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 129);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 462);
this.kryptonGroupBox1.TabIndex = 4;
this.kryptonGroupBox1.Values.Heading = "";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 458);
this.dataGridView.TabIndex = 3;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 129);
this.kryptonGroupBox2.TabIndex = 0;
this.kryptonGroupBox2.Values.Heading = "";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 6;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 5, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.ktb_setRoleMenuPermission, 3, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(164, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(631, 41);
this.tableLayoutPanel2.TabIndex = 2;
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(99, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(528, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(100, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(423, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(99, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(108, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(99, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(213, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(99, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// ktb_setRoleMenuPermission
//
this.ktb_setRoleMenuPermission.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ktb_setRoleMenuPermission.Location = new System.Drawing.Point(318, 3);
this.ktb_setRoleMenuPermission.Name = "ktb_setRoleMenuPermission";
this.ktb_setRoleMenuPermission.Size = new System.Drawing.Size(99, 35);
this.ktb_setRoleMenuPermission.TabIndex = 0;
this.ktb_setRoleMenuPermission.Values.Text = "权限配置";
this.ktb_setRoleMenuPermission.Click += new System.EventHandler(this.ktb_setRoleMenuPermission_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.kcmb_roleGrade, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_roleMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 0;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(535, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(136, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "角色信息:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(447, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// kcmb_roleGrade
//
this.kcmb_roleGrade.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_roleGrade.DropDownWidth = 121;
this.kcmb_roleGrade.Items.AddRange(new object[] {
"请选择",
"管理员",
"普通用户"});
this.kcmb_roleGrade.Location = new System.Drawing.Point(535, 7);
this.kcmb_roleGrade.Name = "kcmb_roleGrade";
this.kcmb_roleGrade.Size = new System.Drawing.Size(246, 21);
this.kcmb_roleGrade.TabIndex = 6;
//
// ktb_roleMsg
//
this.ktb_roleMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_roleMsg.Location = new System.Drawing.Point(136, 6);
this.ktb_roleMsg.Name = "ktb_roleMsg";
this.ktb_roleMsg.Size = new System.Drawing.Size(246, 23);
this.ktb_roleMsg.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(402, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "角色级别:";
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.HeaderText = "报警类别";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.HeaderText = "报警编码";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.HeaderText = "报警名称";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.HeaderText = "报警消息";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
//
// frmRole
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel6);
this.Name = "frmRole";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmRole_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).EndInit();
this.kryptonPanel6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_roleGrade)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel6;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton ktb_setRoleMenuPermission;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_roleGrade;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_roleMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
}
}

View File

@@ -0,0 +1,220 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.Role)]
public partial class frmRole : UserControl
{
public frmRole()
{
InitializeComponent();
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _ComboBoxLanguageTextList;
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public void Init()
{
var sql = $@"SELECT ROLE_ID 序号,ROLE_CODE 角色编码,ROLE_NAME 角色名称,CASE ROLE_GRADE WHEN '100' THEN 'Administrator' ELSE 'User' END 角色级别,CREATE_TIME 创建时间 FROM SYS_ROLE where DEL_FLAG = 0 ";
if (!string.IsNullOrEmpty(ktb_roleMsg.Text))
{
sql += $" And (ROLE_CODE like '%{ktb_roleMsg.Text}%' or ROLE_NAME like '%{ktb_roleMsg.Text}%')";
}
if (kcmb_roleGrade.SelectedIndex != 0)
{
if (kcmb_roleGrade.SelectedIndex == 1)
{
sql += $" AND ROLE_GRADE = '100'";
}
else
{
sql += $" AND ROLE_GRADE = '1'";
}
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_roleMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_roleMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmRole_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
if (GlobalHelper.LanguageCode == "English")
{
kcmb_roleGrade.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
{
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
}
kcmb_roleGrade.SelectedIndex = 0;
}
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!");
}
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddRole frm = new frmAddRole();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditRole frm = new frmEditRole();
frm.RoleId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sqlIsExistAdmin = $@"SELECT 1 FROM SYS_ROLE WHERE ROLE_GRADE = '100' AND ROLE_ID = '{UserId}'";
DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0];
if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo"));
return;
}
string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_roleMsg.Text = "";
kcmb_roleGrade.SelectedIndex = 0;
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void ktb_setRoleMenuPermission_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmSetRoleMenuPermission frm = new frmSetRoleMenuPermission();
frm.RoleId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow"));
}
}
}
}

View File

@@ -0,0 +1,132 @@
<?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>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,358 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmSheetType
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_SheetTypeCode = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_SheetTypeName = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout();
this.SuspendLayout();
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(124, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "板材编码:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(452, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_SheetTypeCode
//
this.ktb_SheetTypeCode.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_SheetTypeCode.Location = new System.Drawing.Point(141, 6);
this.ktb_SheetTypeCode.Name = "ktb_SheetTypeCode";
this.ktb_SheetTypeCode.Size = new System.Drawing.Size(246, 23);
this.ktb_SheetTypeCode.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(124, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// ktb_SheetTypeName
//
this.ktb_SheetTypeName.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_SheetTypeName.Location = new System.Drawing.Point(540, 6);
this.ktb_SheetTypeName.Name = "ktb_SheetTypeName";
this.ktb_SheetTypeName.Size = new System.Drawing.Size(246, 23);
this.ktb_SheetTypeName.TabIndex = 5;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(540, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(141, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(402, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(124, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "板材名称:";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(234, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 4;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 129);
this.kryptonGroupBox1.TabIndex = 0;
this.kryptonGroupBox1.Values.Heading = "";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 130F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 130F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_SheetTypeCode, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_SheetTypeName, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 3;
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 458);
this.dataGridView.TabIndex = 3;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 129);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 462);
this.kryptonGroupBox2.TabIndex = 5;
this.kryptonGroupBox2.Values.Heading = "";
//
// kryptonPanel1
//
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel1.TabIndex = 3;
//
// frmSheetType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel1);
this.Name = "frmSheetType";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmSheetType_Load);
this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_SheetTypeCode;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_SheetTypeName;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel1;
}
}

View File

@@ -0,0 +1,195 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.SheetType)]
public partial class frmSheetType : UserControl
{
public frmSheetType()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
public void Init()
{
var sql = $@"select SHEET_TYPE_ID 序号,SHEET_TYPE_CODE 板材编码,SHEET_TYPE_NAME 板材名称,CREATE_TIME 创建时间 from BAS_SHEET_TYPE where DEL_FLAG=0";
if (!string.IsNullOrEmpty(ktb_SheetTypeCode.Text))
{
sql += $" AND SHEET_TYPE_CODE LIKE '%{ktb_SheetTypeCode.Text}%'";
}
if (!string.IsNullOrEmpty(ktb_SheetTypeName.Text))
{
sql += $" AND SHEET_TYPE_NAME LIKE '%{ktb_SheetTypeName.Text}%'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_SheetTypeCode.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_SheetTypeCode.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_SheetTypeName.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_SheetTypeName.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmSheetType_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_SheetTypeCode.Text = "";
ktb_SheetTypeName.Text = "";
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddSheetType frm = new frmAddSheetType();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditSheetType frm = new frmEditSheetType();
frm.SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的板材类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_ID = '{SheetTypeId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!");
}
}
}
}

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>

View File

@@ -0,0 +1,398 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmUser
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_gender = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.ktb_userMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonPanel6 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_gender)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).BeginInit();
this.kryptonPanel6.SuspendLayout();
this.SuspendLayout();
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.HeaderText = "报警消息";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.HeaderText = "报警名称";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.HeaderText = "报警编码";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.HeaderText = "报警类别";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.kcmb_gender, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_userMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 0;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(520, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(151, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "用户信息:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(447, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// kcmb_gender
//
this.kcmb_gender.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_gender.DropDownWidth = 121;
this.kcmb_gender.Items.AddRange(new object[] {
"请选择",
"男",
"女"});
this.kcmb_gender.Location = new System.Drawing.Point(520, 7);
this.kcmb_gender.Name = "kcmb_gender";
this.kcmb_gender.Size = new System.Drawing.Size(246, 21);
this.kcmb_gender.TabIndex = 6;
//
// ktb_userMsg
//
this.ktb_userMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_userMsg.Location = new System.Drawing.Point(151, 6);
this.ktb_userMsg.Name = "ktb_userMsg";
this.ktb_userMsg.Size = new System.Drawing.Size(246, 23);
this.ktb_userMsg.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(432, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(54, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "性别:";
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(234, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 2;
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 129);
this.kryptonGroupBox2.TabIndex = 0;
this.kryptonGroupBox2.Values.Heading = "";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 458);
this.dataGridView.TabIndex = 3;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 129);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 462);
this.kryptonGroupBox1.TabIndex = 4;
this.kryptonGroupBox1.Values.Heading = "";
//
// kryptonPanel6
//
this.kryptonPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel6.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel6.Name = "kryptonPanel6";
this.kryptonPanel6.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel6.TabIndex = 5;
//
// frmUser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel6);
this.Name = "frmUser";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmUser_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_gender)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).EndInit();
this.kryptonPanel6.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_gender;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_userMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel6;
}
}

View File

@@ -0,0 +1,200 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.User)]
public partial class frmUser : UserControl
{
public frmUser()
{
InitializeComponent();
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _ComboBoxLanguageTextList;
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public void Init()
{
var sql = $@"select USER_ID 序号,USER_CODE 用户编码,USER_NAME 用户名称,PASSWORD 密码,CASE GENDER WHEN 1 THEN 'man' ELSE 'woman' END 性别,CREATE_TIME 创建时间 from SYS_USER where DEL_FLAG = 0 ";
if (!string.IsNullOrEmpty(ktb_userMsg.Text))
{
sql += $" And (USER_CODE like '%{ktb_userMsg.Text}%' or USER_NAME like '%{ktb_userMsg.Text}%')";
}
if (kcmb_gender.SelectedIndex != 0)
{
sql += $" AND GENDER = '{kcmb_gender.SelectedIndex}'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (GlobalHelper.UserInfo.ROLE_GRADE != 100)
{
sql += $" AND USER_ID = '{GlobalHelper.UserInfo.USER_ID}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_userMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_userMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmUser_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
if (GlobalHelper.LanguageCode == "English")
{
kcmb_gender.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_gender.Name, "KryptonComboBox"))
{
kcmb_gender.Items.Add(item["CONTROL_NAME"].ToString());
}
}
kcmb_gender.SelectedIndex = 0;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_userMsg.Text = "";
kcmb_gender.SelectedIndex = 0;
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddUser frm = new frmAddUser();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditUser frm = new frmEditUser();
frm.UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的用户信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM SYS_USER WHERE USER_ID = '{UserId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!");
}
}
}
}

View File

@@ -0,0 +1,132 @@
<?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>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,397 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmWarning
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.dataGridView = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonPanel6 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_WarningMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_WarningType = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).BeginInit();
this.kryptonPanel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_WarningType)).BeginInit();
this.SuspendLayout();
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView.DataMember = "TestData";
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.RowHeadersWidth = 100;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.Size = new System.Drawing.Size(798, 459);
this.dataGridView.TabIndex = 3;
//
// kryptonPanel6
//
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel6.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel6.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel6.Name = "kryptonPanel6";
this.kryptonPanel6.Size = new System.Drawing.Size(802, 591);
this.kryptonPanel6.TabIndex = 4;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 128);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.dataGridView);
this.kryptonGroupBox1.Size = new System.Drawing.Size(802, 463);
this.kryptonGroupBox1.TabIndex = 7;
this.kryptonGroupBox1.Values.Heading = "";
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox2.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(802, 128);
this.kryptonGroupBox2.TabIndex = 0;
this.kryptonGroupBox2.Values.Heading = "";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(234, 77);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(561, 41);
this.tableLayoutPanel2.TabIndex = 6;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(451, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(107, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(115, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(106, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(227, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(106, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(339, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(106, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(106, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_WarningMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_WarningType, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 72);
this.tableLayoutPanel1.TabIndex = 5;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(530, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(141, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "报警信息:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(447, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_WarningMsg
//
this.ktb_WarningMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_WarningMsg.Location = new System.Drawing.Point(141, 6);
this.ktb_WarningMsg.Name = "ktb_WarningMsg";
this.ktb_WarningMsg.Size = new System.Drawing.Size(246, 23);
this.ktb_WarningMsg.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(412, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(94, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "报警类型:";
//
// kcmb_WarningType
//
this.kcmb_WarningType.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_WarningType.DropDownWidth = 246;
this.kcmb_WarningType.Items.AddRange(new object[] {
"请选择",
"清洁机报警",
"变频器报警"});
this.kcmb_WarningType.Location = new System.Drawing.Point(530, 7);
this.kcmb_WarningType.Name = "kcmb_WarningType";
this.kcmb_WarningType.Size = new System.Drawing.Size(246, 21);
this.kcmb_WarningType.TabIndex = 8;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.HeaderText = "报警编码";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.HeaderText = "报警名称";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.HeaderText = "报警类别";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.HeaderText = "报警消息";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
//
// frmWarning
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel6);
this.Name = "frmWarning";
this.Size = new System.Drawing.Size(802, 591);
this.Load += new System.EventHandler(this.frmWarning_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel6)).EndInit();
this.kryptonPanel6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_WarningType)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView dataGridView;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel6;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_WarningMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_WarningType;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
}
}

View File

@@ -0,0 +1,208 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.Warning)]
public partial class frmWarning : UserControl
{
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public frmWarning()
{
InitializeComponent();
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _ComboBoxLanguageTextList;
private DataTable _InfoLanguageTextList;
public void Init()
{
var sql = $@"select WARNING_ID 序号,WARNING_CODE 报警编码,WARNING_NAME 报警名称,PLC_ITEM_CODE 'PLC信息',CASE WARNING_TYPE WHEN '1' THEN 'Cleaning machine alarm' ELSE 'Frequency converter alarm' END '报警类型',WARNING_MESSAGE 报警描述,CREATE_TIME 创建时间 from BAS_WARNING where DEL_FLAG=0";
if (!string.IsNullOrEmpty(ktb_WarningMsg.Text))
{
sql += $" AND (WARNING_CODE like '%{ktb_WarningMsg.Text}%' OR WARNING_NAME like '%{ktb_WarningMsg.Text}%')";
}
if (kcmb_WarningType.SelectedIndex != 0)
{
sql += $" AND WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
dataGridView.Columns.Clear();
dataGridView.DataSource = dt;
dataGridView.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_WarningMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_WarningMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmWarning_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
if (GlobalHelper.LanguageCode == "English")
{
kcmb_WarningType.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
{
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
}
}
kcmb_WarningType.SelectedIndex = 0;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox2.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_WarningMsg.Text = "";
kcmb_WarningType.SelectedIndex = 0;
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddWaringMsg frm = new frmAddWaringMsg();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (dataGridView.SelectedRows.Count > 0)
{
frmEditWaringMsg frm = new frmEditWaringMsg();
frm.WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (dataGridView.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的报警信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_WARNING WHERE WARNING_ID = '{WarningId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警数据失败!", "DeleteFailInfo"));
}
}
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除报警信息数据发生异常", "DeleteWarningMsgDataExp") + $":【{ex.Message}】!");
}
}
}
}

View File

@@ -0,0 +1,135 @@
<?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>
<metadata name="kryptonPanel6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,203 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmCurrWorkingIrMsg
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.kryptonDataGridView1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonButton1 = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonTextBox2 = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonTextBox1 = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.SuspendLayout();
//
// kryptonDataGridView1
//
this.kryptonDataGridView1.AllowUserToAddRows = false;
this.kryptonDataGridView1.AllowUserToDeleteRows = false;
this.kryptonDataGridView1.AllowUserToResizeRows = false;
this.kryptonDataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.kryptonDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.kryptonDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView1.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView1.MultiSelect = false;
this.kryptonDataGridView1.Name = "kryptonDataGridView1";
this.kryptonDataGridView1.RowTemplate.Height = 23;
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 553);
this.kryptonDataGridView1.TabIndex = 0;
//
// kryptonPanel1
//
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox2);
this.kryptonPanel1.Controls.Add(this.kryptonGroupBox1);
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(1024, 672);
this.kryptonPanel1.TabIndex = 1;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 95);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonDataGridView1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 577);
this.kryptonGroupBox2.TabIndex = 1;
this.kryptonGroupBox2.Values.Heading = "Current IR Details:";
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonButton1);
this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonTextBox2);
this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonLabel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonTextBox1);
this.kryptonGroupBox1.Panel.Controls.Add(this.kryptonLabel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 95);
this.kryptonGroupBox1.TabIndex = 0;
this.kryptonGroupBox1.Values.Heading = "";
//
// kryptonButton1
//
this.kryptonButton1.Location = new System.Drawing.Point(803, 33);
this.kryptonButton1.Name = "kryptonButton1";
this.kryptonButton1.Size = new System.Drawing.Size(122, 25);
this.kryptonButton1.TabIndex = 2;
this.kryptonButton1.Values.Text = "Clear current data";
this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click);
//
// kryptonTextBox2
//
this.kryptonTextBox2.Location = new System.Drawing.Point(419, 53);
this.kryptonTextBox2.Name = "kryptonTextBox2";
this.kryptonTextBox2.ReadOnly = true;
this.kryptonTextBox2.Size = new System.Drawing.Size(301, 23);
this.kryptonTextBox2.StateCommon.Content.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonTextBox2.TabIndex = 1;
this.kryptonTextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// kryptonLabel2
//
this.kryptonLabel2.Location = new System.Drawing.Point(169, 53);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.kryptonLabel2.Size = new System.Drawing.Size(244, 23);
this.kryptonLabel2.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonLabel2.TabIndex = 0;
this.kryptonLabel2.Values.Text = "Current job IR information:";
//
// kryptonTextBox1
//
this.kryptonTextBox1.Location = new System.Drawing.Point(419, 12);
this.kryptonTextBox1.Name = "kryptonTextBox1";
this.kryptonTextBox1.ReadOnly = true;
this.kryptonTextBox1.Size = new System.Drawing.Size(301, 23);
this.kryptonTextBox1.StateCommon.Content.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonTextBox1.TabIndex = 1;
this.kryptonTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// kryptonLabel1
//
this.kryptonLabel1.Location = new System.Drawing.Point(236, 12);
this.kryptonLabel1.Name = "kryptonLabel1";
this.kryptonLabel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.kryptonLabel1.Size = new System.Drawing.Size(177, 23);
this.kryptonLabel1.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonLabel1.TabIndex = 0;
this.kryptonLabel1.Values.Text = "Current job pallet:";
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// frmCurrWorkingIrMsg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel1);
this.Name = "frmCurrWorkingIrMsg";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmCurrWorkingIrMsg_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
this.kryptonGroupBox1.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private ComponentFactory.Krypton.Toolkit.KryptonButton kryptonButton1;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox kryptonTextBox2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox kryptonTextBox1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel1;
private System.Windows.Forms.Timer timer1;
}
}

View File

@@ -0,0 +1,115 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.CurrWorkingIR)]
public partial class frmCurrWorkingIrMsg : UserControl
{
public frmCurrWorkingIrMsg()
{
InitializeComponent();
}
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
private void RefreshData()
{
try
{
this.SetFormControlText(GlobalHelper.LanguageCode);
string sql = $@"SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
string currIrMsg = dt.Rows[0]["IR_CODE"].ToString();
string currPalletMsg = dt.Rows[0]["WORKING_PALLET_CODE"].ToString();
string sql1 = $@"
SELECT
CLEAN_MODE_CODE '清洗方式编码',
CLEAN_MODE_NAME '清洗方式名称',
CONTAMINATION_TYPE_CODE '污染类型编码',
CONTAMINATION_TYPE_NAME '污染类型名称',
CONTAMINATION_DTL_CODE '污染明细编码',
CONTAMINATION_DTL_NAME '污染明细名称',
CURRENT_NUMBER '当前计数',
USER_CODE '操作员编码',
USER_NAME '操作员名称'
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{currIrMsg}';
";
DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0];
kryptonDataGridView1.DataSource = dt1;
kryptonTextBox1.Text = currPalletMsg;
kryptonTextBox2.Text = currIrMsg;
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
else
{
kryptonDataGridView1.DataSource = null;
kryptonTextBox1.Text = "";
kryptonTextBox2.Text = "";
}
}
catch
{
}
}
private void frmCurrWorkingIrMsg_Load(object sender, EventArgs e)
{
RefreshFrmHost = new dlgRefreshFrmHost(RefreshData);
timer1.Enabled = true;
kryptonGroupBox1.Focus();
}
private void timer1_Tick(object sender, EventArgs e)
{
RefreshData();
}
private void kryptonButton1_Click(object sender, EventArgs e)
{
try
{
DialogResult dr = KryptonMessageBox.Show("Are you sure you want to clear the IR data for the current job? If you continue to reset the current job information, you will need to enter new IR and sheet information. please carefully operation!!!", "Prompt", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
string sqlUpdateWorkingPallet = $@"UPDATE CM_WORKING_PALLET SET WORKING_STATUS = 1,UPDATE_BY = '{GlobalHelper.UserInfo.USER_ID}',UPDATE_TIME = datetime('now', 'localtime'),DATA_VERSION = DATA_VERSION + 1 where WORKING_PALLET_CODE = '{kryptonTextBox1.Text.Trim()}';";
string sqlUpdateWorkingPalletDtl = $@"UPDATE CM_WORKING_PALLET_DTL SET WORKING_DTL_STATUS = 1,UPDATE_BY = '{GlobalHelper.UserInfo.USER_ID}',UPDATE_TIME = datetime('now', 'localtime'),DATA_VERSION = DATA_VERSION + 1 where WORKING_PALLET_CODE = '{kryptonTextBox1.Text.Trim()}';";
string sqlInsertZbkWorkingPallet = $@"INSERT INTO ZBK_WORKING_PALLET SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 1 and WORKING_PALLET_CODE in (select WORKING_PALLET_CODE from CM_WORKING_PALLET_DTL where WORKING_DTL_STATUS = 1 and IR_CODE = '{kryptonTextBox2.Text.Trim()}');";
string sqlInsertZbkWorkingPalletDtl = $@"INSERT INTO ZBK_WORKING_PALLET_DTL SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 1 and IR_CODE = '{kryptonTextBox2.Text.Trim()}';";
string sqlDeleteWorkingPallet = $@"delete from CM_WORKING_PALLET where WORKING_STATUS = 1 and WORKING_PALLET_CODE in (select WORKING_PALLET_CODE from CM_WORKING_PALLET_DTL where WORKING_DTL_STATUS = 1 and IR_CODE = '{kryptonTextBox2.Text.Trim()}');";
string sqlDeleteWorkingPalletDtl = $@"delete from CM_WORKING_PALLET_DTL where WORKING_DTL_STATUS = 1 and IR_CODE = '{kryptonTextBox2.Text.Trim()}';";
LeadDbHelperSQLite.ExecuteSql(sqlUpdateWorkingPallet);
LeadDbHelperSQLite.ExecuteSql(sqlUpdateWorkingPalletDtl);
LeadDbHelperSQLite.ExecuteSql(sqlInsertZbkWorkingPalletDtl);
LeadDbHelperSQLite.ExecuteSql(sqlInsertZbkWorkingPallet);
LeadDbHelperSQLite.ExecuteSql(sqlDeleteWorkingPallet);
LeadDbHelperSQLite.ExecuteSql(sqlDeleteWorkingPalletDtl);
frmMainDetail.RefreshCurrentWorkingDataFrmHost();
PlcOperationHelper.Instance.WritePlcItem("NozzleNum", "0", PlcItemTypeDesc.D);
KryptonMessageBox.Show("Cleared current working data successfully!");
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
}
}

View File

@@ -0,0 +1,123 @@
<?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>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,123 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CleanMachineHMI.FrmUserControl
{
//[FormType(EnumFormType.IoMonitor)]
public partial class frmIOMonitor : UserControl
{
public frmIOMonitor()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "Label");
}
/// <summary>
/// 页面信息语言文本列表
/// </summary>
private DataTable _InfoLanguageTextList;
private void frmIOMonitorNew_Load(object sender, EventArgs e)
{
initControl();
GlobalHelper.OnShowX_Y_Status += Show_X_Y_Status;
}
private void Show_X_Y_Status(object sender, EventArgs e)
{
BasPlcItemMd item = sender as BasPlcItemMd;
Invoke(new Action(() =>
{
if (item.PlcItemDataType == 2)
{
if (this.Controls.Find("cbt_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true).Length > 0)
{
CircleButton ctn = this.Controls.Find("cbt_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as CircleButton;
if (string.IsNullOrEmpty(item.PlcItemValue))
{
ctn.BackColor = Color.FromArgb(191, 219, 255);
}
else if (bool.Parse(item.PlcItemValue.ToString()))
{
ctn.BackColor = Color.Lime;
}
else
{
ctn.BackColor = Color.Red;
}
}
}
else
{
if (this.Controls.Find("cbt_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true).Length > 0)
{
CircleButton ctn = this.Controls.Find("cbt_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as CircleButton;
if (string.IsNullOrEmpty(item.PlcItemValue))
{
ctn.BackColor = Color.FromArgb(191, 219, 255);
}
else if (bool.Parse(item.PlcItemValue.ToString()))
{
ctn.BackColor = Color.Lime;
}
else
{
ctn.BackColor = Color.Red;
}
}
}
}));
}
private void initControl()
{
try
{
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
{
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (BasPlcItemMd item in tempLst)
{
Invoke(new Action(() =>
{
if (this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true).Length > 0)
{
KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
}
}));
}
}
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
{
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (BasPlcItemMd item in tempLst)
{
Invoke(new Action(() =>
{
if (this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true).Length > 0)
{
KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel;
label1.Text = _InfoLanguageTextList.GetInfoText_1(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode, "Label");
}
}));
}
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
}
}

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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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>

View File

@@ -0,0 +1,214 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmMaintenance
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.btn_logout = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.lbtitle = new System.Windows.Forms.Label();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonGroupBox4 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kbtn_Pass_Yes = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonLabel55 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.lbwarning = new System.Windows.Forms.Label();
this.kryptonTextBox1 = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).BeginInit();
this.kryptonGroupBox4.Panel.SuspendLayout();
this.kryptonGroupBox4.SuspendLayout();
this.SuspendLayout();
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.TitleControl;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.btn_logout);
this.kryptonGroupBox1.Panel.Controls.Add(this.lbtitle);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 95);
this.kryptonGroupBox1.TabIndex = 6;
this.kryptonGroupBox1.Values.Heading = "";
//
// btn_logout
//
this.btn_logout.Location = new System.Drawing.Point(859, 15);
this.btn_logout.Name = "btn_logout";
this.btn_logout.Size = new System.Drawing.Size(101, 60);
this.btn_logout.StateCommon.Content.ShortText.Font = new System.Drawing.Font("新宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_logout.TabIndex = 18;
this.btn_logout.Values.Text = "EXIT";
this.btn_logout.Click += new System.EventHandler(this.btn_logout_Click);
//
// lbtitle
//
this.lbtitle.AutoSize = true;
this.lbtitle.BackColor = System.Drawing.Color.Transparent;
this.lbtitle.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbtitle.Location = new System.Drawing.Point(10, 29);
this.lbtitle.Name = "lbtitle";
this.lbtitle.Size = new System.Drawing.Size(552, 27);
this.lbtitle.TabIndex = 0;
this.lbtitle.Text = "The equipment is under maintenance !";
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 95);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonGroupBox4);
this.kryptonGroupBox2.Panel.Controls.Add(this.lbwarning);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 577);
this.kryptonGroupBox2.TabIndex = 7;
this.kryptonGroupBox2.Values.Heading = "";
//
// kryptonGroupBox4
//
this.kryptonGroupBox4.CaptionOverlap = 0D;
this.kryptonGroupBox4.Location = new System.Drawing.Point(58, 98);
this.kryptonGroupBox4.Name = "kryptonGroupBox4";
//
// kryptonGroupBox4.Panel
//
this.kryptonGroupBox4.Panel.Controls.Add(this.kryptonTextBox1);
this.kryptonGroupBox4.Panel.Controls.Add(this.kbtn_Pass_Yes);
this.kryptonGroupBox4.Panel.Controls.Add(this.kryptonLabel55);
this.kryptonGroupBox4.Size = new System.Drawing.Size(872, 278);
this.kryptonGroupBox4.TabIndex = 22;
this.kryptonGroupBox4.Values.Heading = "Maintaining";
//
// kbtn_Pass_Yes
//
this.kbtn_Pass_Yes.Location = new System.Drawing.Point(312, 192);
this.kbtn_Pass_Yes.Name = "kbtn_Pass_Yes";
this.kbtn_Pass_Yes.Size = new System.Drawing.Size(245, 40);
this.kbtn_Pass_Yes.StateCommon.Back.Color1 = System.Drawing.Color.Lime;
this.kbtn_Pass_Yes.StateCommon.Back.Color2 = System.Drawing.Color.Lime;
this.kbtn_Pass_Yes.StateCommon.Border.Color1 = System.Drawing.Color.Black;
this.kbtn_Pass_Yes.StateCommon.Border.DrawBorders = ((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders)((((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Top | ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Bottom)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Left)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Right)));
this.kbtn_Pass_Yes.StateCommon.Border.Width = 2;
this.kbtn_Pass_Yes.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kbtn_Pass_Yes.TabIndex = 26;
this.kbtn_Pass_Yes.Values.Text = "Relieve Maintain";
this.kbtn_Pass_Yes.Click += new System.EventHandler(this.kbtn_Pass_Yes_Click);
//
// kryptonLabel55
//
this.kryptonLabel55.Location = new System.Drawing.Point(43, 41);
this.kryptonLabel55.Name = "kryptonLabel55";
this.kryptonLabel55.Size = new System.Drawing.Size(789, 35);
this.kryptonLabel55.StateCommon.ShortText.Color1 = System.Drawing.Color.Black;
this.kryptonLabel55.StateCommon.ShortText.Color2 = System.Drawing.Color.Black;
this.kryptonLabel55.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonLabel55.TabIndex = 25;
this.kryptonLabel55.Values.Text = "Please enter the Maintenance Unconfirmation Code ! ";
//
// lbwarning
//
this.lbwarning.AutoSize = true;
this.lbwarning.BackColor = System.Drawing.Color.Transparent;
this.lbwarning.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbwarning.Location = new System.Drawing.Point(11, 366);
this.lbwarning.Name = "lbwarning";
this.lbwarning.Size = new System.Drawing.Size(19, 20);
this.lbwarning.TabIndex = 0;
this.lbwarning.Text = " ";
//
// kryptonTextBox1
//
this.kryptonTextBox1.Location = new System.Drawing.Point(213, 117);
this.kryptonTextBox1.Name = "kryptonTextBox1";
this.kryptonTextBox1.Size = new System.Drawing.Size(433, 37);
this.kryptonTextBox1.StateCommon.Border.DrawBorders = ((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders)((((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Top | ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Bottom)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Left)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Right)));
this.kryptonTextBox1.StateCommon.Border.Width = 2;
this.kryptonTextBox1.StateCommon.Content.Color1 = System.Drawing.Color.Black;
this.kryptonTextBox1.StateCommon.Content.Font = new System.Drawing.Font("新宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonTextBox1.TabIndex = 27;
this.kryptonTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// frmMaintenance
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonGroupBox2);
this.Controls.Add(this.kryptonGroupBox1);
this.Name = "frmMaintenance";
this.Size = new System.Drawing.Size(1024, 672);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
this.kryptonGroupBox1.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
this.kryptonGroupBox2.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).EndInit();
this.kryptonGroupBox4.Panel.ResumeLayout(false);
this.kryptonGroupBox4.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).EndInit();
this.kryptonGroupBox4.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private ComponentFactory.Krypton.Toolkit.KryptonButton btn_logout;
private System.Windows.Forms.Label lbtitle;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox4;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbtn_Pass_Yes;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel55;
private System.Windows.Forms.Label lbwarning;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox kryptonTextBox1;
}
}

View File

@@ -0,0 +1,76 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.Maintenance)]
public partial class frmMaintenance : UserControl
{
public frmMaintenance()
{
InitializeComponent();
}
private void kbtn_Pass_Yes_Click(object sender, EventArgs e)
{
try
{
if (string.IsNullOrEmpty(kryptonTextBox1.Text))
{
KryptonMessageBox.Show("The code cannot be empty !");
return;
}
string sqlParam = $@"SELECT * FROM SYS_PARAMETER";
DataTable dtParam = LeadDbHelperSQLite.Query(sqlParam).Tables[0];
if (dtParam != null && dtParam.Rows.Count > 0)
{
string maintainRelieveCode = dtParam.Select("PARAMETER_CODE = 'MaintainRelieveCode'")[0]["PARAMETER_VALUE"].ToString();
if (kryptonTextBox1.Text == maintainRelieveCode)
{
bool canOperate = Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("SelfCheckPassFlag", PlcItemTypeDesc.M));
//自检通过则切换至主界面,否则进入自检画面
if (canOperate)
{
frmMainNew.SwitchFrmMenu(EnumFormType.MainDetail, true);
}
else
{
frmMainNew.SwitchFrmMenu(EnumFormType.MechineCheck, true);
}
string sqlUpdateParam = $@"update SYS_PARAMETER set PARAMETER_VALUE = '0' WHERE PARAMETER_CODE = 'MaintainFlag'";
LeadDbHelperSQLite.ExecuteSql(sqlUpdateParam);
string sqlUpdateRunTimeLen = $@"UPDATE SYS_PARAMETER set PARAMETER_VALUE = '0' WHERE PARAMETER_CODE = 'SysRuningTimeLen'";
LeadDbHelperSQLite.ExecuteSql(sqlUpdateRunTimeLen);
frmMainNew.RemoveMaintainingFlag();
}
else
{
KryptonMessageBox.Show("Inputted maintenance uncode error !");
return;
}
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
private void btn_logout_Click(object sender, EventArgs e)
{
GlobalHelper.LoginForm.Show();
GlobalHelper.MainFormNew.Hide();
}
}
}

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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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>

View File

@@ -0,0 +1,466 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmMechineCheck
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.cbt_Brush3StatusTran = new CleanMachineHMI.CircleButton();
this.swtbtn_brush1 = new CleanMachineHMI.LSwitchButton();
this.swtbtn_brush3 = new CleanMachineHMI.LSwitchButton();
this.kryptonLabel7 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.swtbtn_brush2 = new CleanMachineHMI.LSwitchButton();
this.cbt_Brush2StatusTran = new CleanMachineHMI.CircleButton();
this.cbt_Brush1StatusTran = new CleanMachineHMI.CircleButton();
this.kryptonGroupBox5 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.cbt_RunStatusTran = new CleanMachineHMI.CircleButton();
this.lbwarning = new System.Windows.Forms.Label();
this.cbt_ResetSys = new CleanMachineHMI.CircleButton();
this.cbt_StartTran = new CleanMachineHMI.CircleButton();
this.kbtn_Pass_No = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbtn_Pass_Yes = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonLabel66 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel55 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonGroupBox4 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonGroupBox3 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.btn_logout = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.lbtitle = new System.Windows.Forms.Label();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox5.Panel)).BeginInit();
this.kryptonGroupBox5.Panel.SuspendLayout();
this.kryptonGroupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).BeginInit();
this.kryptonGroupBox4.Panel.SuspendLayout();
this.kryptonGroupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).BeginInit();
this.kryptonGroupBox3.Panel.SuspendLayout();
this.kryptonGroupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.SuspendLayout();
//
// kryptonLabel2
//
this.kryptonLabel2.Location = new System.Drawing.Point(43, 125);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(69, 20);
this.kryptonLabel2.TabIndex = 29;
this.kryptonLabel2.Values.Text = "毛刷选择3";
//
// cbt_Brush3StatusTran
//
this.cbt_Brush3StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush3StatusTran.Location = new System.Drawing.Point(227, 120);
this.cbt_Brush3StatusTran.Name = "cbt_Brush3StatusTran";
this.cbt_Brush3StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush3StatusTran.TabIndex = 27;
this.cbt_Brush3StatusTran.UseVisualStyleBackColor = false;
//
// swtbtn_brush1
//
this.swtbtn_brush1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush1.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush1.L_BarHight = 24;
this.swtbtn_brush1.L_CloseColor = System.Drawing.Color.Red;
this.swtbtn_brush1.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush1.L_DotHight = 20;
this.swtbtn_brush1.L_IsOpen = false;
this.swtbtn_brush1.L_Margin = 2;
this.swtbtn_brush1.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush1.Location = new System.Drawing.Point(129, 33);
this.swtbtn_brush1.Name = "swtbtn_brush1";
this.swtbtn_brush1.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush1.TabIndex = 23;
this.swtbtn_brush1.Text = "lSwitchButton1";
this.swtbtn_brush1.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush1_LSwitched);
//
// swtbtn_brush3
//
this.swtbtn_brush3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush3.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush3.L_BarHight = 24;
this.swtbtn_brush3.L_CloseColor = System.Drawing.Color.Red;
this.swtbtn_brush3.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush3.L_DotHight = 20;
this.swtbtn_brush3.L_IsOpen = false;
this.swtbtn_brush3.L_Margin = 2;
this.swtbtn_brush3.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush3.Location = new System.Drawing.Point(129, 123);
this.swtbtn_brush3.Name = "swtbtn_brush3";
this.swtbtn_brush3.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush3.TabIndex = 28;
this.swtbtn_brush3.Text = "lSwitchButton3";
this.swtbtn_brush3.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush3_LSwitched);
//
// kryptonLabel7
//
this.kryptonLabel7.Location = new System.Drawing.Point(43, 80);
this.kryptonLabel7.Name = "kryptonLabel7";
this.kryptonLabel7.Size = new System.Drawing.Size(69, 20);
this.kryptonLabel7.TabIndex = 26;
this.kryptonLabel7.Values.Text = "毛刷选择2";
//
// swtbtn_brush2
//
this.swtbtn_brush2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(225)))));
this.swtbtn_brush2.L_AnimateType = LEase.LEaseType.Quartic;
this.swtbtn_brush2.L_BarHight = 24;
this.swtbtn_brush2.L_CloseColor = System.Drawing.Color.Red;
this.swtbtn_brush2.L_DotColor = System.Drawing.Color.White;
this.swtbtn_brush2.L_DotHight = 20;
this.swtbtn_brush2.L_IsOpen = false;
this.swtbtn_brush2.L_Margin = 2;
this.swtbtn_brush2.L_OpenColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.swtbtn_brush2.Location = new System.Drawing.Point(129, 78);
this.swtbtn_brush2.Name = "swtbtn_brush2";
this.swtbtn_brush2.Size = new System.Drawing.Size(58, 25);
this.swtbtn_brush2.TabIndex = 25;
this.swtbtn_brush2.Text = "lSwitchButton2";
this.swtbtn_brush2.LSwitched += new CleanMachineHMI.LSwitchButton.LSwitchedEventHandler(this.swtbtn_brush2_LSwitched);
//
// cbt_Brush2StatusTran
//
this.cbt_Brush2StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush2StatusTran.Location = new System.Drawing.Point(227, 75);
this.cbt_Brush2StatusTran.Name = "cbt_Brush2StatusTran";
this.cbt_Brush2StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush2StatusTran.TabIndex = 24;
this.cbt_Brush2StatusTran.UseVisualStyleBackColor = false;
//
// cbt_Brush1StatusTran
//
this.cbt_Brush1StatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_Brush1StatusTran.Location = new System.Drawing.Point(227, 30);
this.cbt_Brush1StatusTran.Name = "cbt_Brush1StatusTran";
this.cbt_Brush1StatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_Brush1StatusTran.TabIndex = 10;
this.cbt_Brush1StatusTran.UseVisualStyleBackColor = false;
//
// kryptonGroupBox5
//
this.kryptonGroupBox5.CaptionOverlap = 0D;
this.kryptonGroupBox5.Location = new System.Drawing.Point(500, 24);
this.kryptonGroupBox5.Name = "kryptonGroupBox5";
//
// kryptonGroupBox5.Panel
//
this.kryptonGroupBox5.Panel.Controls.Add(this.kryptonLabel2);
this.kryptonGroupBox5.Panel.Controls.Add(this.cbt_Brush3StatusTran);
this.kryptonGroupBox5.Panel.Controls.Add(this.swtbtn_brush1);
this.kryptonGroupBox5.Panel.Controls.Add(this.swtbtn_brush3);
this.kryptonGroupBox5.Panel.Controls.Add(this.kryptonLabel7);
this.kryptonGroupBox5.Panel.Controls.Add(this.swtbtn_brush2);
this.kryptonGroupBox5.Panel.Controls.Add(this.cbt_Brush2StatusTran);
this.kryptonGroupBox5.Panel.Controls.Add(this.kryptonLabel1);
this.kryptonGroupBox5.Panel.Controls.Add(this.cbt_Brush1StatusTran);
this.kryptonGroupBox5.Size = new System.Drawing.Size(288, 209);
this.kryptonGroupBox5.TabIndex = 1;
this.kryptonGroupBox5.Values.Heading = "清洁毛刷选择";
//
// kryptonLabel1
//
this.kryptonLabel1.Location = new System.Drawing.Point(43, 35);
this.kryptonLabel1.Name = "kryptonLabel1";
this.kryptonLabel1.Size = new System.Drawing.Size(69, 20);
this.kryptonLabel1.TabIndex = 23;
this.kryptonLabel1.Values.Text = "毛刷选择1";
//
// kryptonLabel4
//
this.kryptonLabel4.Location = new System.Drawing.Point(59, 44);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(135, 20);
this.kryptonLabel4.TabIndex = 24;
this.kryptonLabel4.Values.Text = "System Running Status";
//
// cbt_RunStatusTran
//
this.cbt_RunStatusTran.BackColor = System.Drawing.Color.Gray;
this.cbt_RunStatusTran.Location = new System.Drawing.Point(200, 39);
this.cbt_RunStatusTran.Name = "cbt_RunStatusTran";
this.cbt_RunStatusTran.Size = new System.Drawing.Size(30, 30);
this.cbt_RunStatusTran.TabIndex = 13;
this.cbt_RunStatusTran.UseVisualStyleBackColor = false;
//
// lbwarning
//
this.lbwarning.AutoSize = true;
this.lbwarning.BackColor = System.Drawing.Color.Transparent;
this.lbwarning.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbwarning.Location = new System.Drawing.Point(11, 366);
this.lbwarning.Name = "lbwarning";
this.lbwarning.Size = new System.Drawing.Size(19, 20);
this.lbwarning.TabIndex = 0;
this.lbwarning.Text = " ";
//
// cbt_ResetSys
//
this.cbt_ResetSys.BackColor = System.Drawing.Color.DarkOrange;
this.cbt_ResetSys.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_ResetSys.ForeColor = System.Drawing.Color.White;
this.cbt_ResetSys.Location = new System.Drawing.Point(158, 81);
this.cbt_ResetSys.Name = "cbt_ResetSys";
this.cbt_ResetSys.Size = new System.Drawing.Size(60, 60);
this.cbt_ResetSys.TabIndex = 10;
this.cbt_ResetSys.Text = "RESET";
this.cbt_ResetSys.UseVisualStyleBackColor = false;
this.cbt_ResetSys.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseDown);
this.cbt_ResetSys.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cbt_ResetSys_MouseUp);
//
// cbt_StartTran
//
this.cbt_StartTran.BackColor = System.Drawing.Color.Lime;
this.cbt_StartTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbt_StartTran.Location = new System.Drawing.Point(74, 81);
this.cbt_StartTran.Name = "cbt_StartTran";
this.cbt_StartTran.Size = new System.Drawing.Size(60, 60);
this.cbt_StartTran.TabIndex = 12;
this.cbt_StartTran.Text = "START";
this.cbt_StartTran.UseVisualStyleBackColor = false;
this.cbt_StartTran.Click += new System.EventHandler(this.cbt_StartTran_Click_1);
//
// kbtn_Pass_No
//
this.kbtn_Pass_No.Location = new System.Drawing.Point(390, 101);
this.kbtn_Pass_No.Name = "kbtn_Pass_No";
this.kbtn_Pass_No.Size = new System.Drawing.Size(80, 80);
this.kbtn_Pass_No.StateCommon.Back.Color1 = System.Drawing.Color.Red;
this.kbtn_Pass_No.StateCommon.Back.Color2 = System.Drawing.Color.Red;
this.kbtn_Pass_No.StateCommon.Border.Color1 = System.Drawing.Color.Black;
this.kbtn_Pass_No.StateCommon.Border.DrawBorders = ((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders)((((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Top | ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Bottom)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Left)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Right)));
this.kbtn_Pass_No.StateCommon.Border.Width = 2;
this.kbtn_Pass_No.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kbtn_Pass_No.TabIndex = 26;
this.kbtn_Pass_No.Values.Text = "No";
this.kbtn_Pass_No.Click += new System.EventHandler(this.kbtn_Pass_No_Click);
//
// kbtn_Pass_Yes
//
this.kbtn_Pass_Yes.Location = new System.Drawing.Point(107, 101);
this.kbtn_Pass_Yes.Name = "kbtn_Pass_Yes";
this.kbtn_Pass_Yes.Size = new System.Drawing.Size(80, 80);
this.kbtn_Pass_Yes.StateCommon.Back.Color1 = System.Drawing.Color.Lime;
this.kbtn_Pass_Yes.StateCommon.Back.Color2 = System.Drawing.Color.Lime;
this.kbtn_Pass_Yes.StateCommon.Border.Color1 = System.Drawing.Color.Black;
this.kbtn_Pass_Yes.StateCommon.Border.DrawBorders = ((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders)((((ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Top | ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Bottom)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Left)
| ComponentFactory.Krypton.Toolkit.PaletteDrawBorders.Right)));
this.kbtn_Pass_Yes.StateCommon.Border.Width = 2;
this.kbtn_Pass_Yes.StateCommon.Content.ShortText.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kbtn_Pass_Yes.TabIndex = 26;
this.kbtn_Pass_Yes.Values.Text = "Yes";
this.kbtn_Pass_Yes.Click += new System.EventHandler(this.kbtn_Pass_Yes_Click);
//
// kryptonLabel66
//
this.kryptonLabel66.Location = new System.Drawing.Point(263, 105);
this.kryptonLabel66.Name = "kryptonLabel66";
this.kryptonLabel66.Size = new System.Drawing.Size(58, 26);
this.kryptonLabel66.StateCommon.ShortText.Color1 = System.Drawing.Color.Black;
this.kryptonLabel66.StateCommon.ShortText.Color2 = System.Drawing.Color.Black;
this.kryptonLabel66.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonLabel66.TabIndex = 25;
this.kryptonLabel66.Values.Text = "PASS";
//
// kryptonLabel55
//
this.kryptonLabel55.Location = new System.Drawing.Point(42, 25);
this.kryptonLabel55.Name = "kryptonLabel55";
this.kryptonLabel55.Size = new System.Drawing.Size(485, 42);
this.kryptonLabel55.StateCommon.ShortText.Color1 = System.Drawing.Color.Black;
this.kryptonLabel55.StateCommon.ShortText.Color2 = System.Drawing.Color.Black;
this.kryptonLabel55.StateCommon.ShortText.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.kryptonLabel55.TabIndex = 25;
this.kryptonLabel55.Values.Text = "Cleaning performance test";
//
// kryptonGroupBox4
//
this.kryptonGroupBox4.CaptionOverlap = 0D;
this.kryptonGroupBox4.Location = new System.Drawing.Point(206, 239);
this.kryptonGroupBox4.Name = "kryptonGroupBox4";
//
// kryptonGroupBox4.Panel
//
this.kryptonGroupBox4.Panel.Controls.Add(this.kbtn_Pass_No);
this.kryptonGroupBox4.Panel.Controls.Add(this.kbtn_Pass_Yes);
this.kryptonGroupBox4.Panel.Controls.Add(this.kryptonLabel66);
this.kryptonGroupBox4.Panel.Controls.Add(this.kryptonLabel55);
this.kryptonGroupBox4.Size = new System.Drawing.Size(582, 235);
this.kryptonGroupBox4.TabIndex = 22;
this.kryptonGroupBox4.Values.Heading = "Machine Check Test Result";
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 95);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonGroupBox4);
this.kryptonGroupBox2.Panel.Controls.Add(this.lbwarning);
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonGroupBox3);
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonGroupBox5);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 577);
this.kryptonGroupBox2.TabIndex = 5;
this.kryptonGroupBox2.Values.Heading = "";
//
// kryptonGroupBox3
//
this.kryptonGroupBox3.CaptionOverlap = 0D;
this.kryptonGroupBox3.Location = new System.Drawing.Point(206, 23);
this.kryptonGroupBox3.Name = "kryptonGroupBox3";
//
// kryptonGroupBox3.Panel
//
this.kryptonGroupBox3.Panel.Controls.Add(this.kryptonLabel4);
this.kryptonGroupBox3.Panel.Controls.Add(this.cbt_RunStatusTran);
this.kryptonGroupBox3.Panel.Controls.Add(this.cbt_ResetSys);
this.kryptonGroupBox3.Panel.Controls.Add(this.cbt_StartTran);
this.kryptonGroupBox3.Size = new System.Drawing.Size(288, 210);
this.kryptonGroupBox3.TabIndex = 21;
this.kryptonGroupBox3.Values.Heading = "System Running";
//
// btn_logout
//
this.btn_logout.Location = new System.Drawing.Point(859, 15);
this.btn_logout.Name = "btn_logout";
this.btn_logout.Size = new System.Drawing.Size(101, 60);
this.btn_logout.TabIndex = 18;
this.btn_logout.Values.Text = "退出系统";
this.btn_logout.Click += new System.EventHandler(this.kryptonButton1_Click);
//
// lbtitle
//
this.lbtitle.AutoSize = true;
this.lbtitle.BackColor = System.Drawing.Color.Transparent;
this.lbtitle.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbtitle.Location = new System.Drawing.Point(10, 29);
this.lbtitle.Name = "lbtitle";
this.lbtitle.Size = new System.Drawing.Size(255, 27);
this.lbtitle.TabIndex = 0;
this.lbtitle.Text = "清洁机操作自检测试";
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.TitleControl;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.btn_logout);
this.kryptonGroupBox1.Panel.Controls.Add(this.lbtitle);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 95);
this.kryptonGroupBox1.TabIndex = 4;
this.kryptonGroupBox1.Values.Heading = "";
//
// frmMechineCheck
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonGroupBox2);
this.Controls.Add(this.kryptonGroupBox1);
this.Name = "frmMechineCheck";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmMechineCheck_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox5.Panel)).EndInit();
this.kryptonGroupBox5.Panel.ResumeLayout(false);
this.kryptonGroupBox5.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox5)).EndInit();
this.kryptonGroupBox5.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).EndInit();
this.kryptonGroupBox4.Panel.ResumeLayout(false);
this.kryptonGroupBox4.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).EndInit();
this.kryptonGroupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
this.kryptonGroupBox2.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).EndInit();
this.kryptonGroupBox3.Panel.ResumeLayout(false);
this.kryptonGroupBox3.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).EndInit();
this.kryptonGroupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
this.kryptonGroupBox1.Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private CircleButton cbt_Brush3StatusTran;
private LSwitchButton swtbtn_brush1;
private LSwitchButton swtbtn_brush3;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel7;
private LSwitchButton swtbtn_brush2;
private CircleButton cbt_Brush2StatusTran;
private CircleButton cbt_Brush1StatusTran;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox5;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private CircleButton cbt_RunStatusTran;
private System.Windows.Forms.Label lbwarning;
private CircleButton cbt_ResetSys;
private CircleButton cbt_StartTran;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbtn_Pass_No;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbtn_Pass_Yes;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel66;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel55;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox4;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox3;
private ComponentFactory.Krypton.Toolkit.KryptonButton btn_logout;
private System.Windows.Forms.Label lbtitle;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
}
}

View File

@@ -0,0 +1,311 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.MechineCheck)]
public partial class frmMechineCheck : UserControl
{
/// <summary>
/// 页面信息语言文本列表
/// </summary>
private DataTable _InfoLanguageTextList;
public frmMechineCheck()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
//注销退出
private void kryptonButton1_Click(object sender, EventArgs e)
{
GlobalHelper.LoginForm.Show();
//GlobalHelper.MainForm.Hide();
GlobalHelper.MainFormNew.Hide();
}
private void swtbtn_brush1_LSwitched(object sender, LEventArgs e)
{
try
{
if (!PlcOperationHelper.Instance.isConn)
{
KryptonMessageBox.Show("The PLC is disconnected and unable to operate the equipment.");
swtbtn_brush1.L_IsOpen = false;
return;
}
//选中状态,并且跟当前状态有差别则发送选中状态
if (swtbtn_brush1.L_IsOpen)
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush1Selection", "True", PlcItemTypeDesc.M);
}
else
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush1Selection", "False", PlcItemTypeDesc.M);
}
}
catch (Exception)
{
}
}
private void swtbtn_brush2_LSwitched(object sender, LEventArgs e)
{
try
{
if (!PlcOperationHelper.Instance.isConn)
{
KryptonMessageBox.Show("The PLC is disconnected and unable to operate the equipment.");
swtbtn_brush2.L_IsOpen = false;
return;
}
//选中状态,并且跟当前状态有差别则发送选中状态
if (swtbtn_brush2.L_IsOpen)
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush2Selection", "True", PlcItemTypeDesc.M);
}
else
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush2Selection", "False", PlcItemTypeDesc.M);
}
}
catch (Exception)
{
}
}
private void cbt_ResetSys_MouseDown(object sender, MouseEventArgs e)
{
try
{
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ResetSys", PlcItemTypeDesc.M)))
{
PlcOperationHelper.Instance.WritePlcItem("ResetSys", "True", PlcItemTypeDesc.M);
}
}
catch (Exception)
{
}
}
private void cbt_ResetSys_MouseUp(object sender, MouseEventArgs e)
{
try
{
PlcOperationHelper.Instance.WritePlcItem("ResetSys", "False", PlcItemTypeDesc.M);
}
catch (Exception)
{
}
}
//初始化,同步内存监控点状态
private void frmMechineCheck_Load(object sender, EventArgs e)
{
this.SetFormControlText(GlobalHelper.LanguageCode);
Thread th1 = new Thread(MainDtlRunTh);
th1.IsBackground = true;
th1.Start();
//毛刷1运行状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush1Selection", PlcItemTypeDesc.M)))
{
swtbtn_brush1.L_IsOpen = true;
}
else
{
swtbtn_brush1.L_IsOpen = false;
}
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush2Selection", PlcItemTypeDesc.M)))
{
swtbtn_brush2.L_IsOpen = true;
}
else
{
swtbtn_brush2.L_IsOpen = false;
}
//毛刷3启用状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush3Selection", PlcItemTypeDesc.M)))
{
swtbtn_brush3.L_IsOpen = true;
}
else
{
swtbtn_brush3.L_IsOpen = false;
}
}
//同步运行状态
private void MainDtlRunTh()
{
while (GlobalHelper.SysThIsRunFlag)
{
try
{
//系统运行状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("SelfCheckFlag", PlcItemTypeDesc.M)))
{
Invoke(new Action(() => { cbt_RunStatusTran.BackColor = Color.Lime; }));
}
else
{
Invoke(new Action(() => { cbt_RunStatusTran.BackColor = Color.Gray; }));
}
//毛刷1运行状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush1Selection", PlcItemTypeDesc.M)))
{
Invoke(new Action(() => { cbt_Brush1StatusTran.BackColor = Color.Lime; }));
}
else
{
Invoke(new Action(() => { cbt_Brush1StatusTran.BackColor = Color.Gray; }));
}
//毛刷2启用状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush2Selection", PlcItemTypeDesc.M)))
{
Invoke(new Action(() => { cbt_Brush2StatusTran.BackColor = Color.Lime; }));
}
else
{
Invoke(new Action(() => { cbt_Brush2StatusTran.BackColor = Color.Gray; }));
}
//毛刷3启用状态
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("Hairbrush3Selection", PlcItemTypeDesc.M)))
{
Invoke(new Action(() => { cbt_Brush3StatusTran.BackColor = Color.Lime; }));
}
else
{
Invoke(new Action(() => { cbt_Brush3StatusTran.BackColor = Color.Gray; }));
}
if (GlobalHelper.CanOperate)
{
break;
}
}
catch
{
}
Thread.Sleep(50);
}
}
private void kbtn_Pass_Yes_Click(object sender, EventArgs e)
{
try
{
//自检结束后发送停止检测信号
PlcOperationHelper.Instance.WritePlcItem("SelfCheckFlag", "False", PlcItemTypeDesc.M);
//自检通过后,发送检测通过信号
PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "True", PlcItemTypeDesc.M);
//系统默认进入自动模式
PlcOperationHelper.Instance.WritePlcItem("ManualOrAuto", "False", PlcItemTypeDesc.M);
//GlobalHelper.MainForm.navigatorMain.SetNavPage(Domain.Enums.EnumFormType.MainDetail);
frmMainNew.SwitchFrmMenu(EnumFormType.MainDetail, true);
//frmMainNew.SwitchFrmMenu(EnumFormType.IoMonitor, false);
GlobalHelper.CanOperate = true;
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
private void kbtn_Pass_No_Click(object sender, EventArgs e)
{
try
{
//自检结束后发送停止检测信号
PlcOperationHelper.Instance.WritePlcItem("SelfCheckFlag", "False", PlcItemTypeDesc.M);
//自检通过后,发送检测通过信号
PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "False", PlcItemTypeDesc.M);
//测试未通过,请检查并重新测试
GlobalHelper.CanOperate = false;
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg"));
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
private void cbt_StartTran_Click_1(object sender, EventArgs e)
{
try
{
if (swtbtn_brush1.L_IsOpen || swtbtn_brush2.L_IsOpen || swtbtn_brush3.L_IsOpen)
{
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("SelfCheckFlag", PlcItemTypeDesc.M)))
{
PlcOperationHelper.Instance.WritePlcItem("SelfCheckFlag", "True", PlcItemTypeDesc.M);
}
else
{
KryptonMessageBox.Show("Press Yes or No First !");
}
}
else
{
KryptonMessageBox.Show("Brush Need to be Selected First!");
}
}
catch (Exception)
{
}
}
private void swtbtn_brush3_LSwitched(object sender, LEventArgs e)
{
try
{
if (!PlcOperationHelper.Instance.isConn)
{
KryptonMessageBox.Show("The PLC is disconnected and unable to operate the equipment.");
swtbtn_brush3.L_IsOpen = false;
return;
}
//选中状态,并且跟当前状态有差别则发送选中状态
if (swtbtn_brush3.L_IsOpen)
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush3Selection", "True", PlcItemTypeDesc.M);
}
else
{
PlcOperationHelper.Instance.WritePlcItem("Hairbrush3Selection", "False", PlcItemTypeDesc.M);
}
}
catch (Exception)
{
}
}
}
}

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>

View File

@@ -0,0 +1,339 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmParamater
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonPanel2 = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
this.kryptonGroupBox3 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonDataGridView1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox4 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonButton1 = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_CreateEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kdtp_CreateStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_ParamaterCode = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_ParamaterName = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
this.kryptonPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).BeginInit();
this.kryptonGroupBox3.Panel.SuspendLayout();
this.kryptonGroupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).BeginInit();
this.kryptonGroupBox4.Panel.SuspendLayout();
this.kryptonGroupBox4.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// kryptonPanel2
//
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox3);
this.kryptonPanel2.Controls.Add(this.kryptonGroupBox4);
this.kryptonPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel2.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel2.Name = "kryptonPanel2";
this.kryptonPanel2.Size = new System.Drawing.Size(1024, 672);
this.kryptonPanel2.TabIndex = 5;
//
// kryptonGroupBox3
//
this.kryptonGroupBox3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly;
this.kryptonGroupBox3.CaptionOverlap = 0D;
this.kryptonGroupBox3.CaptionStyle = ComponentFactory.Krypton.Toolkit.LabelStyle.NormalControl;
this.kryptonGroupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox3.Location = new System.Drawing.Point(0, 150);
this.kryptonGroupBox3.Name = "kryptonGroupBox3";
//
// kryptonGroupBox3.Panel
//
this.kryptonGroupBox3.Panel.Controls.Add(this.kryptonDataGridView1);
this.kryptonGroupBox3.Size = new System.Drawing.Size(1024, 522);
this.kryptonGroupBox3.TabIndex = 6;
this.kryptonGroupBox3.Values.Heading = "数据区:";
//
// kryptonDataGridView1
//
this.kryptonDataGridView1.AllowUserToAddRows = false;
this.kryptonDataGridView1.AllowUserToDeleteRows = false;
this.kryptonDataGridView1.AllowUserToResizeRows = false;
this.kryptonDataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.kryptonDataGridView1.DataMember = "TestData";
this.kryptonDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView1.GridStyles.Style = ComponentFactory.Krypton.Toolkit.DataGridViewStyle.Mixed;
this.kryptonDataGridView1.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView1.MultiSelect = false;
this.kryptonDataGridView1.Name = "kryptonDataGridView1";
this.kryptonDataGridView1.ReadOnly = true;
this.kryptonDataGridView1.RowHeadersVisible = false;
this.kryptonDataGridView1.RowHeadersWidth = 100;
this.kryptonDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 500);
this.kryptonDataGridView1.TabIndex = 3;
//
// kryptonGroupBox4
//
this.kryptonGroupBox4.CaptionOverlap = 0D;
this.kryptonGroupBox4.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox4.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox4.Name = "kryptonGroupBox4";
//
// kryptonGroupBox4.Panel
//
this.kryptonGroupBox4.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox4.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox4.Size = new System.Drawing.Size(1024, 150);
this.kryptonGroupBox4.TabIndex = 0;
this.kryptonGroupBox4.Values.Heading = "查询操作:";
//
// kryptonButton1
//
this.kryptonButton1.Location = new System.Drawing.Point(3, 3);
this.kryptonButton1.Name = "kryptonButton1";
this.kryptonButton1.Size = new System.Drawing.Size(154, 35);
this.kryptonButton1.TabIndex = 7;
this.kryptonButton1.Values.Text = "出料运行方向切换";
this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click);
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 4;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33112F));
this.tableLayoutPanel2.Controls.Add(this.kryptonButton1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(605, 78);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(415, 41);
this.tableLayoutPanel2.TabIndex = 6;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(333, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(79, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(248, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(79, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(163, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(79, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateEndTime, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.kdtp_CreateStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_ParamaterCode, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_ParamaterName, 3, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1020, 72);
this.tableLayoutPanel1.TabIndex = 5;
//
// kdtp_CreateEndTime
//
this.kdtp_CreateEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateEndTime.Location = new System.Drawing.Point(702, 43);
this.kdtp_CreateEndTime.Name = "kdtp_CreateEndTime";
this.kdtp_CreateEndTime.ShowCheckBox = true;
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
// kdtp_CreateStartTime
//
this.kdtp_CreateStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_CreateStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_CreateStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_CreateStartTime.Location = new System.Drawing.Point(192, 43);
this.kdtp_CreateStartTime.Name = "kdtp_CreateStartTime";
this.kdtp_CreateStartTime.ShowCheckBox = true;
this.kdtp_CreateStartTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateStartTime.TabIndex = 7;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel2.TabIndex = 4;
this.kryptonLabel2.Values.Text = "参数编码:";
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(558, 44);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 4;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_ParamaterCode
//
this.ktb_ParamaterCode.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_ParamaterCode.Location = new System.Drawing.Point(192, 6);
this.ktb_ParamaterCode.Name = "ktb_ParamaterCode";
this.ktb_ParamaterCode.Size = new System.Drawing.Size(246, 23);
this.ktb_ParamaterCode.TabIndex = 5;
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(3, 39);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel4.TabIndex = 4;
this.kryptonLabel4.Values.Text = "创建时间:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(513, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(114, 30);
this.kryptonLabel3.TabIndex = 4;
this.kryptonLabel3.Values.Text = "参数名称:";
//
// ktb_ParamaterName
//
this.ktb_ParamaterName.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_ParamaterName.Location = new System.Drawing.Point(702, 6);
this.ktb_ParamaterName.Name = "ktb_ParamaterName";
this.ktb_ParamaterName.Size = new System.Drawing.Size(246, 23);
this.ktb_ParamaterName.TabIndex = 5;
//
// frmParamater
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonPanel2);
this.Name = "frmParamater";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmParamater_Load);
this.Click += new System.EventHandler(this.frmParamater_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).EndInit();
this.kryptonPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).EndInit();
this.kryptonGroupBox3.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).EndInit();
this.kryptonGroupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4.Panel)).EndInit();
this.kryptonGroupBox4.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox4)).EndInit();
this.kryptonGroupBox4.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonPanel kryptonPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox3;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox4;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_CreateStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_ParamaterCode;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_ParamaterName;
private ComponentFactory.Krypton.Toolkit.KryptonButton kryptonButton1;
}
}

View File

@@ -0,0 +1,161 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.Parameter)]
public partial class frmParamater : UserControl
{
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
public frmParamater()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
public void Init()
{
var sql = $@"select PARAMETER_ID 序号,PARAMETER_CODE 参数编码,PARAMETER_NAME 参数名称,PARAMETER_VALUE 参数值,CREATE_TIME 创建时间 from SYS_PARAMETER where USED_FLAG=1 and DEL_FLAG=0 ";
if (!string.IsNullOrEmpty(ktb_ParamaterCode.Text))
{
sql += $" AND PARAMETER_CODE LIKE '%{ktb_ParamaterCode.Text}%'";
}
if (!string.IsNullOrEmpty(ktb_ParamaterName.Text))
{
sql += $" AND PARAMETER_NAME LIKE '%{ktb_ParamaterName.Text}%'";
}
if (kdtp_CreateStartTime.Checked)
{
sql += $" AND CREATE_TIME >= '{kdtp_CreateStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
if (kdtp_CreateEndTime.Checked)
{
sql += $" AND CREATE_TIME <= '{kdtp_CreateEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
kryptonDataGridView1.Columns.Clear();
kryptonDataGridView1.DataSource = dt;
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_ParamaterCode.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_ParamaterCode.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_ParamaterName.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_ParamaterName.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmParamater_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
this.SetFormControlText(GlobalHelper.LanguageCode);
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox3.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_ParamaterCode.Text = "";
ktb_ParamaterName.Text = "";
kdtp_CreateStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_CreateEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_CreateStartTime.Checked = false;
kdtp_CreateEndTime.Checked = false;
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (kryptonDataGridView1.SelectedRows.Count > 0)
{
frmEditParamater frm = new frmEditParamater();
frm.ParamaterId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow"));
}
}
private void kryptonButton1_Click(object sender, EventArgs e)
{
//if (!PlcOperationHelper.Instance.isConn)
//{
// KryptonMessageBox.Show("The PLC is disconnected and unable to operate the equipment.");
// return;
//}
frmSwitchRunDirection frm = new frmSwitchRunDirection();
frm.ShowDialog();
}
}
}

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>

View File

@@ -0,0 +1,297 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmPlcAlarmLog
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonDataGridView1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_plcMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kcmb_plcAlarmStatus = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_plcAlarmHandleResult = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbtn_UuivertorAlarmClear = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcAlarmStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcAlarmHandleResult)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.SuspendLayout();
//
// kryptonDataGridView1
//
this.kryptonDataGridView1.AllowUserToAddRows = false;
this.kryptonDataGridView1.AllowUserToDeleteRows = false;
this.kryptonDataGridView1.AllowUserToResizeColumns = false;
this.kryptonDataGridView1.AllowUserToResizeRows = false;
this.kryptonDataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.kryptonDataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
this.kryptonDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView1.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView1.MultiSelect = false;
this.kryptonDataGridView1.Name = "kryptonDataGridView1";
this.kryptonDataGridView1.RowTemplate.Height = 23;
this.kryptonDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 522);
this.kryptonDataGridView1.TabIndex = 0;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 126);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonDataGridView1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 546);
this.kryptonGroupBox2.TabIndex = 5;
this.kryptonGroupBox2.Values.Heading = "数据区:";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 6;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_plcMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_plcAlarmStatus, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_plcAlarmHandleResult, 5, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1020, 38);
this.tableLayoutPanel1.TabIndex = 0;
//
// kryptonLabel1
//
this.kryptonLabel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel1.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel1.Name = "kryptonLabel1";
this.kryptonLabel1.Size = new System.Drawing.Size(114, 32);
this.kryptonLabel1.TabIndex = 1;
this.kryptonLabel1.Values.Text = "报警信息:";
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(333, 3);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 32);
this.kryptonLabel4.TabIndex = 1;
this.kryptonLabel4.Values.Text = "报警状态:";
//
// ktb_plcMsg
//
this.ktb_plcMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_plcMsg.Location = new System.Drawing.Point(132, 7);
this.ktb_plcMsg.Name = "ktb_plcMsg";
this.ktb_plcMsg.Size = new System.Drawing.Size(186, 23);
this.ktb_plcMsg.TabIndex = 2;
//
// kcmb_plcAlarmStatus
//
this.kcmb_plcAlarmStatus.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_plcAlarmStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.kcmb_plcAlarmStatus.DropDownWidth = 248;
this.kcmb_plcAlarmStatus.Items.AddRange(new object[] {
"请选择",
"正在报警",
"报警结束"});
this.kcmb_plcAlarmStatus.Location = new System.Drawing.Point(462, 8);
this.kcmb_plcAlarmStatus.Name = "kcmb_plcAlarmStatus";
this.kcmb_plcAlarmStatus.Size = new System.Drawing.Size(186, 21);
this.kcmb_plcAlarmStatus.TabIndex = 3;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(663, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(144, 32);
this.kryptonLabel2.TabIndex = 1;
this.kryptonLabel2.Values.Text = "报警处理结果:";
//
// kcmb_plcAlarmHandleResult
//
this.kcmb_plcAlarmHandleResult.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_plcAlarmHandleResult.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.kcmb_plcAlarmHandleResult.DropDownWidth = 248;
this.kcmb_plcAlarmHandleResult.Items.AddRange(new object[] {
"请选择",
"未处理",
"已处理"});
this.kcmb_plcAlarmHandleResult.Location = new System.Drawing.Point(821, 8);
this.kcmb_plcAlarmHandleResult.Name = "kcmb_plcAlarmHandleResult";
this.kcmb_plcAlarmHandleResult.Size = new System.Drawing.Size(187, 21);
this.kcmb_plcAlarmHandleResult.TabIndex = 3;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(285, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(137, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(144, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(135, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.Controls.Add(this.kbtn_UuivertorAlarmClear, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 1, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(585, 49);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(425, 41);
this.tableLayoutPanel2.TabIndex = 1;
//
// kbtn_UuivertorAlarmClear
//
this.kbtn_UuivertorAlarmClear.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbtn_UuivertorAlarmClear.Location = new System.Drawing.Point(3, 3);
this.kbtn_UuivertorAlarmClear.Name = "kbtn_UuivertorAlarmClear";
this.kbtn_UuivertorAlarmClear.Size = new System.Drawing.Size(135, 35);
this.kbtn_UuivertorAlarmClear.TabIndex = 2;
this.kbtn_UuivertorAlarmClear.Values.Text = "变频器报警清除";
this.kbtn_UuivertorAlarmClear.MouseDown += new System.Windows.Forms.MouseEventHandler(this.kbtn_UuivertorAlarmClear_MouseDown);
this.kbtn_UuivertorAlarmClear.MouseUp += new System.Windows.Forms.MouseEventHandler(this.kbtn_UuivertorAlarmClear_MouseUp);
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 126);
this.kryptonGroupBox1.TabIndex = 4;
this.kryptonGroupBox1.Values.Heading = "查询操作";
//
// frmPlcAlarmLog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonGroupBox2);
this.Controls.Add(this.kryptonGroupBox1);
this.Name = "frmPlcAlarmLog";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmPlcAlarmLog_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcAlarmStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcAlarmHandleResult)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_plcMsg;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_plcAlarmStatus;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_plcAlarmHandleResult;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbtn_UuivertorAlarmClear;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
}
}

View File

@@ -0,0 +1,272 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
using NX_LogUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.PlcAlarmLog)]
public partial class frmPlcAlarmLog : UserControl
{
public frmPlcAlarmLog()
{
InitializeComponent();
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _ComboBoxLanguageTextList;
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost(bool isContainHisData);
public static dlgRefreshFrmHost RefreshFrmHost;
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
RefreshPlcData(true);
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!");
}
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
kcmb_plcAlarmStatus.SelectedIndex = 0;
kcmb_plcAlarmHandleResult.SelectedIndex = 0;
ktb_plcMsg.Text = "";
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_plcMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_plcMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmPlcAlarmLog_Load(object sender, EventArgs e)
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
kcmb_plcAlarmStatus.Items.Clear();
if (GlobalHelper.LanguageCode == "English")
{
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name, "KryptonComboBox"))
{
kcmb_plcAlarmStatus.Items.Add(item["CONTROL_NAME"].ToString());
}
kcmb_plcAlarmHandleResult.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name, "KryptonComboBox"))
{
kcmb_plcAlarmHandleResult.Items.Add(item["CONTROL_NAME"].ToString());
}
}
kcmb_plcAlarmStatus.SelectedIndex = 0;
kcmb_plcAlarmHandleResult.SelectedIndex = 0;
RefreshFrmHost = new dlgRefreshFrmHost(RefreshPlcData);
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox1.Focus();
}
private void RefreshPlcData(bool isContainHisData)
{
List<CM_WarningLogMd> tmpWarningLogList = new List<CM_WarningLogMd>();
tmpWarningLogList.AddRange(GlobalHelper.CmWarningLogMd_List);
if (isContainHisData)
{
string sql = $@"SELECT * FROM CM_WARNING_LOG";
DataTable dtHis = LeadDbHelperSQLite.Query(sql).Tables[0];
foreach (DataRow item in dtHis.Rows)
{
tmpWarningLogList.Add(new CM_WarningLogMd
{
WarningCode = item["WARNING_CODE"].ToString(),
WarningName = item["WARNING_NAME"].ToString(),
WarningType = item["WARNING_TYPE"].ToString(),
WarningMessage = item["WARNING_MESSAGE"].ToString(),
WarningTime = Convert.ToDateTime(item["WARNING_TIME"]),
PlcItemCode = item["PLC_ITEM_CODE"].ToString(),
WarningStatus = Convert.ToInt32(item["WARING_STATUS"]),
WarningHandleResult = Convert.ToInt32(item["WARNING_HANDLE_RESULT"]),
WarningHandleTime = Convert.ToDateTime(item["WARNING_HANDLE_TIME"]),
CreateBy = Convert.ToInt32(item["CREATE_BY"]),
CreateTime = Convert.ToDateTime(item["CREATE_TIME"]),
UpdateBy = Convert.ToInt32(item["UPDATE_BY"]),
UpdateTime = Convert.ToDateTime(item["UPDATE_TIME"]),
DataVersion = Convert.ToInt32(item["DATA_VERSION"]),
});
}
}
if (!string.IsNullOrEmpty(ktb_plcMsg.Text.Trim()))
{
tmpWarningLogList = tmpWarningLogList.FindAll(x => x.WarningCode.Contains(ktb_plcMsg.Text.Trim()) || x.WarningName.Contains(ktb_plcMsg.Text.Trim()));
}
if (tmpWarningLogList == null && tmpWarningLogList.Count > 0)
{
if (kcmb_plcAlarmStatus.SelectedIndex != 0)
{
tmpWarningLogList = tmpWarningLogList.FindAll(x => x.WarningStatus == (kcmb_plcAlarmStatus.SelectedIndex - 1));
}
if (tmpWarningLogList == null && tmpWarningLogList.Count > 0)
{
if (kcmb_plcAlarmHandleResult.SelectedIndex != 0)
{
tmpWarningLogList = tmpWarningLogList.FindAll(x => x.WarningHandleResult == (kcmb_plcAlarmHandleResult.SelectedIndex - 1));
}
}
}
if (tmpWarningLogList != null && tmpWarningLogList.Count > 0)
{
tmpWarningLogList.OrderByDescending(x => x.WarningTime);
DataTable dt = new DataTable();
DataColumn dc1 = new DataColumn("序号", Type.GetType("System.Int32"));
DataColumn dc2 = new DataColumn("PLC变量地址", Type.GetType("System.String"));
DataColumn dc3 = new DataColumn("报警条码", Type.GetType("System.String"));
DataColumn dc4 = new DataColumn("报警内容", Type.GetType("System.String"));
DataColumn dc5 = new DataColumn("报警时间", Type.GetType("System.String"));
DataColumn dc6 = new DataColumn("报警状态", Type.GetType("System.String"));
DataColumn dc7 = new DataColumn("处理结果", Type.GetType("System.String"));
DataColumn dc8 = new DataColumn("处理时间", Type.GetType("System.String"));
DataColumn dc9 = new DataColumn("报警时长", Type.GetType("System.String"));
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);
dt.Columns.Add(dc4);
dt.Columns.Add(dc5);
dt.Columns.Add(dc6);
dt.Columns.Add(dc7);
dt.Columns.Add(dc8);
dt.Columns.Add(dc9);
int index = 1;
foreach (CM_WarningLogMd item in tmpWarningLogList)
{
DataRow dr = dt.NewRow();
dr["序号"] = index;
dr["PLC变量地址"] = item.PlcItemCode;
dr["报警条码"] = item.WarningCode;
dr["报警内容"] = item.WarningName;
dr["报警时间"] = item.WarningTime;
if (item.WarningStatus == 0)
{
//dr["报警状态"] = "正在报警";
dr["报警状态"] = "Occurrent Alarm";
dr["处理时间"] = "";
string dateDiff = null;
TimeSpan ts1 = new TimeSpan(item.WarningTime.Ticks);
TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks);
TimeSpan ts = ts1.Subtract(ts2).Duration();
dateDiff = ts.Days.ToString() + "天"
+ ts.Hours.ToString() + "小时"
+ ts.Minutes.ToString() + "分钟"
+ ts.Seconds.ToString() + "秒";
dr["报警时长"] = dateDiff;
}
else
{
dr["报警状态"] = "Alarm Reset";
dr["处理时间"] = item.WarningHandleTime;
string dateDiff = null;
TimeSpan ts1 = new TimeSpan(item.WarningTime.Ticks);
TimeSpan ts2 = new TimeSpan(item.WarningHandleTime.Ticks);
TimeSpan ts = ts1.Subtract(ts2).Duration();
dateDiff = ts.Days.ToString() + "天"
+ ts.Hours.ToString() + "小时"
+ ts.Minutes.ToString() + "分钟"
+ ts.Seconds.ToString() + "秒"
+ ts.Milliseconds.ToString() + "毫秒";
dr["报警时长"] = dateDiff;
}
if (item.WarningHandleResult == 0)
{
//dr["处理结果"] = "未处理";
dr["处理结果"] = "Untreated";
}
else
{
//dr["处理结果"] = "已处理";
dr["处理结果"] = "Handled";
}
dt.Rows.Add(dr);
index++;
}
dt.DefaultView.Sort = "报警时间 DESC";
dt = dt.DefaultView.ToTable();
kryptonDataGridView1.DataSource = dt;
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
else
{
kryptonDataGridView1.DataSource = null;
}
}
private void kbtn_UuivertorAlarmClear_MouseDown(object sender, MouseEventArgs e)
{
try
{
if (!PlcOperationHelper.Instance.isConn)
{
KryptonMessageBox.Show("The PLC is disconnected and unable to operate the equipment.");
return;
}
if (PlcOperationHelper.Instance.WritePlcItem("FrequencyMacAlarmClear", "True", PlcItemTypeDesc.M))
{
LogHelper.WriteLog($"用户:【{GlobalHelper.UserInfo.USER_NAME}】发送PLC变频器报警清除信号成功。", LogTypeEum.Err);
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
private void kbtn_UuivertorAlarmClear_MouseUp(object sender, MouseEventArgs e)
{
try
{
if (PlcOperationHelper.Instance.WritePlcItem("FrequencyMacAlarmClear", "False", PlcItemTypeDesc.M))
{
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(ex.Message);
}
}
}
}

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>

View File

@@ -0,0 +1,377 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmPlcItemConfig
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.kryptonDataGridView1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_plcMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kcmb_plcItemType = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.kcmb_plcItemDateType = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.ktb_plcItemModbusAddress = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.ktb_plcItemPriAddress = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kbt_Add = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Edit = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Delete = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcItemType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcItemDateType)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.SuspendLayout();
//
// kryptonDataGridView1
//
this.kryptonDataGridView1.AllowUserToAddRows = false;
this.kryptonDataGridView1.AllowUserToDeleteRows = false;
this.kryptonDataGridView1.AllowUserToResizeColumns = false;
this.kryptonDataGridView1.AllowUserToResizeRows = false;
this.kryptonDataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.kryptonDataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
this.kryptonDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView1.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView1.MultiSelect = false;
this.kryptonDataGridView1.Name = "kryptonDataGridView1";
this.kryptonDataGridView1.RowTemplate.Height = 23;
this.kryptonDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 502);
this.kryptonDataGridView1.TabIndex = 0;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 146);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonDataGridView1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 526);
this.kryptonGroupBox2.TabIndex = 3;
this.kryptonGroupBox2.Values.Heading = "数据区:";
//
// kryptonLabel1
//
this.kryptonLabel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel1.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel1.Name = "kryptonLabel1";
this.kryptonLabel1.Size = new System.Drawing.Size(154, 27);
this.kryptonLabel1.TabIndex = 1;
this.kryptonLabel1.Values.Text = "PLC信息:";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 6;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_plcMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_plcItemType, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_plcItemDateType, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_plcItemModbusAddress, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_plcItemPriAddress, 3, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1020, 66);
this.tableLayoutPanel1.TabIndex = 0;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(3, 36);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(154, 27);
this.kryptonLabel2.TabIndex = 1;
this.kryptonLabel2.Values.Text = "PLC变量Modbus地址:";
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(343, 3);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(154, 27);
this.kryptonLabel3.TabIndex = 1;
this.kryptonLabel3.Values.Text = "PLC变量类型:";
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(683, 3);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(154, 27);
this.kryptonLabel4.TabIndex = 1;
this.kryptonLabel4.Values.Text = "PLC变量数据类型:";
//
// kryptonLabel5
//
this.kryptonLabel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel5.Location = new System.Drawing.Point(343, 36);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(154, 27);
this.kryptonLabel5.TabIndex = 1;
this.kryptonLabel5.Values.Text = "PLC变量寄存器地址:";
//
// ktb_plcMsg
//
this.ktb_plcMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_plcMsg.Location = new System.Drawing.Point(166, 5);
this.ktb_plcMsg.Name = "ktb_plcMsg";
this.ktb_plcMsg.Size = new System.Drawing.Size(168, 23);
this.ktb_plcMsg.TabIndex = 2;
//
// kcmb_plcItemType
//
this.kcmb_plcItemType.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_plcItemType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.kcmb_plcItemType.DropDownWidth = 248;
this.kcmb_plcItemType.Items.AddRange(new object[] {
"请选择",
"写入变量",
"读取变量",
"可读可写"});
this.kcmb_plcItemType.Location = new System.Drawing.Point(506, 6);
this.kcmb_plcItemType.Name = "kcmb_plcItemType";
this.kcmb_plcItemType.Size = new System.Drawing.Size(168, 21);
this.kcmb_plcItemType.TabIndex = 3;
//
// kcmb_plcItemDateType
//
this.kcmb_plcItemDateType.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_plcItemDateType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.kcmb_plcItemDateType.DropDownWidth = 248;
this.kcmb_plcItemDateType.Items.AddRange(new object[] {
"请选择",
"M 布尔类型",
"D 整数类型",
"X 数据类型",
"Y 数据类型;"});
this.kcmb_plcItemDateType.Location = new System.Drawing.Point(845, 6);
this.kcmb_plcItemDateType.Name = "kcmb_plcItemDateType";
this.kcmb_plcItemDateType.Size = new System.Drawing.Size(170, 21);
this.kcmb_plcItemDateType.TabIndex = 3;
//
// ktb_plcItemModbusAddress
//
this.ktb_plcItemModbusAddress.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_plcItemModbusAddress.Location = new System.Drawing.Point(166, 38);
this.ktb_plcItemModbusAddress.Name = "ktb_plcItemModbusAddress";
this.ktb_plcItemModbusAddress.Size = new System.Drawing.Size(168, 23);
this.ktb_plcItemModbusAddress.TabIndex = 2;
//
// ktb_plcItemPriAddress
//
this.ktb_plcItemPriAddress.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_plcItemPriAddress.Location = new System.Drawing.Point(506, 38);
this.ktb_plcItemPriAddress.Name = "ktb_plcItemPriAddress";
this.ktb_plcItemPriAddress.Size = new System.Drawing.Size(168, 23);
this.ktb_plcItemPriAddress.TabIndex = 2;
//
// kbt_Add
//
this.kbt_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Add.Location = new System.Drawing.Point(3, 3);
this.kbt_Add.Name = "kbt_Add";
this.kbt_Add.Size = new System.Drawing.Size(111, 35);
this.kbt_Add.TabIndex = 0;
this.kbt_Add.Values.Text = "新增";
this.kbt_Add.Click += new System.EventHandler(this.kbt_Add_Click);
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(471, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(113, 35);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Edit
//
this.kbt_Edit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Edit.Location = new System.Drawing.Point(120, 3);
this.kbt_Edit.Name = "kbt_Edit";
this.kbt_Edit.Size = new System.Drawing.Size(111, 35);
this.kbt_Edit.TabIndex = 0;
this.kbt_Edit.Values.Text = "编辑";
this.kbt_Edit.Click += new System.EventHandler(this.kbt_Edit_Click);
//
// kbt_Delete
//
this.kbt_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Delete.Location = new System.Drawing.Point(237, 3);
this.kbt_Delete.Name = "kbt_Delete";
this.kbt_Delete.Size = new System.Drawing.Size(111, 35);
this.kbt_Delete.TabIndex = 0;
this.kbt_Delete.Values.Text = "删除";
this.kbt_Delete.Click += new System.EventHandler(this.kbt_Delete_Click);
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Edit, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Delete, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Add, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(423, 73);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(587, 41);
this.tableLayoutPanel2.TabIndex = 1;
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(354, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(111, 35);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 146);
this.kryptonGroupBox1.TabIndex = 2;
this.kryptonGroupBox1.Values.Heading = "查询操作";
//
// frmPlcItemConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonGroupBox2);
this.Controls.Add(this.kryptonGroupBox1);
this.Name = "frmPlcItemConfig";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmPlcItemConfig_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcItemType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kcmb_plcItemDateType)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_plcMsg;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_plcItemType;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_plcItemDateType;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_plcItemModbusAddress;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_plcItemPriAddress;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Add;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Edit;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Delete;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
}
}

View File

@@ -0,0 +1,334 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using LeadDataBaseUtility;
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;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.PlcItemConfig)]
public partial class frmPlcItemConfig : UserControl
{
public frmPlcItemConfig()
{
InitializeComponent();
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
private DataTable _ComboBoxLanguageTextList;
private DataTable _InfoLanguageTextList;
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_plcMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_plcMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_plcItemModbusAddress.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_plcItemModbusAddress.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_plcItemPriAddress.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_plcItemPriAddress.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmPlcItemConfig_Load(object sender, EventArgs e)
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
if (GlobalHelper.LanguageCode == "English")
{
kcmb_plcItemType.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
{
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
}
kcmb_plcItemDateType.Items.Clear();
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDateType.Name, "KryptonComboBox"))
{
kcmb_plcItemDateType.Items.Add(item["CONTROL_NAME"].ToString());
}
}
kcmb_plcItemType.SelectedIndex = 0;
kcmb_plcItemDateType.SelectedIndex = 0;
RefreshFrmHost = new dlgRefreshFrmHost(RefreshPlcData);
RefreshPlcData();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox1.Focus();
}
private void RefreshPlcData()
{
try
{
#region 已删除
//string sql = $@"
// SELECT
// PLC_ITEM_ID '序号',
// PLC_ITEM_CODE 'PLC变量编码',
// PLC_ITEM_NAME 'PLC变量名称',
// CASE PLC_ITEM_TYPE
// WHEN 0 THEN
// '写入变量'
// WHEN 1 THEN
// '读取变量'
// ELSE
// '可读可写'
// END 'PLC变量类型',
// CASE PLC_ITEM_DATA_TYPE
// WHEN 0 THEN
// 'M 布尔类型'
// WHEN 1 THEN
// 'D 整数类型'
// WHEN 2 THEN
// 'X 数据类型'
// WHEN 3 THEN
// 'Y 数据类型'
// ELSE
// '未知'
// END 'PLC变量数据类型',
// PLC_ITEM_PRI_ADDRESS 'PLC寄存器地址',
// PLC_ITEM_MODBUS_ADDRESS 'ModBus地址',
// PLC_ITEM_VALUE '当前值'
// FROM
// BAS_PLC_ITEM
// WHERE 1=1
// ";
//if (!string.IsNullOrEmpty(ktb_plcMsg.Text.Trim()))
//{
// sql += $" AND (PLC_ITEM_CODE LIKE '%{ktb_plcMsg.Text.Trim()}%' OR PLC_ITEM_NAME LIKE '%{ktb_plcMsg.Text.Trim()}%')";
//}
//if (kcmb_plcItemType.SelectedIndex != 0)
//{
// sql += $" AND PLC_ITEM_TYPE = '{kcmb_plcItemType.SelectedIndex -1}'";
//}
//if (kcmb_plcItemDateType.SelectedIndex != 0)
//{
// sql += $" AND PLC_ITEM_DATA_TYPE = '{kcmb_plcItemDateType.SelectedIndex - 1}'";
//}
//if (!string.IsNullOrEmpty(ktb_plcItemModbusAddress.Text.Trim()))
//{
// sql += $" AND PLC_ITEM_MODBUS_ADDRESS = '{ktb_plcItemModbusAddress.Text.Trim()}'";
//}
//if (!string.IsNullOrEmpty(ktb_plcItemPriAddress.Text.Trim()))
//{
// sql += $" AND PLC_ITEM_PRI_ADDRESS = '{ktb_plcItemPriAddress.Text.Trim()}'";
//}
//DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
#endregion
List<BasPlcItemMd> tmpMdList;
if (!string.IsNullOrEmpty(ktb_plcMsg.Text.Trim()))
{
tmpMdList = GlobalHelper.PlcItemMdList.FindAll(x => x.PlcItemCode.Contains(ktb_plcMsg.Text.Trim()) || x.PlcItemName.Contains(ktb_plcMsg.Text.Trim()));
}
else
{
tmpMdList = GlobalHelper.PlcItemMdList;
}
if (tmpMdList != null && tmpMdList.Count > 0)
{
if (kcmb_plcItemType.SelectedIndex != 0)
{
tmpMdList = tmpMdList.FindAll(x => x.PlcItemType == (kcmb_plcItemType.SelectedIndex - 1));
}
if (tmpMdList != null && tmpMdList.Count > 0)
{
if (kcmb_plcItemDateType.SelectedIndex != 0)
{
tmpMdList = tmpMdList.FindAll(x => x.PlcItemDataType == (kcmb_plcItemDateType.SelectedIndex - 1));
}
if (tmpMdList != null && tmpMdList.Count > 0)
{
if (!string.IsNullOrEmpty(ktb_plcItemModbusAddress.Text.Trim()))
{
tmpMdList = tmpMdList.FindAll(x => x.PlcItemModbusAddress == ktb_plcItemModbusAddress.Text.Trim());
}
if (tmpMdList != null && tmpMdList.Count > 0)
{
if (!string.IsNullOrEmpty(ktb_plcItemPriAddress.Text.Trim()))
{
tmpMdList = tmpMdList.FindAll(x => x.PlcItemPriAddress == ktb_plcItemPriAddress.Text.Trim());
}
}
}
}
}
if (tmpMdList != null && tmpMdList.Count > 0)
{
DataTable dt = new DataTable();
DataColumn dc1 = new DataColumn("序号", Type.GetType("System.Int32"));
DataColumn dc2 = new DataColumn("PLC变量编码", Type.GetType("System.String"));
DataColumn dc3 = new DataColumn("PLC变量名称", Type.GetType("System.String"));
DataColumn dc8 = new DataColumn("当前值", Type.GetType("System.String"));
DataColumn dc4 = new DataColumn("PLC变量类型", Type.GetType("System.String"));
DataColumn dc5 = new DataColumn("PLC变量数据类型", Type.GetType("System.String"));
DataColumn dc6 = new DataColumn("PLC寄存器地址", Type.GetType("System.String"));
DataColumn dc7 = new DataColumn("ModBus地址", Type.GetType("System.String"));
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);
dt.Columns.Add(dc8);
dt.Columns.Add(dc4);
dt.Columns.Add(dc5);
dt.Columns.Add(dc6);
dt.Columns.Add(dc7);
foreach (BasPlcItemMd item in tmpMdList)
{
DataRow dr = dt.NewRow();
dr["序号"] = item.PlcItemId;
dr["PLC变量编码"] = item.PlcItemCode;
dr["PLC变量名称"] = item.PlcItemName;
if (item.PlcItemType == 0)
{
dr["PLC变量类型"] = "Can Write";
}
else if (item.PlcItemType == 1)
{
dr["PLC变量类型"] = "Can Read";
}
else
{
dr["PLC变量类型"] = "Read and Write";
}
if (item.PlcItemDataType == 0)
{
dr["PLC变量数据类型"] = "M Type";
}
else if (item.PlcItemDataType == 1)
{
dr["PLC变量数据类型"] = "D Type";
}
else if (item.PlcItemDataType == 2)
{
dr["PLC变量数据类型"] = "X Type";
}
else
{
dr["PLC变量数据类型"] = "Y Type";
}
dr["PLC寄存器地址"] = item.PlcItemPriAddress;
dr["ModBus地址"] = item.PlcItemModbusAddress;
dr["当前值"] = item.PlcItemValue;
dt.Rows.Add(dr);
}
kryptonDataGridView1.DataSource = dt;
kryptonDataGridView1.ClearSelection();
kryptonDataGridView1.SetDataViewColumnText(this.Name, GlobalHelper.LanguageCode);
}
else
{
kryptonDataGridView1.DataSource = null;
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载PLC变量数据界面发生异常", "LoadFrmPlcItemExp") + $":【{ex.Message}】!");
}
}
private void kbt_Query_Click(object sender, EventArgs e)
{
RefreshPlcData();
}
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_plcMsg.Text = "";
ktb_plcItemModbusAddress.Text = "";
ktb_plcItemPriAddress.Text = "";
kcmb_plcItemDateType.SelectedIndex = 0;
kcmb_plcItemType.SelectedIndex = 0;
}
private void kbt_Add_Click(object sender, EventArgs e)
{
frmAddPlcItem frm = new frmAddPlcItem();
frm.ShowDialog();
}
private void kbt_Edit_Click(object sender, EventArgs e)
{
if (kryptonDataGridView1.SelectedRows.Count > 0)
{
frmEditPlcItem frm = new frmEditPlcItem();
frm.PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
frm.ShowDialog();
}
else
{
//KryptonMessageBox.Show("请选择要编辑的PLC变量数据行!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow"));
}
}
private void kbt_Delete_Click(object sender, EventArgs e)
{
try
{
if (kryptonDataGridView1.SelectedRows.Count > 0)
{
DialogResult dr = KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("确定要删除所选的PLC变量信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
string PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString();
string sql = $@"DELETE FROM BAS_PLC_ITEM WHERE PLC_ITEM_ID = '{PlcItemId}'";
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
//KryptonMessageBox.Show("删除PLC变量数据成功!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo"));
RefreshFrmHost();
}
else
{
//KryptonMessageBox.Show("删除PLC变量数据失败!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo"));
}
}
}
else
{
//KryptonMessageBox.Show("请选择要删除的PLC变量数据行!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!");
}
}
}
}

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>

View File

@@ -0,0 +1,475 @@
namespace CleanMachineHMI.FrmUserControl
{
partial class frmPrinterMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.kryptonDataGridView2 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonGroupBox1 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.kbt_Reset = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbt_Query = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kryptonButton2 = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.kbtn_EditWorkingPalletData = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.kdtp_InputStartTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel3 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kryptonLabel4 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_palletMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.kcmb_sheetType = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
this.kryptonLabel5 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
this.ktb_irMsg = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
this.kdtp_InputEndTime = new ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonGroupBox3 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonButton1 = new ComponentFactory.Krypton.Toolkit.KryptonButton();
this.创建时间 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
this.创建人 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
this.作业状态 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
this.托盘号 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
this.序号 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
this.Column1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn();
this.kryptonGroupBox2 = new ComponentFactory.Krypton.Toolkit.KryptonGroupBox();
this.kryptonDataGridView1 = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).BeginInit();
this.kryptonGroupBox1.Panel.SuspendLayout();
this.kryptonGroupBox1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_sheetType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).BeginInit();
this.kryptonGroupBox3.Panel.SuspendLayout();
this.kryptonGroupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).BeginInit();
this.kryptonGroupBox2.Panel.SuspendLayout();
this.kryptonGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).BeginInit();
this.SuspendLayout();
//
// kryptonDataGridView2
//
this.kryptonDataGridView2.AllowUserToAddRows = false;
this.kryptonDataGridView2.AllowUserToDeleteRows = false;
this.kryptonDataGridView2.AllowUserToResizeColumns = false;
this.kryptonDataGridView2.AllowUserToResizeRows = false;
this.kryptonDataGridView2.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
this.kryptonDataGridView2.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
this.kryptonDataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView2.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView2.MultiSelect = false;
this.kryptonDataGridView2.Name = "kryptonDataGridView2";
this.kryptonDataGridView2.ReadOnly = true;
this.kryptonDataGridView2.RowTemplate.Height = 23;
this.kryptonDataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.kryptonDataGridView2.Size = new System.Drawing.Size(1020, 364);
this.kryptonDataGridView2.TabIndex = 0;
//
// kryptonGroupBox1
//
this.kryptonGroupBox1.CaptionOverlap = 0D;
this.kryptonGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox1.Location = new System.Drawing.Point(0, 0);
this.kryptonGroupBox1.Name = "kryptonGroupBox1";
//
// kryptonGroupBox1.Panel
//
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel2);
this.kryptonGroupBox1.Panel.Controls.Add(this.tableLayoutPanel1);
this.kryptonGroupBox1.Size = new System.Drawing.Size(1024, 118);
this.kryptonGroupBox1.TabIndex = 7;
this.kryptonGroupBox1.Values.Heading = "查询操作";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel2.ColumnCount = 4;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kryptonButton2, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.kbtn_EditWorkingPalletData, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(525, 58);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(492, 33);
this.tableLayoutPanel2.TabIndex = 1;
//
// kbt_Reset
//
this.kbt_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Reset.Location = new System.Drawing.Point(372, 3);
this.kbt_Reset.Name = "kbt_Reset";
this.kbt_Reset.Size = new System.Drawing.Size(117, 27);
this.kbt_Reset.TabIndex = 0;
this.kbt_Reset.Tag = "show";
this.kbt_Reset.Values.Text = "重置条件";
this.kbt_Reset.Click += new System.EventHandler(this.kbt_Reset_Click);
//
// kbt_Query
//
this.kbt_Query.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbt_Query.Location = new System.Drawing.Point(249, 3);
this.kbt_Query.Name = "kbt_Query";
this.kbt_Query.Size = new System.Drawing.Size(117, 27);
this.kbt_Query.TabIndex = 0;
this.kbt_Query.Tag = "show";
this.kbt_Query.Values.Text = "查询";
this.kbt_Query.Click += new System.EventHandler(this.kbt_Query_Click);
//
// kryptonButton2
//
this.kryptonButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kryptonButton2.Location = new System.Drawing.Point(126, 3);
this.kryptonButton2.Name = "kryptonButton2";
this.kryptonButton2.Size = new System.Drawing.Size(117, 27);
this.kryptonButton2.TabIndex = 0;
this.kryptonButton2.Values.Text = "补打IR单据";
this.kryptonButton2.Click += new System.EventHandler(this.kryptonButton2_Click);
//
// kbtn_EditWorkingPalletData
//
this.kbtn_EditWorkingPalletData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kbtn_EditWorkingPalletData.Location = new System.Drawing.Point(3, 3);
this.kbtn_EditWorkingPalletData.Name = "kbtn_EditWorkingPalletData";
this.kbtn_EditWorkingPalletData.Size = new System.Drawing.Size(117, 27);
this.kbtn_EditWorkingPalletData.TabIndex = 0;
this.kbtn_EditWorkingPalletData.Values.Text = "修改作业数据";
this.kbtn_EditWorkingPalletData.Click += new System.EventHandler(this.kbtn_EditWorkingPalletData_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanel1.ColumnCount = 6;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.Controls.Add(this.kdtp_InputStartTime, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel3, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel4, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ktb_palletMsg, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel2, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.kcmb_sheetType, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.kryptonLabel5, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ktb_irMsg, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.kdtp_InputEndTime, 3, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1020, 55);
this.tableLayoutPanel1.TabIndex = 0;
//
// kdtp_InputStartTime
//
this.kdtp_InputStartTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_InputStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_InputStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_InputStartTime.Location = new System.Drawing.Point(132, 30);
this.kdtp_InputStartTime.Name = "kdtp_InputStartTime";
this.kdtp_InputStartTime.ShowCheckBox = true;
this.kdtp_InputStartTime.Size = new System.Drawing.Size(186, 21);
this.kdtp_InputStartTime.TabIndex = 8;
//
// kryptonLabel3
//
this.kryptonLabel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel3.Location = new System.Drawing.Point(3, 30);
this.kryptonLabel3.Name = "kryptonLabel3";
this.kryptonLabel3.Size = new System.Drawing.Size(114, 22);
this.kryptonLabel3.TabIndex = 1;
this.kryptonLabel3.Values.Text = "录入时间:";
//
// kryptonLabel1
//
this.kryptonLabel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel1.Location = new System.Drawing.Point(3, 3);
this.kryptonLabel1.Name = "kryptonLabel1";
this.kryptonLabel1.Size = new System.Drawing.Size(114, 21);
this.kryptonLabel1.TabIndex = 1;
this.kryptonLabel1.Values.Text = "托盘信息:";
//
// kryptonLabel4
//
this.kryptonLabel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel4.Location = new System.Drawing.Point(333, 3);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 21);
this.kryptonLabel4.TabIndex = 1;
this.kryptonLabel4.Values.Text = "IR信息:";
//
// ktb_palletMsg
//
this.ktb_palletMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_palletMsg.Location = new System.Drawing.Point(132, 3);
this.ktb_palletMsg.Name = "ktb_palletMsg";
this.ktb_palletMsg.Size = new System.Drawing.Size(186, 23);
this.ktb_palletMsg.TabIndex = 2;
//
// kryptonLabel2
//
this.kryptonLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonLabel2.Location = new System.Drawing.Point(663, 3);
this.kryptonLabel2.Name = "kryptonLabel2";
this.kryptonLabel2.Size = new System.Drawing.Size(144, 21);
this.kryptonLabel2.TabIndex = 1;
this.kryptonLabel2.Values.Text = "板材信息:";
//
// kcmb_sheetType
//
this.kcmb_sheetType.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kcmb_sheetType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.kcmb_sheetType.DropDownWidth = 248;
this.kcmb_sheetType.Location = new System.Drawing.Point(821, 3);
this.kcmb_sheetType.Name = "kcmb_sheetType";
this.kcmb_sheetType.Size = new System.Drawing.Size(187, 21);
this.kcmb_sheetType.TabIndex = 3;
//
// kryptonLabel5
//
this.kryptonLabel5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kryptonLabel5.Location = new System.Drawing.Point(378, 31);
this.kryptonLabel5.Name = "kryptonLabel5";
this.kryptonLabel5.Size = new System.Drawing.Size(23, 20);
this.kryptonLabel5.TabIndex = 1;
this.kryptonLabel5.Values.Text = "至";
//
// ktb_irMsg
//
this.ktb_irMsg.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ktb_irMsg.Location = new System.Drawing.Point(462, 3);
this.ktb_irMsg.Name = "ktb_irMsg";
this.ktb_irMsg.Size = new System.Drawing.Size(186, 23);
this.ktb_irMsg.TabIndex = 2;
//
// kdtp_InputEndTime
//
this.kdtp_InputEndTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.kdtp_InputEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.kdtp_InputEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.kdtp_InputEndTime.Location = new System.Drawing.Point(462, 30);
this.kdtp_InputEndTime.Name = "kdtp_InputEndTime";
this.kdtp_InputEndTime.ShowCheckBox = true;
this.kdtp_InputEndTime.Size = new System.Drawing.Size(186, 21);
this.kdtp_InputEndTime.TabIndex = 8;
//
// kryptonGroupBox3
//
this.kryptonGroupBox3.CaptionOverlap = 0D;
this.kryptonGroupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonGroupBox3.Location = new System.Drawing.Point(0, 284);
this.kryptonGroupBox3.Name = "kryptonGroupBox3";
//
// kryptonGroupBox3.Panel
//
this.kryptonGroupBox3.Panel.Controls.Add(this.kryptonDataGridView2);
this.kryptonGroupBox3.Size = new System.Drawing.Size(1024, 388);
this.kryptonGroupBox3.TabIndex = 9;
this.kryptonGroupBox3.Values.Heading = "托盘明细表数据:";
//
// kryptonButton1
//
this.kryptonButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.kryptonButton1.Location = new System.Drawing.Point(728, 47);
this.kryptonButton1.Name = "kryptonButton1";
this.kryptonButton1.Size = new System.Drawing.Size(144, 19);
this.kryptonButton1.TabIndex = 0;
this.kryptonButton1.Values.Text = "重置条件";
//
// 创建时间
//
this.创建时间.HeaderText = "创建时间";
this.创建时间.Name = "创建时间";
this.创建时间.Width = 163;
//
// 创建人
//
this.创建人.HeaderText = "创建人";
this.创建人.Name = "创建人";
this.创建人.Width = 163;
//
// 作业状态
//
this.作业状态.HeaderText = "作业状态";
this.作业状态.Name = "作业状态";
this.作业状态.Width = 163;
//
// 托盘号
//
this.托盘号.HeaderText = "托盘号";
this.托盘号.Name = "托盘号";
this.托盘号.Width = 164;
//
// 序号
//
this.序号.HeaderText = "序号";
this.序号.Name = "序号";
this.序号.Width = 163;
//
// Column1
//
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.NullValue = false;
this.Column1.DefaultCellStyle = dataGridViewCellStyle1;
this.Column1.FalseValue = null;
this.Column1.HeaderText = "";
this.Column1.IndeterminateValue = null;
this.Column1.Name = "Column1";
this.Column1.TrueValue = null;
//
// kryptonGroupBox2
//
this.kryptonGroupBox2.CaptionOverlap = 0D;
this.kryptonGroupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.kryptonGroupBox2.Location = new System.Drawing.Point(0, 118);
this.kryptonGroupBox2.Name = "kryptonGroupBox2";
//
// kryptonGroupBox2.Panel
//
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonDataGridView1);
this.kryptonGroupBox2.Panel.Controls.Add(this.kryptonButton1);
this.kryptonGroupBox2.Size = new System.Drawing.Size(1024, 166);
this.kryptonGroupBox2.TabIndex = 8;
this.kryptonGroupBox2.Values.Heading = "托盘主表数据:";
//
// kryptonDataGridView1
//
this.kryptonDataGridView1.AllowUserToAddRows = false;
this.kryptonDataGridView1.AllowUserToDeleteRows = false;
this.kryptonDataGridView1.AllowUserToResizeColumns = false;
this.kryptonDataGridView1.AllowUserToResizeRows = false;
this.kryptonDataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.kryptonDataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
this.kryptonDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.序号,
this.托盘号,
this.作业状态,
this.创建人,
this.创建时间});
this.kryptonDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonDataGridView1.Location = new System.Drawing.Point(0, 0);
this.kryptonDataGridView1.MultiSelect = false;
this.kryptonDataGridView1.Name = "kryptonDataGridView1";
this.kryptonDataGridView1.RowTemplate.Height = 23;
this.kryptonDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 142);
this.kryptonDataGridView1.TabIndex = 0;
this.kryptonDataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.kryptonDataGridView1_CellContentClick);
this.kryptonDataGridView1.SelectionChanged += new System.EventHandler(this.kryptonDataGridView1_SelectionChanged);
//
// frmPrinterMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.kryptonGroupBox3);
this.Controls.Add(this.kryptonGroupBox2);
this.Controls.Add(this.kryptonGroupBox1);
this.Name = "frmPrinterMain";
this.Size = new System.Drawing.Size(1024, 672);
this.Load += new System.EventHandler(this.frmPrinterMain_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1.Panel)).EndInit();
this.kryptonGroupBox1.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox1)).EndInit();
this.kryptonGroupBox1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.kcmb_sheetType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3.Panel)).EndInit();
this.kryptonGroupBox3.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).EndInit();
this.kryptonGroupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2.Panel)).EndInit();
this.kryptonGroupBox2.Panel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox2)).EndInit();
this.kryptonGroupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.kryptonDataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView2;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Reset;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbt_Query;
private ComponentFactory.Krypton.Toolkit.KryptonButton kryptonButton2;
private ComponentFactory.Krypton.Toolkit.KryptonButton kbtn_EditWorkingPalletData;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_InputStartTime;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel3;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel1;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel4;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_palletMsg;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel2;
private ComponentFactory.Krypton.Toolkit.KryptonComboBox kcmb_sheetType;
private ComponentFactory.Krypton.Toolkit.KryptonLabel kryptonLabel5;
private ComponentFactory.Krypton.Toolkit.KryptonTextBox ktb_irMsg;
private ComponentFactory.Krypton.Toolkit.KryptonDateTimePicker kdtp_InputEndTime;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox3;
private ComponentFactory.Krypton.Toolkit.KryptonButton kryptonButton1;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn 创建时间;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn 创建人;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn 作业状态;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn 托盘号;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn 序号;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn Column1;
private ComponentFactory.Krypton.Toolkit.KryptonGroupBox kryptonGroupBox2;
private ComponentFactory.Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
}
}

View File

@@ -0,0 +1,704 @@
using CleanMachineHMI.Domain.Enums;
using CleanMachineHMI.frmChild;
using CleanMachineHMI.Utils;
using ComponentFactory.Krypton.Toolkit;
using FastReport;
using LeadDataBaseUtility;
using NX_LogUtility;
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.Web.UI.WebControls;
using System.Windows.Forms;
namespace CleanMachineHMI.FrmUserControl
{
[FormType(EnumFormType.WorkingDataRecord)]
public partial class frmPrinterMain : UserControl
{
/// <summary>
/// 页面信息语言文本列表
/// </summary>
private DataTable _InfoLanguageTextList;
/// <summary>
/// 模板地址
/// </summary>
private string _reportFolder = Application.StartupPath + "\\ReportMd\\";
public frmPrinterMain()
{
InitializeComponent();
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
}
public delegate void dlgRefreshFrmHost();
public static dlgRefreshFrmHost RefreshFrmHost;
private void InitDtlData(string palletCode)
{
string sql = $@"SELECT WORKING_PALLET_DTL_ID 序号,IR_CODE IR条码,SHEET_TYPE_NAME 板材信息,INPUT_TIME 录入时间,CLEAN_MODE_NAME 清洗方式,CONTAMINATION_TYPE_NAME 污染类型,CONTAMINATION_DTL_NAME 污染明细, CURRENT_NUMBER 当前计数,USER_NAME 操作用户 FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = '{palletCode}'";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
kryptonDataGridView2.DataSource = dt;
kryptonDataGridView2.SetDataViewColumnText(this.Name + "." + kryptonDataGridView2.Name, GlobalHelper.LanguageCode);
}
else
{
kryptonDataGridView2.DataSource = null;
}
}
bool isSlectRow = false;
private void Init()
{
string sql = $@"
SELECT
WORKING_PALLET_ID 序号,
WORKING_PALLET_CODE 托盘号,
WORKING_STATUS 作业状态,
USER_NAME 创建人,
CREATE_TIME 创建时间
FROM
VW_WORKING_PALLET
WHERE 1=1
";
if (!string.IsNullOrEmpty(ktb_palletMsg.Text))
{
sql += $" AND WORKING_PALLET_CODE like '%{ktb_palletMsg.Text}%'";
}
if (!string.IsNullOrEmpty(ktb_irMsg.Text))
{
sql += $" AND WORKING_PALLET_CODE in (select DISTINCT WORKING_PALLET_CODE from VW_WORKING_PALLET_MSG where IR_CODE like '%{ktb_irMsg.Text}%')";
}
if (kcmb_sheetType.SelectedIndex != 0)
{
sql += $" AND WORKING_PALLET_CODE in (select DISTINCT WORKING_PALLET_CODE from VW_WORKING_PALLET_MSG where SHEET_TYPE_CODE = '{((ListItem)kcmb_sheetType.SelectedItem).Value}')";
}
if (kdtp_InputStartTime.Checked)
{
sql += $"AND WORKING_PALLET_CODE in (select DISTINCT WORKING_PALLET_CODE from VW_WORKING_PALLET_MSG where INPUT_TIME >= '{kdtp_InputStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}')";
}
if (kdtp_InputEndTime.Checked)
{
sql += $"AND WORKING_PALLET_CODE in (select DISTINCT WORKING_PALLET_CODE from VW_WORKING_PALLET_MSG where INPUT_TIME <= '{kdtp_InputEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}')";
}
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
//kryptonDataGridView1.DataSource = dt;
kryptonDataGridView1.Rows.Clear();
isSlectRow = false;
foreach (DataRow item in dt.Rows)
{
int index = kryptonDataGridView1.Rows.Add();
kryptonDataGridView1.Rows[index].Cells[1].Value = item["序号"].ToString();
kryptonDataGridView1.Rows[index].Cells[2].Value = item["托盘号"].ToString();
kryptonDataGridView1.Rows[index].Cells[3].Value = item["作业状态"].ToString();
kryptonDataGridView1.Rows[index].Cells[4].Value = item["创建人"].ToString();
kryptonDataGridView1.Rows[index].Cells[5].Value = item["创建时间"].ToString();
}
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name, GlobalHelper.LanguageCode);
isSlectRow = true;
kryptonDataGridView1_SelectionChanged(kryptonDataGridView1, new EventArgs());
}
else
{
kryptonDataGridView1.SetDataViewColumnText(this.Name + "." + kryptonDataGridView1.Name, GlobalHelper.LanguageCode);
kryptonDataGridView1.Rows.Clear();
}
}
private void txt_GotFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.ShowInputPanel();
}
private void txt_LostFocus(object sender, EventArgs e)
{
KeyboardAutoPopUp.HideInputPanel();
}
private void InitControlEvent()
{
ktb_irMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_irMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
ktb_palletMsg.GotFocus += new EventHandler(txt_GotFocus); //获取焦点前发生事件
ktb_palletMsg.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件
}
private void frmPrinterMain_Load(object sender, EventArgs e)
{
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
string sqlQuerySheetType = $@"SELECT SHEET_TYPE_CODE,SHEET_TYPE_NAME FROM BAS_SHEET_TYPE WHERE USED_FLAG = 1 and DEL_FLAG = 0 ORDER BY SHEET_TYPE_ID";
DataTable dtQuerySheetType = LeadDbHelperSQLite.Query(sqlQuerySheetType).Tables[0];
if (dtQuerySheetType != null && dtQuerySheetType.Rows.Count > 0)
{
kcmb_sheetType.Items.Clear();
kcmb_sheetType.Items.Add(new ListItem
{
Value = "",
Text = "Please Select",
});
foreach (DataRow item in dtQuerySheetType.Rows)
{
kcmb_sheetType.Items.Add(new ListItem
{
Value = item["SHEET_TYPE_CODE"].ToString(),
Text = item["SHEET_TYPE_NAME"].ToString(),
});
}
kcmb_sheetType.SelectedIndex = 0;
}
kdtp_InputStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_InputEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_InputEndTime.Checked = false;
kdtp_InputStartTime.Checked = false;
new EnvironmentSettings().ReportSettings.ShowProgress = false;
RefreshFrmHost = new dlgRefreshFrmHost(Init);
Init();
foreach (Control item in tableLayoutPanel2.Controls)
{
if (item.Tag == null)
{
DataRow[] drs = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{this.Name}' AND MENU_PID = '-1'");
DataRow[] drs1 = GlobalHelper.RoleMenuPermission.Select($" MENU_URL = '{item.Name}' AND MENU_PID = '{drs[0]["MENU_ID"]}'");
if (drs1.Length > 0)
{
item.Enabled = true;
}
else
{
item.Enabled = false;
}
}
}
kryptonGroupBox1.Focus();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!");
}
}
#region 打印测试代码
private void kryptonButton1_Click(object sender, EventArgs e)
{
kryptonButton1.Enabled = false;
try
{
string sql = $@"
SELECT
*
FROM
VW_WORKING_PALLET_MSG
WHERE
WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3'
AND IR_CODE = '32211'
";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
string sql1 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3' AND IR_CODE = '32211' AND CONTAMINATION_TYPE_CODE = 'PhysicalContamination'";
DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0].Copy();
dt1.TableName = "Table1";
string sql2 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3' AND IR_CODE = '32211' AND CONTAMINATION_TYPE_CODE = 'ChemicalContamination'";
DataTable dt2 = LeadDbHelperSQLite.Query(sql2).Tables[0].Copy();
dt2.TableName = "Table2";
string sql3 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3' AND IR_CODE = '32211' AND CONTAMINATION_TYPE_CODE = 'MicrobiologicalContamination'";
DataTable dt3 = LeadDbHelperSQLite.Query(sql3).Tables[0].Copy();
dt3.TableName = "Table3";
string sql4 = $@"
SELECT
C.SHEET_TYPE_CODE Sheets,
SUM(CASE CLEAN_MODE_CODE WHEN 'SortedCleaned' THEN Qty ELSE 0 END) SortedCleaned,
SUM(CASE CLEAN_MODE_CODE WHEN 'SpecialCleaning' THEN Qty ELSE 0 END) SpecialCleaning,
SUM(CASE CLEAN_MODE_CODE WHEN 'Scrap' THEN Qty ELSE 0 END) Scrap,
SUM(CASE CLEAN_MODE_CODE WHEN 'Others' THEN Qty ELSE 0 END) Others,
IFNULL(C.TotalQty, 0) TotalQty
FROM
(
SELECT
A.SHEET_TYPE_CODE,
B.CLEAN_MODE_CODE,
B.Qty,
C.TotalQty
FROM
BAS_SHEET_TYPE A LEFT JOIN
(
SELECT
SHEET_TYPE_CODE,
SUM(CURRENT_NUMBER) TotalQty
FROM
VW_WORKING_PALLET_MSG
WHERE
WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3'
AND IR_CODE = '32211'
GROUP BY SHEET_TYPE_CODE) C ON A.SHEET_TYPE_CODE = C.SHEET_TYPE_CODE
LEFT JOIN (
SELECT
SHEET_TYPE_CODE,
CLEAN_MODE_CODE,
SUM(CURRENT_NUMBER) Qty
FROM
VW_WORKING_PALLET_MSG
WHERE
WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3'
AND IR_CODE = '32211'
GROUP BY CLEAN_MODE_CODE,SHEET_TYPE_CODE
) B ON C.SHEET_TYPE_CODE = B.SHEET_TYPE_CODE
) C
GROUP BY C.SHEET_TYPE_CODE,C.TotalQty
";
DataTable dt4 = LeadDbHelperSQLite.Query(sql4).Tables[0].Copy();
dt4.TableName = "Table4";
string sql5 = $@"
SELECT
SUM (CURRENT_NUMBER) CleanedSheets,
date (INPUT_TIME) DateAndTime,
USER_NAME Operator
FROM
VW_WORKING_PALLET_MSG
WHERE
WORKING_PALLET_CODE = 'e2f4294d698a412d84c382fc4bba01a3'
AND IR_CODE = '32211'
GROUP BY
date (INPUT_TIME),
OPERATE_USER_ID,
USER_CODE,
USER_NAME
";
DataTable dt5 = LeadDbHelperSQLite.Query(sql5).Tables[0].Copy();
dt5.TableName = "Table5";
string userName = dt.Rows[0]["USER_NAME"].ToString();
DateTime dateMsg = Convert.ToDateTime(dt.Rows[0]["INPUT_TIME"]);
string IRNumber = dt.Rows[0]["IR_CODE"].ToString();
string MacCode = "CleanMac_01";
FastReport.Report report = new FastReport.Report();
string filename = _reportFolder + "CleanMac_IRMsg_PrintMd.frx";
DataSet dts = new DataSet();
dts.Tables.Add(dt1);
dts.Tables.Add(dt2);
dts.Tables.Add(dt3);
dts.Tables.Add(dt4);
dts.Tables.Add(dt5);
report.Load(filename);
report.RegisterData(dts);
report.SetParameterValue("Parm_CusName", userName);
report.SetParameterValue("Parm_MachineCode", MacCode);
report.SetParameterValue("Parm_IRNumber", IRNumber);
report.SetParameterValue("Parm_RecDate", dateMsg);
report.SetParameterValue("Parm_RecordName", userName);
report.Prepare();
report.PrintSettings.ShowDialog = false;
report.Print();
report.Clear();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
kryptonButton1.Enabled = true;
}
#endregion
private void kbt_Reset_Click(object sender, EventArgs e)
{
ktb_irMsg.Text = "";
ktb_palletMsg.Text = "";
kcmb_sheetType.SelectedIndex = 0;
kdtp_InputStartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
kdtp_InputEndTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
kdtp_InputEndTime.Checked = false;
kdtp_InputStartTime.Checked = false;
}
private void kbt_Query_Click(object sender, EventArgs e)
{
try
{
kryptonDataGridView2.DataSource = null;
Init();
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!");
}
}
private void kryptonDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0)
{
KryptonDataGridViewCheckBoxCell checkcell = (KryptonDataGridViewCheckBoxCell)kryptonDataGridView1.CurrentCell;
if (Convert.ToBoolean(checkcell.EditedFormattedValue))
{
foreach (DataGridViewRow item in kryptonDataGridView1.Rows)
{
if (!item.IsNewRow && item != kryptonDataGridView1.CurrentRow)
{
item.Cells[0].Value = false;
item.Cells[0].Style.BackColor = Color.White;
}
}
kryptonDataGridView1.CurrentCell.Style.BackColor = Color.FromArgb(51, 153, 255);
}
else
{
kryptonDataGridView1.CurrentCell.Style.BackColor = Color.White;
}
}
}
private void kryptonDataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
}
private void kryptonDataGridView1_SelectionChanged(object sender, EventArgs e)
{
if (kryptonDataGridView1.SelectedRows.Count > 0 && isSlectRow)
{
string palletCode = kryptonDataGridView1.SelectedRows[0].Cells[2].Value.ToString();
InitDtlData(palletCode);
}
}
private void kryptonButton2_Click(object sender, EventArgs e)
{
try
{
int rowCheck = 0;
string palletCodeMsg = string.Empty;
foreach (DataGridViewRow item in kryptonDataGridView1.Rows)
{
KryptonDataGridViewCheckBoxCell checkcell = (KryptonDataGridViewCheckBoxCell)item.Cells[0];
if (Convert.ToBoolean(checkcell.EditedFormattedValue))
{
rowCheck++;
palletCodeMsg = item.Cells[2].Value.ToString();
}
}
if (rowCheck > 0)
{
string sqlWorkingIrMsg = $@"SELECT DISTINCT IR_CODE FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = '{palletCodeMsg}'";
DataTable dt_workingIrMsg = LeadDbHelperSQLite.Query(sqlWorkingIrMsg).Tables[0];
if (dt_workingIrMsg != null && dt_workingIrMsg.Rows.Count > 0)
{
foreach (DataRow item in dt_workingIrMsg.Rows)
{
string workingIrCodeMsg = item["IR_CODE"].ToString();
PrintWorkedIrMsg(workingIrCodeMsg);
}
}
}
else
{
//KryptonMessageBox.Show("请勾选要打印的托盘数据行!!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!");
}
}
private void PrintWorkedIrMsg(string workingIrCodeMsg)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】手动打印开始。~~~~~~~~~~~~~~", LogTypeEum.Run);
string sql = $@"
SELECT
*
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印明细数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
string sqlGroup = $@"
SELECT
CONTAMINATION_TYPE_CODE,
CONTAMINATION_DTL_CODE,
SUM(CURRENT_NUMBER) CURRENT_NUMBER
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
GROUP BY
CONTAMINATION_TYPE_CODE,
CONTAMINATION_DTL_CODE
";
DataTable dtGroup = LeadDbHelperSQLite.Query(sqlGroup).Tables[0];
#region 物理污染
//string sql1 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = '{woringPalletMsg}' AND IR_CODE = '{workingIrCodeMsg}' AND CONTAMINATION_TYPE_CODE = 'PhysicalContamination'";
//DataTable dt1 = LeadDbHelperSQLite.Query(sql1).Tables[0].Copy();
DataRow[] drs = dtGroup.Select(" CONTAMINATION_TYPE_CODE = 'PhysicalContamination'");
if (drs != null && drs.Length > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】物理污染 明细数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】物理污染 明细数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
DataTable dt1 = new DataTable();
dt1.Columns.Add("Kind", typeof(string));
dt1.Columns.Add("Qty", typeof(string));
foreach (DataRow item in drs)
{
DataRow row = dt1.NewRow();
row["Kind"] = item["CONTAMINATION_DTL_CODE"].ToString();
row["Qty"] = item["CURRENT_NUMBER"].ToString();
dt1.Rows.Add(row);
}
dt1.TableName = "Table1";
#endregion
#region 化学污染
//string sql2 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = '{woringPalletMsg}' AND IR_CODE = '{workingIrCodeMsg}' AND CONTAMINATION_TYPE_CODE = 'ChemicalContamination'";
//DataTable dt2 = LeadDbHelperSQLite.Query(sql2).Tables[0].Copy();
drs = dtGroup.Select(" CONTAMINATION_TYPE_CODE = 'ChemicalContamination'");
if (drs != null && drs.Length > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】化学污染 明细数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】化学污染 明细数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
DataTable dt2 = dt1.Clone();
foreach (DataRow item in drs)
{
DataRow row = dt2.NewRow();
row["Kind"] = item["CONTAMINATION_DTL_CODE"].ToString();
row["Qty"] = item["CURRENT_NUMBER"].ToString();
dt2.Rows.Add(row);
}
dt2.TableName = "Table2";
#endregion
#region 微生物污染
//string sql3 = $@"SELECT CONTAMINATION_DTL_CODE Kind,CURRENT_NUMBER Qty FROM VW_WORKING_PALLET_MSG WHERE WORKING_PALLET_CODE = '{woringPalletMsg}' AND IR_CODE = '{workingIrCodeMsg}' AND CONTAMINATION_TYPE_CODE = 'MicrobiologicalContamination'";
//DataTable dt3 = LeadDbHelperSQLite.Query(sql3).Tables[0].Copy();
drs = dtGroup.Select(" CONTAMINATION_TYPE_CODE = 'MicrobiologicalContamination'");
if (drs != null && drs.Length > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】微生物污染 明细数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】微生物污染 明细数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
DataTable dt3 = dt1.Clone();
foreach (DataRow item in drs)
{
DataRow row = dt3.NewRow();
row["Kind"] = item["CONTAMINATION_DTL_CODE"].ToString();
row["Qty"] = item["CURRENT_NUMBER"].ToString();
dt3.Rows.Add(row);
}
dt3.TableName = "Table3";
#endregion
string sql4 = $@"
SELECT
C.SHEET_TYPE_CODE Sheets,
SUM(CASE CLEAN_MODE_CODE WHEN 'SortedCleaned' THEN Qty ELSE 0 END) SortedCleaned,
SUM(CASE CLEAN_MODE_CODE WHEN 'SpecialCleaning' THEN Qty ELSE 0 END) SpecialCleaning,
SUM(CASE CLEAN_MODE_CODE WHEN 'Scrap' THEN Qty ELSE 0 END) Scrap,
SUM(CASE CLEAN_MODE_CODE WHEN 'Others' THEN Qty ELSE 0 END) Others,
IFNULL(C.TotalQty, 0) TotalQty
FROM
(
SELECT
A.SHEET_TYPE_CODE,
B.CLEAN_MODE_CODE,
B.Qty,
C.TotalQty
FROM
BAS_SHEET_TYPE A LEFT JOIN
(
SELECT
SHEET_TYPE_CODE,
SUM(CURRENT_NUMBER) TotalQty
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
GROUP BY SHEET_TYPE_CODE) C ON A.SHEET_TYPE_CODE = C.SHEET_TYPE_CODE
LEFT JOIN (
SELECT
SHEET_TYPE_CODE,
CLEAN_MODE_CODE,
SUM(CURRENT_NUMBER) Qty
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
GROUP BY CLEAN_MODE_CODE,SHEET_TYPE_CODE
) B ON C.SHEET_TYPE_CODE = B.SHEET_TYPE_CODE
) C
GROUP BY C.SHEET_TYPE_CODE,C.TotalQty
";
DataTable dt4 = LeadDbHelperSQLite.Query(sql4).Tables[0].Copy();
if (dt4 != null && dt4.Rows.Count > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】按照板材分类和清洗方式统计的数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】按照板材分类和清洗方式统计的数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
dt4.TableName = "Table4";
string sql5 = $@"
SELECT
SUM (CURRENT_NUMBER) CleanedSheets,
date (INPUT_TIME) DateAndTime,
USER_NAME Operator
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
GROUP BY
date (INPUT_TIME),
OPERATE_USER_ID,
USER_CODE,
USER_NAME
";
DataTable dt5 = LeadDbHelperSQLite.Query(sql5).Tables[0].Copy();
if (dt5 != null && dt5.Rows.Count > 0)
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】操作员每日作业板材数量的数据获取成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】操作员每日作业板材数量的数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
dt5.TableName = "Table5";
string userName = dt.Rows[0]["USER_NAME"].ToString();
DateTime dateMsg = Convert.ToDateTime(dt.Rows[0]["INPUT_TIME"]);
string IRNumber = dt.Rows[0]["IR_CODE"].ToString();
string MacCode = GlobalHelper.ParameterList.Select(" PARAMETER_CODE = 'CleanMachineName'")[0]["PARAMETER_VALUE"].ToString();
string sqlCleanedNum = $@"
SELECT
SUM(CURRENT_NUMBER) CURRENT_NUMBER
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
AND CLEAN_MODE_CODE = 'SortedCleaned'
";
DataTable dtCleanedNum = LeadDbHelperSQLite.Query(sqlCleanedNum).Tables[0];
string cleanNum = dtCleanedNum.Rows[0][0].ToString();
string sqlPalletNum = $@"
SELECT
DISTINCT WORKING_PALLET_CODE
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
";
DataTable dtPalletNum = LeadDbHelperSQLite.Query(sqlPalletNum).Tables[0];
string palletNum = dtPalletNum.Rows.Count.ToString();
string sqlScrapNum = $@"
SELECT
SUM(CURRENT_NUMBER) CURRENT_NUMBER
FROM
VW_WORKING_PALLET_MSG
WHERE
IR_CODE = '{workingIrCodeMsg}'
AND CLEAN_MODE_CODE <> 'SortedCleaned'
";
DataTable dtScrapNum = LeadDbHelperSQLite.Query(sqlScrapNum).Tables[0];
string scrapNum = dtScrapNum.Rows[0][0].ToString();
DataSet dts = new DataSet();
dts.Tables.Add(dt1);
dts.Tables.Add(dt2);
dts.Tables.Add(dt3);
dts.Tables.Add(dt4);
dts.Tables.Add(dt5);
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印模板所需要的数据拼装完成!~~~~~~~~~~~~~~", LogTypeEum.Run);
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】开始加载打印控件类!~~~~~~~~~~~~~~", LogTypeEum.Run);
FastReport.Report report = new FastReport.Report();
string filename = _reportFolder + "CleanMac_IRMsg_PrintMd.frx";
report.Load(filename);
report.RegisterData(dts);
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印控件类加载完成,数据传入成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
report.SetParameterValue("Parm_CusName", userName);
report.SetParameterValue("Parm_MachineCode", MacCode);
report.SetParameterValue("Parm_IRNumber", IRNumber);
report.SetParameterValue("Parm_RecDate", dateMsg);
report.SetParameterValue("Parm_RecordName", userName);
report.SetParameterValue("Parm_CleanedNum", cleanNum);
report.SetParameterValue("Parm_PalletNumber", palletNum);
report.SetParameterValue("Parm_ScrapNumber", scrapNum);
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印控件类所需参数设置成功,开始发送打印机数据!~~~~~~~~~~~~~~", LogTypeEum.Run);
report.Prepare();
report.PrintSettings.ShowDialog = false;
report.Print();
report.Clear();
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印控件类发送打印机数据成功!~~~~~~~~~~~~~~", LogTypeEum.Run);
}
else
{
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】打印明细数据获取失败!~~~~~~~~~~~~~~", LogTypeEum.Err);
}
LogHelper.WriteLog($"~~~~~~~~~~~~~~作业IR:【{workingIrCodeMsg}】手动打印结束。~~~~~~~~~~~~~~", LogTypeEum.Run);
}
private void kbtn_EditWorkingPalletData_Click(object sender, EventArgs e)
{
int rowCheck = 0;
string palletCodeMsg = string.Empty;
foreach (DataGridViewRow item in kryptonDataGridView1.Rows)
{
KryptonDataGridViewCheckBoxCell checkcell = (KryptonDataGridViewCheckBoxCell)item.Cells[0];
if (Convert.ToBoolean(checkcell.EditedFormattedValue))
{
rowCheck++;
palletCodeMsg = item.Cells[2].Value.ToString();
}
}
if (rowCheck > 0)
{
frmEditWorkingPalletData frm = new frmEditWorkingPalletData();
frm.PalletCode = palletCodeMsg;
frm.ShowDialog();
}
else
{
//KryptonMessageBox.Show("请勾选要编辑的作业托盘数据行!!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow"));
}
}
}
}

View File

@@ -0,0 +1,123 @@
<?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>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>