From 931767239577c1a81f298ddccd65e3137c80b326 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 22 八月 2025 08:28:22 +0800
Subject: [PATCH] 称重
---
/dev/null | 734 ---------------------------
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 2
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs | 474 +++++++++--------
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.Designer.cs | 29
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 34 -
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs | 268 +++------
DevApp/Gs.DevApp/Gs.DevApp.csproj | 6
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.resx | 42
DevApp/Gs.DevApp/App.config | 1
DevApp/Gs.DevApp/Program.cs | 2
10 files changed, 379 insertions(+), 1,213 deletions(-)
diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config
index d9fa3b0..c3e7bad 100644
--- a/DevApp/Gs.DevApp/App.config
+++ b/DevApp/Gs.DevApp/App.config
@@ -49,6 +49,7 @@
<add key="AsyncSeconds" value="2" /><!--姘存瓒呮椂鏃堕棿-->
<add key="IsWater" value="0" /><!--鏄惁瑕佹按妫�鍙婂伐浣嶇爜-->
<add key="IqcGetWeight" value="3000" /><!--iqc璇荤О閲嶆椂-->
+ <add key="TimingMailInterval" value="10000" />
</appSettings>
<userSettings>
<Gs.DevApp.Properties.Settings>
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index a28607c..7968e9e 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -103,7 +103,7 @@
}
catch (Exception ex)
{
- LoggerHelper.WriteInfoLog("WorkWeight/GetIqcWeight:" + ex.Message);
+ Gs.DevApp.ToolBox.LogHelper.Debug(this.ToString(), "WorkWeight/GetIqcWeight:" + ex.Message);
}
};
timer.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.Designer.cs
deleted file mode 100644
index 71908a9..0000000
--- a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.Designer.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-锘縩amespace Gs.DevApp.DevFrm.QC
-{
- partial class WeightIqc
- {
- ///// <summary>
- ///// Required designer variable.
- ///// </summary>
- //private System.ComponentModel.IContainer components = null;
-
- ///// <summary>
- ///// Clean up any resources being used.
- ///// </summary>
- ///// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- //protected override void Dispose(bool disposing)
- //{
- // if (disposing && (components != null))
- // {
- // components.Dispose();
- // }
- // base.Dispose(disposing);
- //}
-
- //#region Windows Form Designer generated code
-
- ///// <summary>
- ///// Required method for Designer support - do not modify
- ///// the contents of this method with the code editor.
- ///// </summary>
- //private void InitializeComponent()
- //{
- // this.components = new System.ComponentModel.Container();
- // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- // this.Text = "WeightIqc";
- //}
-
- //#endregion
- }
-}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs b/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs
deleted file mode 100644
index fc28335..0000000
--- a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs
+++ /dev/null
@@ -1,734 +0,0 @@
-锘縰sing DevExpress.XtraEditors;
-using DevExpress.XtraEditors.Controls;
-using DevExpress.XtraGrid;
-using DevExpress.XtraGrid.Columns;
-using DevExpress.XtraGrid.Views.Base;
-using DevExpress.XtraGrid.Views.Grid;
-using Gs.DevApp.Entity;
-using Gs.DevApp.ToolBox;
-using Microsoft.Win32;
-using Newtonsoft.Json;
-using NModbus;
-using NModbus.Serial;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Configuration;
-using System.Data;
-using System.Drawing;
-using System.IO.Ports;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Windows.Forms;
-
-namespace Gs.DevApp.DevFrm.QC
-{
- public partial class WeightIqc : DevExpress.XtraEditors.XtraForm
- {
- public SerialPort Sp = new SerialPort();
- private WeightIqc.HandleInterfaceUpdataDelegate interfaceUpdataHandle;
- private string strLine = "";
- private string sqlWOMQAB = "";
- private Dictionary<string, Thread> dicThread = new Dictionary<string, Thread>();
- private StringBuilder sb = new StringBuilder();
- private IContainer components = (IContainer)null;
- private SplitContainerControl splitContainerControl1;
- private ImageComboBoxEdit cmbBaudRate;
- private LabelControl labelControl1;
- private TextEdit txtNum;
- private LabelControl labelControl3;
- private SimpleButton button2;
- private SimpleButton button1;
- private SimpleButton btnRefashC;
- private ImageComboBoxEdit cmbSerialPortNum;
- private LabelControl labelControl2;
- private GridControl gridWOMQAB;
- private GridView viewWOMQAB;
- private GridColumn colQAB001;
- private GridColumn colQAB002;
- private GridColumn colQAB003;
- private GridColumn colQAB005;
- private GridColumn colQAB006;
- private GridColumn colQAB007;
- private GridColumn colQAB009;
- private GridColumn colQAB010;
- private GridColumn colMIH004;
- private GridColumn colPAA002;
- private GridColumn colQAB015;
- private GridColumn colQAB025;
- private GridColumn colMCA022;
- private GridColumn colZT;
- private GridColumn colMCA023;
- private NotifyIcon notifyIcon1;
- private ContextMenuStrip contextMenuStrip1;
- private System.Windows.Forms.Timer timer1;
- private ToolStripMenuItem showInTaskbar;
- private ToolStripMenuItem exitWindow;
-
- public WeightIqc()
- {
- this.InitializeComponent();
- this.timer1.Tick += new EventHandler(this.timer1_Tick);
- this.notifyIcon1.DoubleClick += new EventHandler(this.notifyIcon1_DoubleClick);
- this.SizeChanged += new EventHandler(this.frmMain_SizeChanged);
- this.contextMenuStrip1.ItemClicked += new ToolStripItemClickedEventHandler(this.contextMenuStrip1_ItemClicked);
- this.Initialize();
- }
-
- private void Initialize()
- {
- try
- {
- int int32 = 10000;
- string _vanishingSeconds = ConfigurationManager.AppSettings["TimingMailInterval"];
- if (!string.IsNullOrEmpty(_vanishingSeconds))
- int32 = int.Parse(_vanishingSeconds);
- string appSetting = ConfigurationManager.AppSettings["ProductName"]+"鏈嶅姟";
- this.Text = appSetting;
- this.notifyIcon1.Text = appSetting;
- this.timer1.Interval = int32;
- this.button1.Enabled = true;
- this.button2.Enabled = false;
- }
- catch (Exception ex)
- {
- //int num = (int)MessageBox.Show(ex.Message);
- //Application.Exit();
- MsgHelper.ShowError("Initialize:" + ex.Message);
- }
- }
-
- private void GetComList()
- {
- this.cmbSerialPortNum.Properties.Items.Clear();
- RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Hardware\\DeviceMap\\SerialComm");
- if (registryKey == null)
- return;
- foreach (string valueName in registryKey.GetValueNames())
- {
- string description = (string)registryKey.GetValue(valueName);
- this.cmbSerialPortNum.Properties.Items.Add(new ImageComboBoxItem(description, (object)description));
- }
- if (this.cmbSerialPortNum.Properties.Items.Count > 0)
- this.cmbSerialPortNum.SelectedIndex = 0;
- }
-
- public void RefreshData()
- {
- while (true)
- {
- try
- {
- Thread.Sleep(10000);
- }
- catch (Exception ex)
- {
- Thread.Sleep(10000);
- }
- }
- }
-
- public void GetWeight()
- {
- ModbusFactory factory = new ModbusFactory();
- LoggerHelper.WriteInfoLog("GetWeight鍒涘缓modbus瀵硅薄");
- IModbusMaster rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
- bool flag = true;
- while (true)
- {
- try
- {
- if (!this.Sp.IsOpen)
- {
- LoggerHelper.WriteInfoLog("GetWeight 閲嶆柊鎵撳紑涓插彛杩炴帴");
- this.Sp.Open();
- rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
- }
- if (rtuMaster == null)
- {
- LoggerHelper.WriteInfoLog("GetWeight 閲嶆柊鍒涘缓modbus瀵硅薄");
- rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
- }
- byte slaveAddress3 = byte.Parse("1");
- ushort startAddress3 = ushort.Parse("0002");
- ushort numberOfPoints1 = ushort.Parse("2");
- ushort[] numArray = rtuMaster.ReadHoldingRegisters(slaveAddress3, startAddress3, numberOfPoints1);
- float single = BitConverter.ToSingle(this.CombomBinaryArray(BitConverter.GetBytes(numArray[1]), BitConverter.GetBytes(numArray[0])), 0);
- this.Invoke((Delegate)this.interfaceUpdataHandle, (object)single.ToString());
- byte slaveAddress4 = byte.Parse("1");
- ushort startAddress4 = ushort.Parse("0001");
- ushort numberOfPoints2 = ushort.Parse("1");
- int int32 = Convert.ToInt32(rtuMaster.ReadHoldingRegisters(slaveAddress4, startAddress4, numberOfPoints2)[0].ToString());
- string str = Convert.ToString(int32, 2).PadLeft(16 /*0x10*/, '0');
- char ch1 = str[1];
- char ch2 = str[6];
- if (ch1 == '0' && ch2 == '0')
- {
- flag = true;
- }
- else if (flag)
- {
- flag = false;
- }
- addModel(single.ToString(), int32.ToString());
- LoggerHelper.WriteInfoLog("single:" + single.ToString() + ",flag:" + flag.ToString() + ",int32:" + int32.ToString());
- Thread.Sleep(2000);
- }
- catch (Exception ex)
- {
- Thread.Sleep(2000);
- }
- }
- }
-
- private void UpdateTextBox(string text)
- {
- try
- {
- if (this.txtNum.Text == text)
- return;
- this.txtNum.Text = text;
- }
- catch (Exception ex)
- {
- LoggerHelper.WriteErrorLog($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}:{ex.Message}");
- // int num = (int)MessageBox.Show(ex.Message);
- MsgHelper.ShowError("UpdateTextBox:" + ex.Message);
- }
- }
-
- public ushort[] stringToUshort2(string inString)
- {
- byte[] bytes = BitConverter.GetBytes(float.Parse(inString));
- ushort uint16 = BitConverter.ToUInt16(bytes, 0);
- return new ushort[2]
- {
- BitConverter.ToUInt16(bytes, 2),
- uint16
- };
- }
-
- private byte[] CombomBinaryArray(byte[] srcArray1, byte[] srcArray2)
- {
- byte[] destinationArray = new byte[srcArray1.Length + srcArray2.Length];
- Array.Copy((Array)srcArray1, 0, (Array)destinationArray, 0, srcArray1.Length);
- Array.Copy((Array)srcArray2, 0, (Array)destinationArray, srcArray1.Length, srcArray2.Length);
- return destinationArray;
- }
-
- private void button1_Click(object sender, EventArgs e)
- {
- try
- {
- DateTime now = DateTime.Now;
- LoggerHelper.WriteInfoLog(now.ToString("yyyy-MM-dd HH:mm:ss") + ":寮�濮嬮噰闆�");
- if (this.cmbBaudRate.Text.Trim() != "" && this.cmbSerialPortNum.Text != "")
- {
- now = DateTime.Now;
- LoggerHelper.WriteInfoLog(now.ToString("yyyy-MM-dd HH:mm:ss") + ":閰嶇疆涓插彛閫氫俊");
- this.interfaceUpdataHandle = new WeightIqc.HandleInterfaceUpdataDelegate(this.UpdateTextBox);
- this.Sp.PortName = this.cmbSerialPortNum.Text.Trim();
- this.Sp.BaudRate = Convert.ToInt32(this.cmbBaudRate.Text.Trim());
- this.Sp.Parity = Parity.None;
- this.Sp.StopBits = StopBits.One;
- now = DateTime.Now;
- LoggerHelper.WriteInfoLog(now.ToString("yyyy-MM-dd HH:mm:ss") + ":鎵撳紑涓插彛鍚岄�氫俊");
- this.Sp.Open();
- this.button1.Enabled = false;
- this.button2.Enabled = true;
- this.timer1.Enabled = false;
- now = DateTime.Now;
- LoggerHelper.WriteInfoLog(now.ToString("yyyy-MM-dd HH:mm:ss") + ":鍚姩鍒锋柊鏁版嵁瀹氭椂鍣�");
- this.timer1.Start();
- }
- else
- {
- now = DateTime.Now;
- LoggerHelper.WriteErrorLog(now.ToString("yyyy-MM-dd HH:mm:ss") + ":璇疯緭鍏ユ纭殑绔彛鍙峰拰娉㈢壒鐜�");
- int num = (int)MessageBox.Show("璇疯緭鍏ユ纭殑绔彛鍙峰拰娉㈢壒鐜囷紒");
- this.cmbSerialPortNum.Focus();
- }
- }
- catch (Exception ex)
- {
- LoggerHelper.WriteErrorLog($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}:{ex.Message}");
- int num = (int)MessageBox.Show($"绔彛{this.cmbSerialPortNum.Text.Trim()}鎵撳紑澶辫触锛亄ex.Message}");
- }
- }
-
- private void button2_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.dicThread.Keys.Contains<string>("RefreshData"))
- {
- Thread thread = this.dicThread["RefreshData"];
- if (thread.IsAlive)
- thread.Abort();
- this.dicThread.Remove("RefreshData");
- }
- if (this.dicThread.Keys.Contains<string>("GetWeight"))
- {
- Thread thread = this.dicThread["GetWeight"];
- if (thread.IsAlive)
- thread.Abort();
- this.dicThread.Remove("GetWeight");
- }
- this.button1.Enabled = true;
- this.button2.Enabled = false;
- this.timer1.Stop();
- this.Sp.Close();
- }
- catch (Exception ex)
- {
- //int num = (int)MessageBox.Show(ex.Message);
- //Application.Exit();
- MsgHelper.ShowError(ex.Message);
- }
- }
-
- private void timer1_Tick(object sender, EventArgs e)
- {
- //if (!this.dicThread.Keys.Contains<string>("RefreshData"))
- //{
- // Thread thread = new Thread(new ThreadStart(this.RefreshData));
- // thread.Start();
- // this.dicThread.Add("RefreshData", thread);
- //}
- if (this.dicThread.Keys.Contains<string>("GetWeight"))
- return;
- Thread thread1 = new Thread(new ThreadStart(this.GetWeight));
- thread1.Start();
- this.dicThread.Add("GetWeight", thread1);
- }
-
- private void Form1_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (Sp.IsOpen)
- Sp.Close();
- if (timer1 != null)
- {
- timer1.Stop();
- timer1.Dispose();
- }
- try
- {
- if (this.dicThread.Keys.Contains<string>("RefreshData"))
- {
- Thread thread = this.dicThread["RefreshData"];
- if (thread.IsAlive)
- thread.Abort();
- this.dicThread.Remove("RefreshData");
- }
- if (this.dicThread.Keys.Contains<string>("GetWeight"))
- {
- Thread thread = this.dicThread["GetWeight"];
- if (thread.IsAlive)
- thread.Abort();
- this.dicThread.Remove("GetWeight");
- }
- this.timer1.Stop();
- this.Sp.Close();
- }
- catch (Exception ex)
- {
- //int num = (int)MessageBox.Show(ex.Message);
- //Application.Exit();
- MsgHelper.ShowError(ex.Message);
- }
- }
-
- private void Form1_Load(object sender, EventArgs e) => this.GetComList();
-
- private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- if (e.ClickedItem == this.showInTaskbar)
- {
- if (this.WindowState != FormWindowState.Minimized)
- return;
- this.WindowState = FormWindowState.Normal;
- this.Activate();
- this.ShowInTaskbar = true;
- this.notifyIcon1.Visible = false;
- }
- else
- {
- if (e.ClickedItem != this.exitWindow)
- return;
- this.button2_Click((object)null, (EventArgs)null);
- Environment.Exit(0);
- }
- }
-
- private void frmMain_SizeChanged(object sender, EventArgs e)
- {
- //if (this.WindowState != FormWindowState.Minimized)
- // return;
- //this.ShowInTaskbar = false;
- //this.notifyIcon1.Visible = true;
- }
-
- private void notifyIcon1_DoubleClick(object sender, EventArgs e)
- {
- if (this.WindowState != FormWindowState.Minimized)
- return;
- this.WindowState = FormWindowState.Normal;
- this.Activate();
- this.ShowInTaskbar = true;
- this.notifyIcon1.Visible = false;
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing && this.components != null)
- this.components.Dispose();
- base.Dispose(disposing);
- }
-
- private void InitializeComponent()
- {
- this.components = (IContainer)new System.ComponentModel.Container();
- GridFormatRule gridFormatRule1 = new GridFormatRule();
- FormatConditionRuleExpression conditionRuleExpression1 = new FormatConditionRuleExpression();
- GridFormatRule gridFormatRule2 = new GridFormatRule();
- FormatConditionRuleExpression conditionRuleExpression2 = new FormatConditionRuleExpression();
- ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(WeightIqc));
- this.colZT = new GridColumn();
- this.splitContainerControl1 = new SplitContainerControl();
- this.txtNum = new TextEdit();
- this.labelControl3 = new LabelControl();
- this.button2 = new SimpleButton();
- this.button1 = new SimpleButton();
- this.btnRefashC = new SimpleButton();
- this.cmbSerialPortNum = new ImageComboBoxEdit();
- this.labelControl2 = new LabelControl();
- this.cmbBaudRate = new ImageComboBoxEdit();
- this.labelControl1 = new LabelControl();
- this.gridWOMQAB = new GridControl();
- this.viewWOMQAB = new GridView();
- this.colQAB001 = new GridColumn();
- this.colQAB002 = new GridColumn();
- this.colQAB003 = new GridColumn();
- this.colQAB005 = new GridColumn();
- this.colQAB006 = new GridColumn();
- this.colQAB007 = new GridColumn();
- this.colQAB009 = new GridColumn();
- this.colQAB010 = new GridColumn();
- this.colMIH004 = new GridColumn();
- this.colPAA002 = new GridColumn();
- this.colQAB015 = new GridColumn();
- this.colQAB025 = new GridColumn();
- this.colMCA022 = new GridColumn();
- this.colMCA023 = new GridColumn();
- this.notifyIcon1 = new NotifyIcon(this.components);
- this.contextMenuStrip1 = new ContextMenuStrip(this.components);
- this.showInTaskbar = new ToolStripMenuItem();
- this.exitWindow = new ToolStripMenuItem();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.splitContainerControl1.BeginInit();
- this.splitContainerControl1.SuspendLayout();
- this.txtNum.Properties.BeginInit();
- this.cmbSerialPortNum.Properties.BeginInit();
- this.cmbBaudRate.Properties.BeginInit();
- this.gridWOMQAB.BeginInit();
- this.viewWOMQAB.BeginInit();
- this.contextMenuStrip1.SuspendLayout();
- this.SuspendLayout();
- this.colZT.Caption = "鐘舵��";
- this.colZT.FieldName = "ZT";
- this.colZT.Name = "colZT";
- this.splitContainerControl1.Dock = DockStyle.Fill;
- this.splitContainerControl1.Horizontal = false;
- this.splitContainerControl1.Location = new Point(0, 0);
- this.splitContainerControl1.Margin = new Padding(4, 4, 4, 4);
- this.splitContainerControl1.Name = "splitContainerControl1";
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.txtNum);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.labelControl3);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.button2);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.button1);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.btnRefashC);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.cmbSerialPortNum);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.labelControl2);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.cmbBaudRate);
- this.splitContainerControl1.Panel1.Controls.Add((Control)this.labelControl1);
- this.splitContainerControl1.Panel1.Text = "Panel1";
- this.splitContainerControl1.Panel2.Controls.Add((Control)this.gridWOMQAB);
- this.splitContainerControl1.Panel2.Text = "Panel2";
- this.splitContainerControl1.Size = new Size(859, 391);
- this.splitContainerControl1.SplitterPosition = 139;
- this.splitContainerControl1.TabIndex = 0;
- this.splitContainerControl1.Text = "splitContainerControl1";
- this.txtNum.Location = new Point(588, 19);
- this.txtNum.Margin = new Padding(4, 4, 4, 4);
- this.txtNum.Name = "txtNum";
- this.txtNum.Properties.Appearance.Font = new Font("Tahoma", 24f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
- this.txtNum.Properties.Appearance.Options.UseFont = true;
- this.txtNum.Size = new Size(187, 54);
- this.txtNum.TabIndex = 8;
- this.labelControl3.Appearance.Font = new Font("Tahoma", 24f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
- this.labelControl3.Appearance.Options.UseFont = true;
- this.labelControl3.Location = new Point(468, 28);
- this.labelControl3.Margin = new Padding(4, 4, 4, 4);
- this.labelControl3.Name = "labelControl3";
- this.labelControl3.Size = new Size(120, 48 /*0x30*/);
- this.labelControl3.TabIndex = 7;
- this.labelControl3.Text = "閲嶉噺锛�";
- this.button2.Location = new Point(315, 48 /*0x30*/);
- this.button2.Margin = new Padding(4, 4, 4, 4);
- this.button2.Name = "button2";
- this.button2.Size = new Size(100, 29);
- this.button2.TabIndex = 6;
- this.button2.Text = "鍋滄";
- this.button2.Click += new EventHandler(this.button2_Click);
- this.button1.Location = new Point(315, 8);
- this.button1.Margin = new Padding(4, 4, 4, 4);
- this.button1.Name = "button1";
- this.button1.Size = new Size(100, 29);
- this.button1.TabIndex = 5;
- this.button1.Text = "纭畾";
- this.button1.Click += new EventHandler(this.button1_Click);
- this.btnRefashC.Location = new Point(213, 48 /*0x30*/);
- this.btnRefashC.Margin = new Padding(4, 4, 4, 4);
- this.btnRefashC.Name = "btnRefashC";
- this.btnRefashC.Size = new Size(33, 29);
- this.btnRefashC.TabIndex = 4;
- this.btnRefashC.Text = "R";
- this.cmbSerialPortNum.Location = new Point(72, 49);
- this.cmbSerialPortNum.Margin = new Padding(4, 4, 4, 4);
- this.cmbSerialPortNum.Name = "cmbSerialPortNum";
- this.cmbSerialPortNum.Properties.Buttons.AddRange(new EditorButton[1]
- {
- new EditorButton(ButtonPredefines.Combo)
- });
- this.cmbSerialPortNum.Size = new Size(133, 24);
- this.cmbSerialPortNum.TabIndex = 3;
- this.labelControl2.Location = new Point(16 /*0x10*/, 52);
- this.labelControl2.Margin = new Padding(4, 4, 4, 4);
- this.labelControl2.Name = "labelControl2";
- this.labelControl2.Size = new Size(45, 18);
- this.labelControl2.TabIndex = 2;
- this.labelControl2.Text = "涓插彛鍙�";
- this.cmbBaudRate.EditValue = (object)"9600";
- this.cmbBaudRate.Location = new Point(72, 11);
- this.cmbBaudRate.Margin = new Padding(4, 4, 4, 4);
- this.cmbBaudRate.Name = "cmbBaudRate";
- this.cmbBaudRate.Properties.Buttons.AddRange(new EditorButton[1]
- {
- new EditorButton(ButtonPredefines.Combo)
- });
- this.cmbBaudRate.Properties.Items.AddRange(new ImageComboBoxItem[5]
- {
- new ImageComboBoxItem("14400", (object) "14400", -1),
- new ImageComboBoxItem("9600", (object) "9600", -1),
- new ImageComboBoxItem("4800", (object) "4800", -1),
- new ImageComboBoxItem("2400", (object) "2400", -1),
- new ImageComboBoxItem("1200", (object) "1200", -1)
- });
- this.cmbBaudRate.Size = new Size(175, 24);
- this.cmbBaudRate.TabIndex = 1;
- this.labelControl1.Location = new Point(16 /*0x10*/, 15);
- this.labelControl1.Margin = new Padding(4, 4, 4, 4);
- this.labelControl1.Name = "labelControl1";
- this.labelControl1.Size = new Size(45, 18);
- this.labelControl1.TabIndex = 0;
- this.labelControl1.Text = "娉㈢壒鐜�";
- this.gridWOMQAB.Dock = DockStyle.Fill;
- this.gridWOMQAB.EmbeddedNavigator.Margin = new Padding(4, 4, 4, 4);
- this.gridWOMQAB.Location = new Point(0, 0);
- this.gridWOMQAB.MainView = (BaseView)this.viewWOMQAB;
- this.gridWOMQAB.Margin = new Padding(4, 4, 4, 4);
- this.gridWOMQAB.Name = "gridWOMQAB";
- this.gridWOMQAB.Size = new Size(859, 246);
- this.gridWOMQAB.TabIndex = 1;
- this.gridWOMQAB.ViewCollection.AddRange(new BaseView[1]
- {
- (BaseView) this.viewWOMQAB
- });
- this.viewWOMQAB.Columns.AddRange(new GridColumn[15]
- {
- this.colQAB001,
- this.colQAB002,
- this.colQAB003,
- this.colQAB005,
- this.colQAB006,
- this.colQAB007,
- this.colQAB009,
- this.colQAB010,
- this.colMIH004,
- this.colPAA002,
- this.colQAB015,
- this.colQAB025,
- this.colMCA022,
- this.colZT,
- this.colMCA023
- });
- gridFormatRule1.ApplyToRow = true;
- gridFormatRule1.Column = this.colZT;
- gridFormatRule1.Name = "ZTRule1";
- conditionRuleExpression1.Appearance.BackColor = System.Drawing.Color.Red;
- conditionRuleExpression1.Appearance.Options.UseBackColor = true;
- conditionRuleExpression1.Expression = "ZT='N'";
- gridFormatRule1.Rule = (FormatConditionRuleBase)conditionRuleExpression1;
- gridFormatRule2.ApplyToRow = true;
- gridFormatRule2.Column = this.colZT;
- gridFormatRule2.Name = "ZTRule2";
- conditionRuleExpression2.Appearance.BackColor = System.Drawing.Color.FromArgb(128 /*0x80*/, (int)byte.MaxValue, 128 /*0x80*/);
- conditionRuleExpression2.Appearance.Options.UseBackColor = true;
- conditionRuleExpression2.Expression = "ZT='Y'";
- gridFormatRule2.Rule = (FormatConditionRuleBase)conditionRuleExpression2;
- this.viewWOMQAB.FormatRules.Add(gridFormatRule1);
- this.viewWOMQAB.FormatRules.Add(gridFormatRule2);
- this.viewWOMQAB.GridControl = this.gridWOMQAB;
- this.viewWOMQAB.Name = "viewWOMQAB";
- this.viewWOMQAB.OptionsView.ColumnAutoWidth = false;
- this.viewWOMQAB.OptionsView.ShowGroupPanel = false;
- this.colQAB001.Caption = "ID";
- this.colQAB001.FieldName = "QAB001";
- this.colQAB001.Name = "colQAB001";
- this.colQAB002.Caption = "鏉$爜";
- this.colQAB002.FieldName = "QAB002";
- this.colQAB002.MinWidth = 150;
- this.colQAB002.Name = "colQAB002";
- this.colQAB002.Visible = true;
- this.colQAB002.VisibleIndex = 0;
- this.colQAB002.Width = 150;
- this.colQAB003.Caption = "宸ュ崟";
- this.colQAB003.FieldName = "QAB003";
- this.colQAB003.MinWidth = 100;
- this.colQAB003.Name = "colQAB003";
- this.colQAB003.Visible = true;
- this.colQAB003.VisibleIndex = 1;
- this.colQAB003.Width = 100;
- this.colQAB005.Caption = "鐗╂枡缂栫爜";
- this.colQAB005.FieldName = "QAB005";
- this.colQAB005.MinWidth = 100;
- this.colQAB005.Name = "colQAB005";
- this.colQAB005.Visible = true;
- this.colQAB005.VisibleIndex = 2;
- this.colQAB005.Width = 100;
- this.colQAB006.Caption = "鐗╂枡鍚嶇О";
- this.colQAB006.FieldName = "QAB006";
- this.colQAB006.Name = "colQAB006";
- this.colQAB006.Visible = true;
- this.colQAB006.VisibleIndex = 3;
- this.colQAB007.Caption = "鐗╂枡瑙勬牸";
- this.colQAB007.FieldName = "QAB007";
- this.colQAB007.MinWidth = 200;
- this.colQAB007.Name = "colQAB007";
- this.colQAB007.Visible = true;
- this.colQAB007.VisibleIndex = 4;
- this.colQAB007.Width = 200;
- this.colQAB009.Caption = "宸ュ簭缂栧彿";
- this.colQAB009.FieldName = "QAB009";
- this.colQAB009.Name = "colQAB009";
- this.colQAB009.Visible = true;
- this.colQAB009.VisibleIndex = 5;
- this.colQAB010.Caption = "宸ュ簭鍚嶇О";
- this.colQAB010.FieldName = "QAB010";
- this.colQAB010.Name = "colQAB010";
- this.colQAB010.Visible = true;
- this.colQAB010.VisibleIndex = 6;
- this.colMIH004.Caption = "绾垮埆";
- this.colMIH004.FieldName = "MIH004";
- this.colMIH004.Name = "colMIH004";
- this.colMIH004.Visible = true;
- this.colMIH004.VisibleIndex = 7;
- this.colPAA002.Caption = "浣滀笟浜哄憳";
- this.colPAA002.FieldName = "PAA002";
- this.colPAA002.Name = "colPAA002";
- this.colPAA002.Visible = true;
- this.colPAA002.VisibleIndex = 8;
- this.colQAB015.Caption = "浣滀笟鏃堕棿";
- this.colQAB015.FieldName = "QAB015";
- this.colQAB015.MinWidth = 150;
- this.colQAB015.Name = "colQAB015";
- this.colQAB015.Visible = true;
- this.colQAB015.VisibleIndex = 9;
- this.colQAB015.Width = 150;
- this.colQAB025.Caption = "瀹為檯閲嶉噺";
- this.colQAB025.FieldName = "QAB025";
- this.colQAB025.Name = "colQAB025";
- this.colQAB025.Visible = true;
- this.colQAB025.VisibleIndex = 10;
- this.colMCA022.Caption = "閲嶉噺涓嬮檺";
- this.colMCA022.FieldName = "MCA022";
- this.colMCA022.Name = "colMCA022";
- this.colMCA022.Visible = true;
- this.colMCA022.VisibleIndex = 11;
- this.colMCA023.Caption = "閲嶉噺涓婇檺";
- this.colMCA023.FieldName = "MCA023";
- this.colMCA023.Name = "colMCA023";
- this.colMCA023.Visible = true;
- this.colMCA023.VisibleIndex = 12;
- this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
- // this.notifyIcon1.Icon = (Icon)componentResourceManager.GetObject("notifyIcon1.Icon");
- this.notifyIcon1.Text = "鎶�鐮旀柊闃虫柊鎶�鐢靛瓙鏈夐檺鍏徃";
- this.notifyIcon1.Visible = true;
- this.contextMenuStrip1.ImageScalingSize = new Size(20, 20);
- this.contextMenuStrip1.Items.AddRange(new ToolStripItem[2]
- {
- (ToolStripItem) this.showInTaskbar,
- (ToolStripItem) this.exitWindow
- });
- this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new Size(109, 52);
- this.showInTaskbar.Name = "showInTaskbar";
- this.showInTaskbar.Size = new Size(108, 24);
- this.showInTaskbar.Text = "鏄剧ず";
- this.exitWindow.Name = "exitWindow";
- this.exitWindow.Size = new Size(108, 24);
- this.exitWindow.Text = "閫�鍑�";
- this.timer1.Interval = 10000;
- this.AutoScaleDimensions = new SizeF(8f, 15f);
- this.AutoScaleMode = AutoScaleMode.Font;
- this.ClientSize = new Size(859, 391);
- this.Controls.Add((Control)this.splitContainerControl1);
- this.Margin = new Padding(4, 4, 4, 4);
- this.Name = nameof(WeightIqc);
- this.Text = "绉伴噸鍙栨暟";
- this.FormClosing += new FormClosingEventHandler(this.Form1_FormClosing);
- this.Load += new EventHandler(this.Form1_Load);
- this.splitContainerControl1.EndInit();
- this.splitContainerControl1.ResumeLayout(false);
- this.txtNum.Properties.EndInit();
- this.cmbSerialPortNum.Properties.EndInit();
- this.cmbBaudRate.Properties.EndInit();
- this.gridWOMQAB.EndInit();
- this.viewWOMQAB.EndInit();
- this.contextMenuStrip1.ResumeLayout(false);
- this.ResumeLayout(false);
- }
-
- public delegate void HandleInterfaceUpdataDelegate(string text);
-
- /// <summary>
- /// 涓婁紶绉伴噸鏁版嵁
- /// </summary>
- /// <param name="_realWeight">鎴彇鍚庣殑鏁伴噺</param>
- /// <param name="_realWeightTxt">鍘熷瓙涓�</param>
- private void addModel(string _realWeight, string _realWeightTxt)
- {
- string _lineId = "0";
- var _obj = new
- {
- lineId = _lineId,
- realWeight = _realWeight.Trim(),
- realWeightTxt = _realWeightTxt.Trim(),
- };
- try
- {
- string strJson = UtilityHelper.HttpPost("", "WorkWeight/EditModel", JsonConvert.SerializeObject(_obj));
- ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode <= 0)
- {
- LoggerHelper.WriteInfoLog("WorkWeight/EditModel:" + strJson);
- }
- }
- catch (Exception ex)
- {
- LoggerHelper.WriteInfoLog(ex.Message);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs
index bae9789..ae581db 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs
@@ -37,23 +37,19 @@
this.split1 = new DevExpress.XtraEditors.SplitContainerControl();
this.layoutMx1 = new DevExpress.XtraDataLayout.DataLayoutControl();
this.comLine = new Gs.DevApp.UserControl.UcLookWorkline();
- this.btnStart = new DevExpress.XtraEditors.SimpleButton();
+ this.button1 = new DevExpress.XtraEditors.SimpleButton();
this.cmbSerialPortNum = new DevExpress.XtraEditors.ComboBoxEdit();
this.cmbBaudRate = new DevExpress.XtraEditors.ComboBoxEdit();
this.txtNum = new DevExpress.XtraEditors.TextEdit();
- this.comSjw = new DevExpress.XtraEditors.ComboBoxEdit();
- this.comStopBits = new DevExpress.XtraEditors.ComboBoxEdit();
- this.comParity = new DevExpress.XtraEditors.ComboBoxEdit();
this.txtMsg = new DevExpress.XtraEditors.MemoEdit();
+ this.button2 = new DevExpress.XtraEditors.SimpleButton();
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
- this.cmbBaudRate1111 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
- this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
- this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
- this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.cmbBaudRate1111 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
- this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.gcMx1 = new DevExpress.XtraGrid.GridControl();
this.gvMx1 = new DevExpress.XtraGrid.Views.Grid.GridView();
@@ -80,19 +76,14 @@
((System.ComponentModel.ISupportInitialize)(this.cmbSerialPortNum.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtNum.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.comSjw.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.comStopBits.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.comParity.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtMsg.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
@@ -122,17 +113,13 @@
// layoutMx1
//
this.layoutMx1.Controls.Add(this.comLine);
- this.layoutMx1.Controls.Add(this.btnStart);
+ this.layoutMx1.Controls.Add(this.button1);
this.layoutMx1.Controls.Add(this.cmbSerialPortNum);
this.layoutMx1.Controls.Add(this.cmbBaudRate);
this.layoutMx1.Controls.Add(this.txtNum);
- this.layoutMx1.Controls.Add(this.comSjw);
- this.layoutMx1.Controls.Add(this.comStopBits);
- this.layoutMx1.Controls.Add(this.comParity);
this.layoutMx1.Controls.Add(this.txtMsg);
+ this.layoutMx1.Controls.Add(this.button2);
this.layoutMx1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutMx1.HiddenItems.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
- this.layoutControlItem5});
this.layoutMx1.Location = new System.Drawing.Point(0, 0);
this.layoutMx1.Name = "layoutMx1";
this.layoutMx1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(310, 455, 812, 500);
@@ -149,22 +136,21 @@
this.comLine.Size = new System.Drawing.Size(164, 24);
this.comLine.TabIndex = 14;
//
- // btnStart
+ // button1
//
- this.btnStart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question;
- this.btnStart.Appearance.Options.UseBackColor = true;
- this.btnStart.Appearance.Options.UseFont = true;
- this.btnStart.Location = new System.Drawing.Point(512, 12);
- this.btnStart.Name = "btnStart";
- this.btnStart.Size = new System.Drawing.Size(246, 27);
- this.btnStart.StyleController = this.layoutMx1;
- this.btnStart.TabIndex = 5;
- this.btnStart.Text = "鍚姩";
- this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
+ this.button1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question;
+ this.button1.Appearance.Options.UseBackColor = true;
+ this.button1.Appearance.Options.UseFont = true;
+ this.button1.Location = new System.Drawing.Point(262, 12);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(246, 27);
+ this.button1.StyleController = this.layoutMx1;
+ this.button1.TabIndex = 5;
+ this.button1.Text = "鍚姩";
//
// cmbSerialPortNum
//
- this.cmbSerialPortNum.Location = new System.Drawing.Point(344, 12);
+ this.cmbSerialPortNum.Location = new System.Drawing.Point(94, 43);
this.cmbSerialPortNum.Name = "cmbSerialPortNum";
this.cmbSerialPortNum.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -177,7 +163,7 @@
// cmbBaudRate
//
this.cmbBaudRate.EditValue = "9600";
- this.cmbBaudRate.Location = new System.Drawing.Point(344, 43);
+ this.cmbBaudRate.Location = new System.Drawing.Point(94, 74);
this.cmbBaudRate.Name = "cmbBaudRate";
this.cmbBaudRate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -195,7 +181,7 @@
//
// txtNum
//
- this.txtNum.Location = new System.Drawing.Point(594, 53);
+ this.txtNum.Location = new System.Drawing.Point(594, 22);
this.txtNum.Name = "txtNum";
this.txtNum.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 15F);
this.txtNum.Properties.Appearance.Options.UseFont = true;
@@ -204,78 +190,38 @@
this.txtNum.StyleController = this.layoutMx1;
this.txtNum.TabIndex = 8;
//
- // comSjw
- //
- this.comSjw.EditValue = "8";
- this.comSjw.Location = new System.Drawing.Point(94, 43);
- this.comSjw.Name = "comSjw";
- this.comSjw.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
- new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
- this.comSjw.Properties.Items.AddRange(new object[] {
- "5",
- "6",
- "7",
- "8"});
- this.comSjw.Properties.NullText = "-璇烽�夋嫨-";
- this.comSjw.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
- this.comSjw.Size = new System.Drawing.Size(164, 24);
- this.comSjw.StyleController = this.layoutMx1;
- this.comSjw.TabIndex = 11;
- //
- // comStopBits
- //
- this.comStopBits.EditValue = "1";
- this.comStopBits.Location = new System.Drawing.Point(344, 74);
- this.comStopBits.Name = "comStopBits";
- this.comStopBits.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
- new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
- this.comStopBits.Properties.Items.AddRange(new object[] {
- "1",
- "2"});
- this.comStopBits.Properties.NullText = "-璇烽�夋嫨-";
- this.comStopBits.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
- this.comStopBits.Size = new System.Drawing.Size(164, 24);
- this.comStopBits.StyleController = this.layoutMx1;
- this.comStopBits.TabIndex = 12;
- //
- // comParity
- //
- this.comParity.EditValue = "None";
- this.comParity.Location = new System.Drawing.Point(94, 74);
- this.comParity.Name = "comParity";
- this.comParity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
- new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
- this.comParity.Properties.Items.AddRange(new object[] {
- "None",
- "Odd",
- "Even"});
- this.comParity.Properties.NullText = "-璇烽�夋嫨-";
- this.comParity.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
- this.comParity.Size = new System.Drawing.Size(164, 24);
- this.comParity.StyleController = this.layoutMx1;
- this.comParity.TabIndex = 13;
- //
// txtMsg
//
- this.txtMsg.Location = new System.Drawing.Point(94, 123);
+ this.txtMsg.Location = new System.Drawing.Point(512, 74);
this.txtMsg.Name = "txtMsg";
- this.txtMsg.Size = new System.Drawing.Size(414, 35);
+ this.txtMsg.Properties.ReadOnly = true;
+ this.txtMsg.Size = new System.Drawing.Size(516, 27);
this.txtMsg.StyleController = this.layoutMx1;
this.txtMsg.TabIndex = 15;
+ //
+ // button2
+ //
+ this.button2.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger;
+ this.button2.Appearance.Options.UseBackColor = true;
+ this.button2.Location = new System.Drawing.Point(262, 43);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(246, 27);
+ this.button2.StyleController = this.layoutMx1;
+ this.button2.TabIndex = 16;
+ this.button2.Text = "鍋滄";
//
// Root
//
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.Root.GroupBordersVisible = false;
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
- this.cmbBaudRate1111,
this.layoutControlItem3,
this.layoutControlItem1,
- this.layoutControlItem7,
- this.layoutControlItem9,
- this.layoutControlItem4,
+ this.cmbBaudRate1111,
this.layoutControlItem2,
- this.layoutControlItem8});
+ this.layoutControlItem6,
+ this.layoutControlItem4,
+ this.layoutControlItem5});
this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.Root.Name = "Root";
columnDefinition1.SizeType = System.Windows.Forms.SizeType.Absolute;
@@ -301,17 +247,6 @@
this.Root.Size = new System.Drawing.Size(1040, 113);
this.Root.TextVisible = false;
//
- // cmbBaudRate1111
- //
- this.cmbBaudRate1111.Control = this.cmbBaudRate;
- this.cmbBaudRate1111.Location = new System.Drawing.Point(250, 31);
- this.cmbBaudRate1111.Name = "cmbBaudRate1111";
- this.cmbBaudRate1111.OptionsTableLayoutItem.ColumnIndex = 1;
- this.cmbBaudRate1111.OptionsTableLayoutItem.RowIndex = 1;
- this.cmbBaudRate1111.Size = new System.Drawing.Size(250, 31);
- this.cmbBaudRate1111.Text = "娉㈢壒鐜�";
- this.cmbBaudRate1111.TextSize = new System.Drawing.Size(70, 18);
- //
// layoutControlItem3
//
this.layoutControlItem3.Control = this.comLine;
@@ -324,33 +259,48 @@
// layoutControlItem1
//
this.layoutControlItem1.Control = this.cmbSerialPortNum;
- this.layoutControlItem1.Location = new System.Drawing.Point(250, 0);
+ this.layoutControlItem1.Location = new System.Drawing.Point(0, 31);
this.layoutControlItem1.Name = "layoutControlItem1";
- this.layoutControlItem1.OptionsTableLayoutItem.ColumnIndex = 1;
+ this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem1.Size = new System.Drawing.Size(250, 31);
this.layoutControlItem1.Text = "涓插彛鍙�";
this.layoutControlItem1.TextSize = new System.Drawing.Size(70, 18);
//
- // layoutControlItem7
+ // cmbBaudRate1111
//
- this.layoutControlItem7.Control = this.comSjw;
- this.layoutControlItem7.Location = new System.Drawing.Point(0, 31);
- this.layoutControlItem7.Name = "layoutControlItem7";
- this.layoutControlItem7.OptionsTableLayoutItem.RowIndex = 1;
- this.layoutControlItem7.Size = new System.Drawing.Size(250, 31);
- this.layoutControlItem7.Text = "鏁版嵁浣�";
- this.layoutControlItem7.TextSize = new System.Drawing.Size(70, 18);
+ this.cmbBaudRate1111.Control = this.cmbBaudRate;
+ this.cmbBaudRate1111.Location = new System.Drawing.Point(0, 62);
+ this.cmbBaudRate1111.Name = "cmbBaudRate1111";
+ this.cmbBaudRate1111.OptionsTableLayoutItem.RowIndex = 2;
+ this.cmbBaudRate1111.Size = new System.Drawing.Size(250, 31);
+ this.cmbBaudRate1111.Text = "娉㈢壒鐜�";
+ this.cmbBaudRate1111.TextSize = new System.Drawing.Size(70, 18);
//
- // layoutControlItem9
+ // layoutControlItem2
//
- this.layoutControlItem9.Control = this.comParity;
- this.layoutControlItem9.CustomizationFormText = "鏍¢獙浣�";
- this.layoutControlItem9.Location = new System.Drawing.Point(0, 62);
- this.layoutControlItem9.Name = "layoutControlItem9";
- this.layoutControlItem9.OptionsTableLayoutItem.RowIndex = 2;
- this.layoutControlItem9.Size = new System.Drawing.Size(250, 31);
- this.layoutControlItem9.Text = "鏍¢獙浣�";
- this.layoutControlItem9.TextSize = new System.Drawing.Size(70, 18);
+ this.layoutControlItem2.Control = this.button1;
+ this.layoutControlItem2.Location = new System.Drawing.Point(250, 0);
+ this.layoutControlItem2.MaxSize = new System.Drawing.Size(250, 31);
+ this.layoutControlItem2.MinSize = new System.Drawing.Size(41, 31);
+ this.layoutControlItem2.Name = "layoutControlItem2";
+ this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 1;
+ this.layoutControlItem2.Size = new System.Drawing.Size(250, 31);
+ this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+ this.layoutControlItem2.Text = "鍚姩";
+ this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+ this.layoutControlItem2.TextVisible = false;
+ //
+ // layoutControlItem6
+ //
+ this.layoutControlItem6.Control = this.button2;
+ this.layoutControlItem6.Location = new System.Drawing.Point(250, 31);
+ this.layoutControlItem6.Name = "layoutControlItem6";
+ this.layoutControlItem6.OptionsTableLayoutItem.ColumnIndex = 1;
+ this.layoutControlItem6.OptionsTableLayoutItem.RowIndex = 1;
+ this.layoutControlItem6.Size = new System.Drawing.Size(250, 31);
+ this.layoutControlItem6.Text = "鍋滄";
+ this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
+ this.layoutControlItem6.TextVisible = false;
//
// layoutControlItem4
//
@@ -358,50 +308,25 @@
this.layoutControlItem4.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem4.Control = this.txtNum;
- this.layoutControlItem4.Location = new System.Drawing.Point(500, 31);
+ this.layoutControlItem4.Location = new System.Drawing.Point(500, 0);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.OptionsTableLayoutItem.ColumnIndex = 2;
- this.layoutControlItem4.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem4.OptionsTableLayoutItem.RowSpan = 2;
this.layoutControlItem4.Size = new System.Drawing.Size(520, 62);
this.layoutControlItem4.Text = "閲嶉噺";
this.layoutControlItem4.TextSize = new System.Drawing.Size(70, 41);
//
- // layoutControlItem2
- //
- this.layoutControlItem2.Control = this.btnStart;
- this.layoutControlItem2.Location = new System.Drawing.Point(500, 0);
- this.layoutControlItem2.MaxSize = new System.Drawing.Size(250, 31);
- this.layoutControlItem2.MinSize = new System.Drawing.Size(41, 31);
- this.layoutControlItem2.Name = "layoutControlItem2";
- this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2;
- this.layoutControlItem2.Size = new System.Drawing.Size(520, 31);
- this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
- this.layoutControlItem2.Text = "鍚姩";
- this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
- this.layoutControlItem2.TextVisible = false;
- //
- // layoutControlItem8
- //
- this.layoutControlItem8.Control = this.comStopBits;
- this.layoutControlItem8.Location = new System.Drawing.Point(250, 62);
- this.layoutControlItem8.Name = "layoutControlItem8";
- this.layoutControlItem8.OptionsTableLayoutItem.ColumnIndex = 1;
- this.layoutControlItem8.OptionsTableLayoutItem.RowIndex = 2;
- this.layoutControlItem8.Size = new System.Drawing.Size(250, 31);
- this.layoutControlItem8.Text = "鍋滄浣�";
- this.layoutControlItem8.TextSize = new System.Drawing.Size(70, 18);
- //
// layoutControlItem5
//
this.layoutControlItem5.Control = this.txtMsg;
- this.layoutControlItem5.Location = new System.Drawing.Point(0, 111);
+ this.layoutControlItem5.Location = new System.Drawing.Point(500, 62);
this.layoutControlItem5.Name = "layoutControlItem5";
- this.layoutControlItem5.OptionsTableLayoutItem.ColumnSpan = 2;
- this.layoutControlItem5.OptionsTableLayoutItem.RowIndex = 3;
- this.layoutControlItem5.Size = new System.Drawing.Size(500, 39);
+ this.layoutControlItem5.OptionsTableLayoutItem.ColumnIndex = 2;
+ this.layoutControlItem5.OptionsTableLayoutItem.RowIndex = 2;
+ this.layoutControlItem5.Size = new System.Drawing.Size(520, 31);
this.layoutControlItem5.Text = "鏀跺垪琛�";
- this.layoutControlItem5.TextSize = new System.Drawing.Size(70, 18);
+ this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
+ this.layoutControlItem5.TextVisible = false;
//
// gcMx1
//
@@ -585,19 +510,14 @@
((System.ComponentModel.ISupportInitialize)(this.cmbSerialPortNum.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtNum.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.comSjw.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.comStopBits.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.comParity.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtMsg.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit();
@@ -612,11 +532,7 @@
private DevExpress.XtraEditors.ComboBoxEdit cmbSerialPortNum;
private DevExpress.XtraEditors.ComboBoxEdit cmbBaudRate;
private DevExpress.XtraEditors.TextEdit txtNum;
- private DevExpress.XtraEditors.ComboBoxEdit comSjw;
- private DevExpress.XtraEditors.ComboBoxEdit comStopBits;
- private DevExpress.XtraEditors.ComboBoxEdit comParity;
- private DevExpress.XtraLayout.LayoutControlItem cmbBaudRate1111;
- private DevExpress.XtraEditors.SimpleButton btnStart;
+ private DevExpress.XtraEditors.SimpleButton button1;
private DevExpress.XtraGrid.GridControl gcMx1;
private DevExpress.XtraGrid.Views.Grid.GridView gvMx1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
@@ -633,13 +549,13 @@
private DevExpress.XtraGrid.Columns.GridColumn gridColumn13;
private UserControl.UcLookWorkline comLine;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraEditors.MemoEdit txtMsg;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
+ private DevExpress.XtraLayout.LayoutControlItem cmbBaudRate1111;
+ private DevExpress.XtraEditors.SimpleButton button2;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs
index 10f7707..bb61c56 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs
@@ -1,50 +1,193 @@
-锘縰sing System;
+锘縰sing DevExpress.Utils;
+using Gs.DevApp.Entity;
+using Gs.DevApp.ToolBox;
+using Microsoft.Win32;
+using Newtonsoft.Json;
+using NModbus;
+using NModbus.Serial;
+using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
+using System.Threading;
using System.Timers;
using System.Windows.Forms;
-using DevExpress.Utils;
-using Gs.DevApp.Entity;
-using Gs.DevApp.ToolBox;
-using Newtonsoft.Json;
namespace Gs.DevApp.DevFrm.Work
{
public partial class Frm_Work09 : DevExpress.XtraEditors.XtraForm
{
- string _strType = "";
string _webServiceName = "WorkWeight/";
- /// <summary>
- /// 涓插彛绫�
- /// </summary>
- private SerialPort Sp = new SerialPort();
- /// <summary>
- /// gridview瀹氭椂鍒锋柊
- /// </summary>
- System.Timers.Timer timer = new System.Timers.Timer(10000);
+ public System.IO.Ports.SerialPort Sp = new System.IO.Ports.SerialPort();
+ public delegate void HandleInterfaceUpdataDelegate(string text);
+ private Frm_Work09.HandleInterfaceUpdataDelegate interfaceUpdataHandle;
+ private Dictionary<string, Thread> dicThread = new Dictionary<string, Thread>();
+ private System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer();
+
+ System.Timers.Timer timerGridview = new System.Timers.Timer(10000);
public Frm_Work09(string strType)
{
InitializeComponent();
- this._strType = strType;
- this.Text = _strType + ":" + this.Text;
+ GetComList();
+ comLine.getSuppler("");
+ #region MyRegion
+ int int32 = 10000;
+ string _vanishingSeconds = ConfigurationManager.AppSettings["TimingMailInterval"];
+ if (!string.IsNullOrEmpty(_vanishingSeconds))
+ int32 = int.Parse(_vanishingSeconds);
+ this.timer1.Interval = int32;
+ this.button1.Enabled = true;
+ this.button2.Enabled = false;
+ this.comLine.IsReadly = false;
+ this.cmbSerialPortNum.Enabled = true;
+ this.cmbBaudRate.Enabled = true;
+ this.cmbBaudRate.SelectedIndex = 1;
+ #endregion
+ this.timer1.Tick += (s, e) =>
+ {
+ if (this.dicThread.Keys.Contains<string>("GetWeight"))
+ return;
+ Thread thread1 = new Thread(new ThreadStart(this.GetWeight));
+ thread1.Start();
+ this.dicThread.Add("GetWeight", thread1);
+ };
+ this.button1.Click += (s, e) =>
+ {
+ string _comLine = comLine.GetId();
+ if (string.IsNullOrEmpty(_comLine))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨绾夸綋");
+ this.comLine.Focus();
+ return;
+ }
+ try
+ {
+ ToolBox.LogHelper.Debug(this.ToString(), " 寮�濮嬮噰闆�");
+ if (this.cmbBaudRate.Text.Trim() != "" && this.cmbSerialPortNum.Text != "")
+ {
+ ToolBox.LogHelper.Debug(this.ToString(), "閰嶇疆涓插彛閫氫俊");
+ this.interfaceUpdataHandle = new Frm_Work09.HandleInterfaceUpdataDelegate(this.UpdateTextBox);
+ this.Sp.PortName = this.cmbSerialPortNum.Text.Trim();
+ this.Sp.BaudRate = Convert.ToInt32(this.cmbBaudRate.Text.Trim());
+ this.Sp.Parity = Parity.None;
+ this.Sp.StopBits = StopBits.One;
+ ToolBox.LogHelper.Debug(this.ToString(), "鎵撳紑涓插彛鍚岄�氫俊");
+ this.Sp.Open();
+ this.button1.Enabled = false;
+ this.button2.Enabled = true;
+ this.timer1.Enabled = false;
+ this.comLine.IsReadly = true;
+ this.cmbSerialPortNum.Enabled = false;
+ this.cmbBaudRate.Enabled = false;
+ ToolBox.LogHelper.Debug(this.ToString(), "鍚姩鍒锋柊鏁版嵁瀹氭椂鍣�");
+ this.timer1.Start();
+ }
+ else
+ {
+ ToolBox.LogHelper.Debug(this.ToString(), "璇疯緭鍏ユ纭殑涓插彛鍙峰拰娉㈢壒鐜�");
+ int num = (int)MessageBox.Show("璇疯緭鍏ユ纭殑涓插彛鍙峰拰娉㈢壒鐜囷紒");
+ this.cmbSerialPortNum.Focus();
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.LogHelper.Debug(this.ToString(), ex.Message);
+ int num = (int)MessageBox.Show($"涓插彛{this.cmbSerialPortNum.Text.Trim()}鎵撳紑澶辫触锛亄ex.Message}");
+ }
+ };
+ this.button2.Click += (s, e) =>
+ {
+ try
+ {
+ if (this.dicThread.Keys.Contains<string>("GetWeight"))
+ {
+ Thread thread = this.dicThread["GetWeight"];
+ if (thread.IsAlive)
+ thread.Abort();
+ this.dicThread.Remove("GetWeight");
+ }
+ this.button1.Enabled = true;
+ this.button2.Enabled = false;
+ this.comLine.IsReadly = false;
+ this.cmbSerialPortNum.Enabled = true;
+ this.cmbBaudRate.Enabled = true;
+ this.timer1.Stop();
+ this.Sp.Close();
+ }
+ catch (Exception ex)
+ {
+ //int num = (int)MessageBox.Show(ex.Message);
+ //Application.Exit();
+ MessageBox.Show(ex.Message);
+ ToolBox.LogHelper.Debug(this.ToString(), ex.Message);
+ }
+ };
this.FormClosing += (s, e) =>
{
if (Sp.IsOpen)
Sp.Close();
- if (timer != null)
+ if (timer1 != null)
{
- timer.Stop();
- timer.Dispose();
+ timer1.Stop();
+ timer1.Dispose();
+ }
+ if (timerGridview != null)
+ {
+ timerGridview.Stop();
+ timerGridview.Dispose();
+ }
+ try
+ {
+ if (this.dicThread.Keys.Contains<string>("GetWeight"))
+ {
+ Thread thread = this.dicThread["GetWeight"];
+ if (thread.IsAlive)
+ thread.Abort();
+ this.dicThread.Remove("GetWeight");
+ }
+ this.timer1.Stop();
+ this.Sp.Close();
+ }
+ catch (Exception ex)
+ {
+ //int num = (int)MessageBox.Show(ex.Message);
+ //Application.Exit();
+ MessageBox.Show(ex.Message);
}
};
- GetComList();
- if (this._strType == QcSeason.浜х嚎绉伴噸.ToString())
- {
- this.comLine.getSuppler("");
- }
+ #region gridview璁剧疆
+ timerGridview.Elapsed += (s, e) => {
+ var _obj = new
+ {
+ lineId = comLine.GetId(),
+ };
+ try
+ {
+ var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModelList", JsonConvert.SerializeObject(_obj), false);
+ var dd = UtilityHelper.ReturnToList(strReturn);
+ var dt = dd.rtnData;
+ BeginInvoke(new Action(() =>
+ {
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = dt;
+ gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
+ }));
+ BeginInvoke(new Action(() => {
+ this.txtMsg.Text = "鏈�杩戝埛鏂板垪琛ㄦ椂闂�:" + DateTime.Now.ToString();
+ }));
+ }
+ catch (Exception ex)
+ {
+ Toast vm = new Toast(-1, "gvMx1:" + ex.Message);
+ vm.Show();
+ }
+ };
+ timerGridview.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄
+ timerGridview.Enabled = true; // 寮�濮嬭鏃�
gvMx1.OptionsFind.ShowSearchNavButtons = false;
gvMx1.OptionsView.ShowAutoFilterRow = false;
gvMx1.OptionsView.ShowGroupPanel = false;
@@ -70,178 +213,65 @@
if (e.Info.IsRowIndicator && e.RowHandle >= 0)
e.Info.DisplayText = (e.RowHandle + 1).ToString();
};
- }
-
- /// <summary>
- /// 浠庢敞鍐岃〃鑾峰彇绯荤粺涓插彛鍒楄〃
- /// </summary>
- private void GetComList()
- {
- this.cmbSerialPortNum.Clear();
- string[] ports = SerialPort.GetPortNames();
- foreach (string port in ports)
- {
- cmbSerialPortNum.Properties.Items.Add(port);
- }
- }
- /// <summary>
- /// 鍚姩浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnStart_Click(object sender, EventArgs e)
- {
- Sp.DataReceived -= new SerialDataReceivedEventHandler(Sp_DataReceived);
- string _cmbSerialPortNum = cmbSerialPortNum.Text.Trim();
- string _cmbBaudRate = cmbBaudRate.Text.Trim();
- string _comSjw = comSjw.Text.Trim();
- string _comStopBits = comStopBits.Text.Trim();
- string _comParity = comParity.Text.Trim();
- if (this._strType == QcSeason.浜х嚎绉伴噸.ToString())
- {
- string _comLine = comLine.GetId();
- if (string.IsNullOrEmpty(_comLine))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨绾夸綋");
- this.comLine.Focus();
- return;
- }
- }
- if (cmbSerialPortNum.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨涓插彛鍙�");
- this.cmbSerialPortNum.Focus();
- return;
- }
- if (cmbBaudRate.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨娉㈢壒鐜�");
- this.cmbBaudRate.Focus();
- return;
- }
- if (comSjw.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鏁版嵁浣�");
- this.comSjw.Focus();
- return;
- }
- if (comStopBits.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍋滄浣�");
- this.comStopBits.Focus();
- return;
- }
- if (comParity.SelectedIndex < 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鏍¢獙");
- this.comParity.Focus();
- return;
- }
- try
- {
- Sp.ReceivedBytesThreshold = 1;
- Sp.PortName = _cmbSerialPortNum;
- Sp.BaudRate = Convert.ToInt32(_cmbBaudRate);//璁剧疆娉㈢壒鐜�
- if (Enum.TryParse(_comParity, out Parity pt1))
- {
- Sp.Parity = pt1;// 璁剧疆鏍¢獙浣�
- }
- else
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("鏃犳硶璇嗗埆鐨勬牎楠�");
- }
- if (Enum.TryParse(_comStopBits, out StopBits pt2))
- {
- Sp.StopBits = pt2;//璁剧疆鍋滄浣�
- }
- else
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("鏃犳硶璇嗗埆鐨勫仠姝綅");
- }
- Sp.DataBits = int.Parse(_comSjw); // 璁剧疆鏁版嵁浣�
- //Sp.ReadTimeout = 500; // 璁剧疆瓒呮椂鏃堕棿锛屼緥濡�500姣
- //Sp.ReadBufferSize = 4096; // 璁剧疆缂撳啿鍖哄ぇ灏�
- Sp.DataReceived += new SerialDataReceivedEventHandler(Sp_DataReceived);
- Sp.ReceivedBytesThreshold = 1;
- LogHelper.Debug(this.ToString(), "鎵撳紑涓插彛閫氫俊PortName-" + Sp.PortName.ToString() + ",BaudRate-" + Sp.BaudRate.ToString() + ",StopBits-" + Sp.StopBits.ToString() + ",Parity-" + Sp.Parity.ToString());
- if (!Sp.IsOpen)
- Sp.Open();
- setEnable(false);
- timer.Elapsed += OnTimedEvent;
- timer.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄
- timer.Enabled = true; // 寮�濮嬭鏃�
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("鎵撳紑鎴愬姛锛�");
- }
- catch (Exception exe)
- {
- LogHelper.Debug(this.ToString(), "鎵撳紑涓插彛閫氫俊澶辫触:" + exe.Message);
- Gs.DevApp.ToolBox.MsgHelper.ShowError("鎵撳紑澶辫触" + exe.Message);
- }
+ #endregion
}
/// <summary>
- /// 涓插彛鏀跺埌鏁版嵁
+ /// 鑾峰彇閲嶉噺
/// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- public void Sp_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
+ public void GetWeight()
{
- string _tmpStr = string.Empty;
- try
+ ModbusFactory factory = new ModbusFactory();
+ ToolBox.LogHelper.Debug(this.ToString(), "GetWeight鍒涘缓modbus瀵硅薄");
+ IModbusMaster rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
+ bool flag = true;
+ while (true)
{
- int i = Sp.BytesToRead;
- if (i > 0)
+ // addModel("1", "2");
+ //ToolBox.LogHelper.Debug(this.ToString(), "GetWeight鍒涘缓modbus瀵硅薄");
+ try
{
- _tmpStr = Sp.ReadExisting();
- // Thread.Sleep(1000);
- LogHelper.Debug(this.ToString(), $"鐩戝惉鍒版暟鎹紝瀛楄妭闀垮害:{i.ToString()}锛寋_tmpStr}");
- this.BeginInvoke(new Action(() =>
+ if (!this.Sp.IsOpen)
{
- txtMsg.AppendLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff->瀛楄妭鏁板瓧" + i.ToString() + "->") + _tmpStr);
- //ST,GS,+ 250.2kg
- if (_tmpStr.Length <= 0)
- {
- LogHelper.Debug(this.ToString(), "_tmpStr闀垮害<=0锛岄��鍑轰笂鎶�");
- return;
- }
- if (!_tmpStr.Contains("ST"))
- {
- LogHelper.Debug(this.ToString(), "_tmpStr閲嶉噺鐘舵�佷笉涓篠T锛岄��鍑轰笂鎶�");
- return;
- }
- if (!_tmpStr.Contains("+"))
- {
- LogHelper.Debug(this.ToString(), "_tmpStr涓嶅寘鍚噸閲�+锛岄��鍑轰笂鎶�");
- return;
- }
- string[] _ary = _tmpStr.Split('+');
- string abc = _ary.Last();//ST,GS,
- txtNum.Text = (abc.Trim().Replace("k", "").Replace("g", "").Replace("S", "").Replace("T", "").Replace("G", "").Replace(",", ""));
- addModel(txtNum.Text, _tmpStr);
- }));
+ ToolBox.LogHelper.Debug(this.ToString(), "GetWeight 閲嶆柊鎵撳紑涓插彛杩炴帴");
+ this.Sp.Open();
+ rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
+ }
+ if (rtuMaster == null)
+ {
+ ToolBox.LogHelper.Debug(this.ToString(), "GetWeight 閲嶆柊鍒涘缓modbus瀵硅薄2");
+ rtuMaster = (IModbusMaster)factory.CreateRtuMaster(this.Sp);
+ }
+ byte slaveAddress3 = byte.Parse("1");
+ ushort startAddress3 = ushort.Parse("0002");
+ ushort numberOfPoints1 = ushort.Parse("2");
+ ushort[] numArray = rtuMaster.ReadHoldingRegisters(slaveAddress3, startAddress3, numberOfPoints1);
+ float single = BitConverter.ToSingle(this.CombomBinaryArray(BitConverter.GetBytes(numArray[1]), BitConverter.GetBytes(numArray[0])), 0);
+ this.Invoke((Delegate)this.interfaceUpdataHandle, (object)single.ToString());
+ byte slaveAddress4 = byte.Parse("1");
+ ushort startAddress4 = ushort.Parse("0001");
+ ushort numberOfPoints2 = ushort.Parse("1");
+ int int32 = Convert.ToInt32(rtuMaster.ReadHoldingRegisters(slaveAddress4, startAddress4, numberOfPoints2)[0].ToString());
+ string str = Convert.ToString(int32, 2).PadLeft(16 /*0x10*/, '0');
+ char ch1 = str[1];
+ char ch2 = str[6];
+ if (ch1 == '0' && ch2 == '0')
+ {
+ flag = true;
+ }
+ else if (flag)
+ {
+ flag = false;
+ }
+ addModel(single.ToString(), int32.ToString());
+ ToolBox.LogHelper.Debug(this.ToString(), "single:" + single.ToString() + ",flag:" + flag.ToString() + ",int32:" + int32.ToString());
+ Thread.Sleep(2000);
+ }
+ catch (Exception ex)
+ {
+ Thread.Sleep(2000);
}
}
- catch (Exception ex)
- {
- LogHelper.Debug(this.ToString(), $"鐩戝惉鍒版暟鎹甧rror:{ex.Message}");
- return;
- }
- }
-
-
- /// <summary>
- /// 鍚敤鎴栫鐢�
- /// </summary>
- /// <param name="bl"></param>
- private void setEnable(bool bl)
- {
- comLine.Enabled = bl;
- cmbSerialPortNum.Enabled = bl;
- cmbBaudRate.Enabled = bl;
- comSjw.Enabled = bl;
- comStopBits.Enabled = bl;
- comParity.Enabled = bl;
- btnStart.Enabled = false;
}
/// <summary>
/// 涓婁紶绉伴噸鏁版嵁
@@ -250,13 +280,7 @@
/// <param name="_realWeightTxt">鍘熷瓙涓�</param>
private void addModel(string _realWeight, string _realWeightTxt)
{
- string _lineId = "";
- if (this._strType == QcSeason.浜х嚎绉伴噸.ToString())
- {
- _lineId = comLine.GetId();
- }
- else
- _lineId = "0";
+ string _lineId = "0";
var _obj = new
{
lineId = _lineId,
@@ -265,51 +289,63 @@
};
try
{
- string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
+ string strJson = UtilityHelper.HttpPost("", "WorkWeight/EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode <= 0)
{
- Toast vm = new Toast(-1, _rtn.rtnMsg);
- vm.Show();
+ ToolBox.LogHelper.Debug(this.ToString(), "WorkWeight/EditModel:" + strJson);
}
}
catch (Exception ex)
{
- ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ ToolBox.LogHelper.Debug(this.ToString(), ex.Message);
}
}
+
/// <summary>
- /// 瀹氭椂璇诲彇鍒楄〃
+ /// 鏇存柊UI
/// </summary>
- /// <param name="source"></param>
- /// <param name="e"></param>
- private void OnTimedEvent(Object source, ElapsedEventArgs e)
+ /// <param name="text"></param>
+
+ private void UpdateTextBox(string text)
{
- if (this._strType == QcSeason.iqc绉伴噸.ToString())
- return;
- var _obj = new
- {
- lineId = comLine.GetId(),
- };
try
{
- var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModelList", JsonConvert.SerializeObject(_obj), false);
- var dd = UtilityHelper.ReturnToList(strReturn);
- var dt = dd.rtnData;
- BeginInvoke(new Action(() =>
- {
- gcMx1.BindingContext = new BindingContext();
- gcMx1.DataSource = dt;
- gcMx1.ForceInitialize();
- gvMx1.BestFitColumns();
- }));
+ this.txtMsg.Text ="鏈�杩戠О閲嶆椂闂�:"+ DateTime.Now.ToString();
+ if (this.txtNum.Text == text)
+ return;
+ this.txtNum.Text = text;
}
catch (Exception ex)
{
- Toast vm = new Toast(-1, "gvMx1:" + ex.Message);
- vm.Show();
+ ToolBox.LogHelper.Debug(this.ToString(), ex.Message);
}
}
+
+ private void GetComList()
+ {
+ this.cmbSerialPortNum.Clear();
+ RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Hardware\\DeviceMap\\SerialComm");
+ if (registryKey == null)
+ return;
+ foreach (string valueName in registryKey.GetValueNames())
+ {
+ string description = (string)registryKey.GetValue(valueName);
+ cmbSerialPortNum.Properties.Items.Add(description);
+ }
+ if (this.cmbSerialPortNum.Properties.Items.Count > 0)
+ this.cmbSerialPortNum.SelectedIndex = 0;
+ }
+
+ private byte[] CombomBinaryArray(byte[] srcArray1, byte[] srcArray2)
+ {
+ byte[] destinationArray = new byte[srcArray1.Length + srcArray2.Length];
+ Array.Copy((Array)srcArray1, 0, (Array)destinationArray, 0, srcArray1.Length);
+ Array.Copy((Array)srcArray2, 0, (Array)destinationArray, srcArray1.Length, srcArray2.Length);
+ return destinationArray;
+ }
+
+
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj b/DevApp/Gs.DevApp/Gs.DevApp.csproj
index e0eadc0..28e2fa4 100644
--- a/DevApp/Gs.DevApp/Gs.DevApp.csproj
+++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -662,12 +662,6 @@
<Compile Include="DevFrm\QC\Models\MesQmCheckitemDt.cs" />
<Compile Include="DevFrm\QC\Models\MesSysLookups.cs" />
<Compile Include="DevFrm\QC\Models\MesSysLookupTypes.cs" />
- <Compile Include="DevFrm\QC\WeightIqc.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="DevFrm\QC\WeightIqc.Designer.cs">
- <DependentUpon>WeightIqc.cs</DependentUpon>
- </Compile>
<Compile Include="DevFrm\QC\Xls.cs">
<SubType>Form</SubType>
</Compile>
diff --git a/DevApp/Gs.DevApp/Program.cs b/DevApp/Gs.DevApp/Program.cs
index 5ab6b77..da19396 100644
--- a/DevApp/Gs.DevApp/Program.cs
+++ b/DevApp/Gs.DevApp/Program.cs
@@ -42,8 +42,6 @@
/// </summary>
private static void _startLogin()
{
- //Application.Run(new WeightIqc());
- //return;
CefSettings settings = new CefSettings();
settings.Locale = "zh-CN";
Cef.Initialize(settings);
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.Designer.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.Designer.cs
index b81dbdf..b6c6fa1 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.Designer.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.Designer.cs
@@ -74,12 +74,11 @@
this.barLargeButtonItem2 = new DevExpress.XtraBars.BarLargeButtonItem();
this.barLargeButtonItem3 = new DevExpress.XtraBars.BarLargeButtonItem();
this.barLargeButtonItem4 = new DevExpress.XtraBars.BarLargeButtonItem();
- this.btnWeight = new DevExpress.XtraBars.BarLargeButtonItem();
+ this.btnBaoGao = new DevExpress.XtraBars.BarLargeButtonItem();
this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
- this.btnBaoGao = new DevExpress.XtraBars.BarLargeButtonItem();
((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
this.SuspendLayout();
//
@@ -137,7 +136,6 @@
this.btnGongZi,
this.btnLianBan,
this.btnGx,
- this.btnWeight,
this.btnBaoGao});
this.barManager1.MainMenu = this.bar2;
this.barManager1.MaxItemId = 76;
@@ -194,7 +192,6 @@
new DevExpress.XtraBars.LinkPersistInfo(this.barLargeButtonItem2),
new DevExpress.XtraBars.LinkPersistInfo(this.barLargeButtonItem3),
new DevExpress.XtraBars.LinkPersistInfo(this.barLargeButtonItem4),
- new DevExpress.XtraBars.LinkPersistInfo(this.btnWeight),
new DevExpress.XtraBars.LinkPersistInfo(this.btnBaoGao)});
this.bar2.OptionsBar.DrawDragBorder = false;
this.bar2.OptionsBar.MultiLine = true;
@@ -601,14 +598,14 @@
this.barLargeButtonItem4.Tag = "Never";
this.barLargeButtonItem4.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
//
- // btnWeight
+ // btnBaoGao
//
- this.btnWeight.Caption = "绉伴噸";
- this.btnWeight.Id = 73;
- this.btnWeight.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnWeight.ImageOptions.Image")));
- this.btnWeight.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("btnWeight.ImageOptions.LargeImage")));
- this.btnWeight.Name = "btnWeight";
- this.btnWeight.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
+ this.btnBaoGao.Caption = "鐢熸垚鎶ュ憡";
+ this.btnBaoGao.Id = 75;
+ this.btnBaoGao.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnBaoGao.ImageOptions.Image")));
+ this.btnBaoGao.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("btnBaoGao.ImageOptions.LargeImage")));
+ this.btnBaoGao.Name = "btnBaoGao";
+ this.btnBaoGao.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
//
// barDockControlTop
//
@@ -641,15 +638,6 @@
this.barDockControlRight.Location = new System.Drawing.Point(1543, 213);
this.barDockControlRight.Manager = this.barManager1;
this.barDockControlRight.Size = new System.Drawing.Size(0, 0);
- //
- // btnBaoGao
- //
- this.btnBaoGao.Caption = "鐢熸垚鎶ュ憡";
- this.btnBaoGao.Id = 75;
- this.btnBaoGao.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnBaoGao.ImageOptions.Image")));
- this.btnBaoGao.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("btnBaoGao.ImageOptions.LargeImage")));
- this.btnBaoGao.Name = "btnBaoGao";
- this.btnBaoGao.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
//
// UcToolBarMenu
//
@@ -715,7 +703,6 @@
private DevExpress.XtraBars.BarLargeButtonItem btnGongZi;
private DevExpress.XtraBars.BarLargeButtonItem btnLianBan;
private DevExpress.XtraBars.BarLargeButtonItem btnGx;
- private DevExpress.XtraBars.BarLargeButtonItem btnWeight;
private DevExpress.XtraBars.BarLargeButtonItem btnBaoGao;
}
}
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index 26e02be..da1b4e2 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -62,7 +62,6 @@
btnGongZi.ItemClick += BtnGongZi_ItemClick;
btnLianBan.ItemClick += BtnLianBan_ItemClick;
btnGx.ItemClick += BtnGx_ItemClick;
- btnWeight.ItemClick += BtnWeight_ItemClick;
btnBaoGao.ItemClick += BtnBaoGao_ItemClick;
var lst = new List<string>();
foreach (BarItem item in barManager1.Items)
@@ -74,34 +73,7 @@
- /// <summary>
- /// 鍚姩绉伴噸
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- /// <exception cref="NotImplementedException"></exception>
- private void BtnWeight_ItemClick(object sender, ItemClickEventArgs e)
- {
- bool isOpen = false;
- foreach (Form form in Application.OpenForms)
- {
- if (form is WeightIqc)
- {
- isOpen = true;
- //form.Activate(); // 婵�娲诲凡瀛樺湪鐨勭獥浣�
- //form.MaximizeBox = true;
- //form.TopMost = true;
- MsgHelper.ShowInformation("宸茬粡鎵撳紑浜嗭紝璇峰嬁閲嶅鎵撳紑锛�");
- break;
- }
- }
- if (!isOpen)
- {
- var form = new WeightIqc();
- form.Show();
- }
- }
-
+
/// <summary>
/// 鍒濆鍖栨寜閽姸鎬�
/// </summary>
@@ -466,7 +438,6 @@
lst.Add(btnLianBan.Name);
// lst.Add(btnEsc.Name);
lst.Add(btnGx.Name);
- lst.Add(btnWeight.Name);
_enabledBtn(lst);
this.currentAction = "esc";
if (btnEscClick != null) btnEscClick(this, e);
@@ -519,7 +490,6 @@
lst.Add(btnLianBan.Name);
// lst.Add(btnEsc.Name);
lst.Add(btnGx.Name);
- lst.Add(btnWeight.Name);
_enabledBtn(lst);
}
}
@@ -545,7 +515,6 @@
lst.Add(btnLayout.Name);
lst.Add(btnFont.Name);
lst.Add(btnLog.Name);
- lst.Add(btnWeight.Name);
_enabledBtn(lst);
this.currentAction = "edit";
if (btnEdtClick != null) btnEdtClick(this, e);
@@ -573,7 +542,6 @@
lst.Add(btnHelp.Name);
lst.Add(btnLayout.Name);
lst.Add(btnFont.Name);
- lst.Add(btnWeight.Name);
_enabledBtn(lst);
this.currentAction = "add";
if (btnAddClick != null) btnAddClick(this, e);
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.resx b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.resx
index abd8047..13efea6 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.resx
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.resx
@@ -556,31 +556,31 @@
</data>
<data name="btnBaoGao.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAddEVYdFRpdGxlAFJlcG9ydExheW91dFBpdm90VGFibGU7x1GJfgAAAUlJREFUOE+Fk8tKw0AU
- htuSduNCfBZfSgRRRJAiKkVEEQWlgqCbLkSFiiIqIrhxI3h5EVG02kua6/F8oa0knaGBbzHzf/mZOSQ5
- Ecnpk6+evhzsn73JKPDweS95t1dQ2Dt+ljgWCaPYCjkefrbA2a49SRDGMjl1M6DrRynI8fCzBcWNw0cV
- InG90Ao5Hn62oFSpPogfRNLuhlKrvw5g3T8ROR7+UMHK7r14KrTcwAo5nrFgaedO7xnKb9tPnYD1/0xC
- wTMWlLduk3s2Wp4VcjxjweLmtXRU+Gp6VsjxjAUL61c6sGBwXPj86aYgxzMWzK9dSlsH9dFwrZDjGQvm
- KhfJpN+/3dQQWfdPRI5nKijOrp4nn2uz41shx8PPFjjT5ZOjmeW6jAIPP1tQUErKmDKuTBhgnxxv6GfK
- s6k4SlFBysI+OV7vd5bcHwTlmSbOHjj9AAAAAElFTkSuQmCC
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
+ bGUAUmVwb3J0TGF5b3V0UGl2b3RUYWJsZTvHUYl+AAABSUlEQVQ4T4WTy0rDQBSG25J240J8Fl9KBFFE
+ kCIqRUQRBaWCoJsuRIWKIioiuHEjeHkRUbTaS5rr8XyhrSSdoYFvMfN/+Zk5JDkRyemTr56+HOyfvcko
+ 8PB5L3m3V1DYO36WOBYJo9gKOR5+tsDZrj1JEMYyOXUzoOtHKcjx8LMFxY3DRxUicb3QCjkefragVKk+
+ iB9E0u6GUqu/DmDdPxE5Hv5QwcruvXgqtNzACjmesWBp507vGcpv20+dgPX/TELBMxaUt26TezZanhVy
+ PGPB4ua1dFT4anpWyPGMBQvrVzqwYHBc+PzppiDHMxbMr11KWwf10XCtkOMZC+YqF8mk37/d1BBZ909E
+ jmcqKM6uniefa7PjWyHHw88WONPlk6OZ5bqMAg8/W1BQSsqYMq5MGGCfHG/oZ8qzqThKUUHKwj45Xu93
+ ltwfBOWZJs4eOP0AAAAASUVORK5CYII=
</value>
</data>
<data name="btnBaoGao.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
- iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAddEVYdFRpdGxlAFJlcG9ydExheW91dFBpdm90VGFibGU7x1GJfgAAAoBJREFUWEe1l3lrE0EY
- h+uBtuIfoh/FL1XEet82tVarpR7VWlAUoRRapPW+D0QQEWn9INajR5pssrtJxveZZssgs/uCnQaefzLz
- Pu9vJzsTpsMYY5HPJmHz6NTsnbEH381GgJse9Frr+0+Arbem5kyrZUyj2QoKTtz0yAtAsm03J2dtQZw2
- g4ITNz3o5QuwRegcmfhm0kbL1JNmUHDipge98gJ0XRv/KpMpagQFJ256FAXYMXz/i51ck6KMvd0vvbhz
- NHDipkdhgKG7n1cDxFIYEJy41QCDtz+ZRCZHUuRjfGYuF8bdFXLrcOJWAwyMfTSJvLXVeiMoOHGrAfpH
- P9htU6mlXnxPnsG4uwJuHU7caoC+G+8LA/wvOHGrAUoj70ws+3YlSr34njyDcXcF3DqcuNUAvdff2n1b
- jpKg4MStBjh79Y2dvFxNvPiePINxdwXcOpy41QBnrry2+3apkgQFJ241wKnhV+0AcVBw4lYDnBySI1Ym
- L67EQcGJWw1w4vILE8nBsVCOg4ITtxrg+KXnMjk1f8r1NdwXy8Wdo4ETtxrg2OAzOTpT83u5HhScuNUA
- Ry8+LQzg234ZjLsr5NbhxK0GOHLhianK0flrqRYUnLjVAIcHHtuz++dizYvvyTMYd1fArcOJWw1w6Pxq
- gHkpCglO3GqAg/2PTEX+POYXpDAgOHHrAc49tP9eP6QoJDhxawG6DvQRIJGiKCg4cdOjKEBnT2nGXiIo
- CAlO3PTIC2BvRvtOT97rKU3L5PDgpge9fAHs3VDYLuwUdgm7hT3rBAcunLhz74b2dtyeQEqWit+Ll2Y9
- 4MCFE7f/dry/d1q+tyGyILwTIbGN27T7mo6/6HxMbvJS20MAAAAASUVORK5CYII=
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
+ bGUAUmVwb3J0TGF5b3V0UGl2b3RUYWJsZTvHUYl+AAACgElEQVRYR7WXeWsTQRiH64G24h+iH8UvVcR6
+ 3za1VqulHtVaUBShFFqk9b4PRBARaf0g1qNHmmyyu0nG95lmyyCz+4KdBp5/MvM+728nOxOmwxhjkc8m
+ YfPo1OydsQffzUaAmx70Wuv7T4Ctt6bmTKtlTKPZCgpO3PTIC0CybTcnZ21BnDaDghM3PejlC7BF6ByZ
+ +GbSRsvUk2ZQcOKmB73yAnRdG/8qkylqBAUnbnoUBdgxfP+LnVyTooy93S+9uHM0cOKmR2GAobufVwPE
+ UhgQnLjVAIO3P5lEJkdS5GN8Zi4Xxt0Vcutw4lYDDIx9NIm8tdV6Iyg4casB+kc/2G1TqaVefE+ewbi7
+ Am4dTtxqgL4b7wsD/C84casBSiPvTCz7diVKvfiePINxdwXcOpy41QC919/afVuOkqDgxK0GOHv1jZ28
+ XE28+J48g3F3Bdw6nLjVAGeuvLb7dqmSBAUnbjXAqeFX7QBxUHDiVgOcHJIjViYvrsRBwYlbDXDi8gsT
+ ycGxUI6DghO3GuD4pecyOTV/yvU13BfLxZ2jgRO3GuDY4DM5OlPze7keFJy41QBHLz4tDODbfhmMuyvk
+ 1uHErQY4cuGJqcrR+WupFhScuNUAhwce27P752LNi+/JMxh3V8Ctw4lbDXDo/GqAeSkKCU7caoCD/Y9M
+ Rf485hekMCA4cesBzj20/14/pCgkOHFrAboO9BEgkaIoKDhx06MoQGdPacZeIigICU7c9MgLYG9G+05P
+ 3uspTcvk8OCmB718AezdUNgu7BR2CbuFPesEBy6cuHPvhvZ23J5ASpaK34uXZj3gwIUTt/92vL93Wr63
+ IbIgvBMhsY3btPuajr/ofExu8lLbQwAAAABJRU5ErkJggg==
</value>
</data>
</root>
\ No newline at end of file
--
Gitblit v1.9.3