Commit 6aef2192 LN

1

1 个父辈 ac73409c
...@@ -28,43 +28,68 @@ ...@@ -28,43 +28,68 @@
/// </summary> /// </summary>
private void InitializeComponent() 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.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.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPageList.SuspendLayout(); this.tabPageList.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabPageList // tabPageList
// //
this.tabPageList.Controls.Add(this.tabPage1); this.tabPageList.Controls.Add(this.tabPage1);
this.tabPageList.Controls.Add(this.tabPage2);
this.tabPageList.Dock = System.Windows.Forms.DockStyle.Fill; 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.Location = new System.Drawing.Point(0, 0);
this.tabPageList.Name = "tabPageList"; this.tabPageList.Name = "tabPageList";
this.tabPageList.SelectedIndex = 0; this.tabPageList.SelectedIndex = 0;
this.tabPageList.Size = new System.Drawing.Size(1110, 660); this.tabPageList.Size = new System.Drawing.Size(1110, 660);
this.tabPageList.TabIndex = 0; 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 // 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.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(1102, 627);
this.tabPage1.Size = new System.Drawing.Size(1102, 634);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "tabPage1"; this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true; 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 // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -73,10 +98,11 @@ ...@@ -73,10 +98,11 @@
this.Controls.Add(this.tabPageList); this.Controls.Add(this.tabPageList);
this.Name = "FrmMain"; this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmMain"; this.Text = "包装料料仓";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
this.tabPageList.ResumeLayout(false); this.tabPageList.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -84,7 +110,10 @@ ...@@ -84,7 +110,10 @@
#endregion #endregion
private System.Windows.Forms.TabControl tabPageList; 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 tabPage1;
private System.Windows.Forms.TabPage tabPage2;
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.DeviceLibrary; using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -55,5 +56,43 @@ namespace OnlineStore.ACPackingStore ...@@ -55,5 +56,43 @@ namespace OnlineStore.ACPackingStore
tabPageList.Controls.Add(lineTabPage); 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()
{
}
} }
} }
...@@ -52,6 +52,7 @@ namespace OnlineStore.ACPackingStore ...@@ -52,6 +52,7 @@ namespace OnlineStore.ACPackingStore
this.Close(); this.Close();
return; return;
} }
this.Text = BoxBean.Name;
//txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString(); //txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString();
cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList); cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList);
cmbAxisList.DisplayMember = "Explain"; cmbAxisList.DisplayMember = "Explain";
......
...@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary
public AC_BOX_Bean(AC_BOX_Config config) public AC_BOX_Bean(AC_BOX_Config config)
{ {
Init(); Init();
baseConfig = config;
serverConnectTimer = new System.Timers.Timer(); serverConnectTimer = new System.Timers.Timer();
serverConnectTimer.Interval = 1000; serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true; serverConnectTimer.AutoReset = true;
...@@ -129,10 +130,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,10 +130,10 @@ namespace OnlineStore.DeviceLibrary
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo());
moveAxisList.Add(Config.Comp_Axis); moveAxisList.Add(Config.Comp_Axis);
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
} }
/// <summary> /// <summary>
......
...@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary
private bool canStart = false; private bool canStart = false;
public PackingStoreBean(Store_Config lineConfig, Dictionary<int, AC_BOX_Config> configList) 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>(); BoxMap = new Dictionary<int, AC_BOX_Bean>();
if (lineConfig.IOSingle_TimerOut <= 0) if (lineConfig.IOSingle_TimerOut <= 0)
{ {
...@@ -70,8 +71,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -70,8 +71,8 @@ namespace OnlineStore.DeviceLibrary
CodeManager.LoadConfig(); CodeManager.LoadConfig();
Task.Factory.StartNew(delegate 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.Airpressure_Check, IOValue(IO_Type.Airpressure_Check));
addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN)); addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN));
addLastDI(IO_Type.Reset_BTN, IOValue(IO_Type.Reset_BTN)); addLastDI(IO_Type.Reset_BTN, IOValue(IO_Type.Reset_BTN));
......
...@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary
{ {
string nameStr = i.ToString().PadLeft(1, '0'); string nameStr = i.ToString().PadLeft(1, '0');
string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv"); 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); AllConfigMap.Add(i, moveConfig);
storeConfig.Add(i, moveConfig); storeConfig.Add(i, moveConfig);
} }
......
...@@ -134,23 +134,17 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -134,23 +134,17 @@ namespace OnlineStore.LoadCSVLibrary
return configList; 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; StoreConfig config = null;
config = new AC_BOX_Config(storeId, cid, storeType, linefilePath);
config = new Store_Config(storeId, cid, storeType, linefilePath);
return (AC_BOX_Config)LoadConfig(config); return (AC_BOX_Config)LoadConfig(config);
} }
public static Store_Config LoadLineConfig(int storeId, string cid, string storeType, string linefilePath) public static Store_Config LoadLineConfig(int storeId, string cid, string storeType, string linefilePath)
{ {
StoreConfig config = null; StoreConfig config = null;
config = new Store_Config(storeId, cid, storeType, linefilePath); config = new Store_Config(storeId, cid, storeType, linefilePath);
return (Store_Config)LoadConfig(config); return (Store_Config)LoadConfig(config);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!