Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6aef2192
由
LN
编写于
2019-11-01 17:24:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ac73409c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
98 行增加
和
33 行删除
source/ACPackingStore/FrmMain.Designer.cs
source/ACPackingStore/FrmMain.cs
source/ACPackingStore/FrmMain.resx
source/ACPackingStore/FrmStoreBox.Designer.cs
source/ACPackingStore/FrmStoreBox.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
source/ACPackingStore/FrmMain.Designer.cs
查看文件 @
6aef219
...
@@ -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
,
2
2
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
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
source/ACPackingStore/FrmMain.cs
查看文件 @
6aef219
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
()
{
}
}
}
}
}
source/ACPackingStore/FrmMain.resx
查看文件 @
6aef219
此文件的差异被折叠,
点击展开。
source/ACPackingStore/FrmStoreBox.Designer.cs
查看文件 @
6aef219
此文件的差异被折叠,
点击展开。
source/ACPackingStore/FrmStoreBox.cs
查看文件 @
6aef219
...
@@ -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"
;
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
6aef219
...
@@ -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>
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
6aef219
...
@@ -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
));
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
6aef219
...
@@ -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
.
Load
Store
Config
(
i
,
CID
+
"_"
+
i
,
"BOX"
,
config
);
AC_BOX_Config
moveConfig
=
CSVConfigReader
.
Load
Box
Config
(
i
,
CID
+
"_"
+
i
,
"BOX"
,
config
);
AllConfigMap
.
Add
(
i
,
moveConfig
);
AllConfigMap
.
Add
(
i
,
moveConfig
);
storeConfig
.
Add
(
i
,
moveConfig
);
storeConfig
.
Add
(
i
,
moveConfig
);
}
}
...
...
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
查看文件 @
6aef219
...
@@ -134,23 +134,17 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -134,23 +134,17 @@ namespace OnlineStore.LoadCSVLibrary
return
configList
;
return
configList
;
}
}
public
static
AC_BOX_Config
Load
Store
Config
(
int
storeId
,
string
cid
,
string
storeType
,
string
linefilePath
)
public
static
AC_BOX_Config
Load
Box
Config
(
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!
Cancel
请
注册
或
登录
后发表评论