Commit 6aef2192 LN

1

1 个父辈 ac73409c
......@@ -28,43 +28,68 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.tabPageList = new System.Windows.Forms.TabControl();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPageList.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// tabPageList
//
this.tabPageList.Controls.Add(this.tabPage1);
this.tabPageList.Controls.Add(this.tabPage2);
this.tabPageList.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabPageList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabPageList.Location = new System.Drawing.Point(0, 0);
this.tabPageList.Name = "tabPageList";
this.tabPageList.SelectedIndex = 0;
this.tabPageList.Size = new System.Drawing.Size(1110, 660);
this.tabPageList.TabIndex = 0;
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "料仓客户端";
this.notifyIcon1.Visible = true;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.显示ToolStripMenuItem,
this.toolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(111, 56);
//
// 显示ToolStripMenuItem
//
this.显示ToolStripMenuItem.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.显示ToolStripMenuItem.Text = "显示";
this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem1.Text = "退出";
this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1102, 634);
this.tabPage1.Size = new System.Drawing.Size(1102, 627);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1102, 634);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -73,10 +98,11 @@
this.Controls.Add(this.tabPageList);
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmMain";
this.Text = "包装料料仓";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmMain_Load);
this.tabPageList.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
......@@ -84,7 +110,10 @@
#endregion
private System.Windows.Forms.TabControl tabPageList;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 显示ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
}
}
\ No newline at end of file
using OnlineStore.DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -55,5 +56,43 @@ namespace OnlineStore.ACPackingStore
tabPageList.Controls.Add(lineTabPage);
}
private void 显示ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
LogUtil.info("切换界面显示时,没有正确输入密码");
return;
}
this.Opacity = 100;
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true;
//DebugStatus(false);
}
catch (Exception ex)
{
LogUtil.error("显示界面出错:" + ex.ToString());
}
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes))
{
ExitApp();
}
}
private void ExitApp()
{
}
}
}
此文件的差异太大,无法显示。
......@@ -182,11 +182,6 @@
this.btnOpenDoor = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button6 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupHistory = new System.Windows.Forms.GroupBox();
this.txtHistoryTemp = new System.Windows.Forms.TextBox();
this.btnSelHistory = new System.Windows.Forms.Button();
......@@ -199,6 +194,7 @@
this.txtCurrCount = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.btnSelTemp = new System.Windows.Forms.Button();
this.txtHum = new System.Windows.Forms.TextBox();
this.label29 = new System.Windows.Forms.Label();
......@@ -235,9 +231,8 @@
this.tabPage3.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupHistory.SuspendLayout();
this.groupBox7.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
......@@ -309,7 +304,7 @@
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(6, 6);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(543, 351);
this.groupAxis.Size = new System.Drawing.Size(612, 351);
this.groupAxis.TabIndex = 216;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
......@@ -794,9 +789,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 92);
this.richTextBox1.Location = new System.Drawing.Point(7, 3);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 453);
this.richTextBox1.Size = new System.Drawing.Size(545, 542);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
......@@ -826,7 +821,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(6, 368);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(543, 182);
this.groupBox1.Size = new System.Drawing.Size(612, 182);
this.groupBox1.TabIndex = 217;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
......@@ -2043,12 +2038,11 @@
this.tabControl1.Location = new System.Drawing.Point(509, 89);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(568, 649);
this.tabControl1.Size = new System.Drawing.Size(637, 649);
this.tabControl1.TabIndex = 272;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.btnClearLog);
this.tabPage3.Controls.Add(this.btnCloseDoor);
this.tabPage3.Controls.Add(this.btnOpenDoor);
......@@ -2091,13 +2085,14 @@
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(560, 616);
this.tabPage1.Size = new System.Drawing.Size(629, 616);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupHistory);
this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
......@@ -2107,67 +2102,6 @@
this.tabPage2.Text = " 温湿度 ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(7, 8);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(545, 78);
this.groupBox2.TabIndex = 276;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "流水线通信测试";
//
// button6
//
this.button6.Location = new System.Drawing.Point(317, 32);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(100, 33);
this.button6.TabIndex = 275;
this.button6.Text = "发送";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(64, 31);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(100, 33);
this.button3.TabIndex = 273;
this.button3.Text = "连接";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(193, 32);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(100, 33);
this.button5.TabIndex = 274;
this.button5.Text = "停止";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// groupBox7
//
this.groupBox7.Controls.Add(this.groupHistory);
this.groupBox7.Controls.Add(this.btnSelTemp);
this.groupBox7.Controls.Add(this.txtHum);
this.groupBox7.Controls.Add(this.label29);
this.groupBox7.Controls.Add(this.txtTemp);
this.groupBox7.Controls.Add(this.label28);
this.groupBox7.Controls.Add(this.txtTempPort);
this.groupBox7.Controls.Add(this.label27);
this.groupBox7.Controls.Add(this.btnTempClose);
this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Location = new System.Drawing.Point(11, 6);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(534, 166);
this.groupBox7.TabIndex = 272;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
//
// groupHistory
//
this.groupHistory.Controls.Add(this.txtHistoryTemp);
......@@ -2181,7 +2115,7 @@
this.groupHistory.Controls.Add(this.txtCurrCount);
this.groupHistory.Controls.Add(this.label26);
this.groupHistory.Controls.Add(this.label22);
this.groupHistory.Location = new System.Drawing.Point(6, 138);
this.groupHistory.Location = new System.Drawing.Point(13, 182);
this.groupHistory.Name = "groupHistory";
this.groupHistory.Size = new System.Drawing.Size(532, 177);
this.groupHistory.TabIndex = 260;
......@@ -2309,6 +2243,24 @@
this.label22.Text = "记录温度值:";
this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.btnSelTemp);
this.groupBox7.Controls.Add(this.txtHum);
this.groupBox7.Controls.Add(this.label29);
this.groupBox7.Controls.Add(this.txtTemp);
this.groupBox7.Controls.Add(this.label28);
this.groupBox7.Controls.Add(this.txtTempPort);
this.groupBox7.Controls.Add(this.label27);
this.groupBox7.Controls.Add(this.btnTempClose);
this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Location = new System.Drawing.Point(11, 6);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(534, 166);
this.groupBox7.TabIndex = 272;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
//
// btnSelTemp
//
this.btnSelTemp.Location = new System.Drawing.Point(212, 82);
......@@ -2416,7 +2368,7 @@
this.tabControl2.Location = new System.Drawing.Point(6, 4);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
this.tabControl2.Size = new System.Drawing.Size(1068, 80);
this.tabControl2.Size = new System.Drawing.Size(1137, 80);
this.tabControl2.TabIndex = 271;
//
// tabPage4
......@@ -2501,7 +2453,7 @@
this.tabPage5.Location = new System.Drawing.Point(4, 30);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(1060, 46);
this.tabPage5.Size = new System.Drawing.Size(1129, 46);
this.tabPage5.TabIndex = 1;
this.tabPage5.Text = " 设备调试 ";
this.tabPage5.UseVisualStyleBackColor = true;
......@@ -2568,7 +2520,7 @@
this.tabPage6.Controls.Add(this.btnLogDebug);
this.tabPage6.Location = new System.Drawing.Point(4, 30);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Size = new System.Drawing.Size(1060, 46);
this.tabPage6.Size = new System.Drawing.Size(1129, 46);
this.tabPage6.TabIndex = 2;
this.tabPage6.Text = " 其他 ";
this.tabPage6.UseVisualStyleBackColor = true;
......@@ -2610,7 +2562,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1089, 749);
this.ClientSize = new System.Drawing.Size(1158, 749);
this.Controls.Add(this.tabControl2);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox3);
......@@ -2642,11 +2594,10 @@
this.tabPage3.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupHistory.ResumeLayout(false);
this.groupHistory.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.tabControl2.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
......@@ -2854,10 +2805,6 @@
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Button btnSelHistory;
private System.Windows.Forms.GroupBox groupHistory;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox chbDebug;
private System.Windows.Forms.Label lblMoveEquipInfo;
}
......
......@@ -52,6 +52,7 @@ namespace OnlineStore.ACPackingStore
this.Close();
return;
}
this.Text = BoxBean.Name;
//txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString();
cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList);
cmbAxisList.DisplayMember = "Explain";
......
......@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary
public AC_BOX_Bean(AC_BOX_Config config)
{
Init();
baseConfig = config;
serverConnectTimer = new System.Timers.Timer();
serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true;
......@@ -129,10 +130,10 @@ namespace OnlineStore.DeviceLibrary
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo());
moveAxisList.Add(Config.Comp_Axis);
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
moveAxisList.Add(Config.Comp_Axis);
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
}
/// <summary>
......
......@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary
private bool canStart = false;
public PackingStoreBean(Store_Config lineConfig, Dictionary<int, AC_BOX_Config> configList)
{
BoxConfigMap = new Dictionary<int, AC_BOX_Config>();
BoxMap = new Dictionary<int, AC_BOX_Bean>();
if (lineConfig.IOSingle_TimerOut <= 0)
{
......@@ -70,8 +71,8 @@ namespace OnlineStore.DeviceLibrary
CodeManager.LoadConfig();
Task.Factory.StartNew(delegate
{
IOManager.instance.ConnectionIOList(ioList);
{
IOManager.instance.ConnectionIOList(ioList);
addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check));
addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN));
addLastDI(IO_Type.Reset_BTN, IOValue(IO_Type.Reset_BTN));
......
......@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary
{
string nameStr = i.ToString().PadLeft(1, '0');
string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv");
AC_BOX_Config moveConfig = CSVConfigReader.LoadStoreConfig(i, CID + "_" + i, "BOX", config);
AC_BOX_Config moveConfig = CSVConfigReader.LoadBoxConfig(i, CID + "_" + i, "BOX", config);
AllConfigMap.Add(i, moveConfig);
storeConfig.Add(i, moveConfig);
}
......
......@@ -134,23 +134,17 @@ namespace OnlineStore.LoadCSVLibrary
return configList;
}
public static AC_BOX_Config LoadStoreConfig(int storeId, string cid, string storeType, string linefilePath)
public static AC_BOX_Config LoadBoxConfig(int storeId, string cid, string storeType, string linefilePath)
{
StoreConfig config = null;
config = new Store_Config(storeId, cid, storeType, linefilePath);
config = new AC_BOX_Config(storeId, cid, storeType, linefilePath);
return (AC_BOX_Config)LoadConfig(config);
}
public static Store_Config LoadLineConfig(int storeId, string cid, string storeType, string linefilePath)
{
StoreConfig config = null;
config = new Store_Config(storeId, cid, storeType, linefilePath);
return (Store_Config)LoadConfig(config);
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!