Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 33b5a61c
由
刘韬
编写于
2022-07-21 17:22:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正库位配置不保存的问题
1 个父辈
32cfd620
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
37 行增加
和
15 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
TheMachine/Form1.cs
TheMachine/UC/ConfigControl.cs
TheMachine/UC/StorePosControl.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
33b5a61
...
@@ -103,8 +103,8 @@ namespace DeviceLibrary
...
@@ -103,8 +103,8 @@ namespace DeviceLibrary
{
{
operation
.
data
.
Add
(
"singleIn"
,
"false"
);
operation
.
data
.
Add
(
"singleIn"
,
"false"
);
}
}
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
,
printlog
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
1
5000
,
printlog
);
if
(
operation
.
seq
!=
resultOperation
.
seq
)
if
(
resultOperation
==
null
||
operation
.
seq
!=
resultOperation
.
seq
)
{
{
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
SendInStoreRequest
(
codelist
,
reel
,
printlog
);
SendInStoreRequest
(
codelist
,
reel
,
printlog
);
...
@@ -126,7 +126,7 @@ namespace DeviceLibrary
...
@@ -126,7 +126,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
return
true
;
return
true
;
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
1
5000
);
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
{
{
...
...
LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
查看文件 @
33b5a61
...
@@ -147,7 +147,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -147,7 +147,8 @@ namespace OnlineStore.LoadCSVLibrary
this
.
DOList
.
Add
(
con
.
ProName
,
io
);
this
.
DOList
.
Add
(
con
.
ProName
,
io
);
if
(!
AllDOlist
.
ContainsKey
(
con
.
ProName
))
if
(!
AllDOlist
.
ContainsKey
(
con
.
ProName
))
AllDOlist
.
Add
(
con
.
ProName
,
io
);
AllDOlist
.
Add
(
con
.
ProName
,
io
);
AllDOEleclist
.
Add
(
io
.
ElectricalDefinition
,
io
);
if
(!
AllDOEleclist
.
ContainsKey
(
io
.
ElectricalDefinition
))
AllDOEleclist
.
Add
(
io
.
ElectricalDefinition
,
io
);
}
}
if
(!
ioTypeList
.
Contains
(
con
.
ProName
))
if
(!
ioTypeList
.
Contains
(
con
.
ProName
))
{
{
...
...
TheMachine/Form1.cs
查看文件 @
33b5a61
...
@@ -310,16 +310,16 @@ namespace TheMachine
...
@@ -310,16 +310,16 @@ namespace TheMachine
}
}
void
SetMsg
(
List
<
Msg
>
msgs
)
void
SetMsg
(
List
<
Msg
>
msgs
)
{
{
//if (this.InvokeRequired)
//{
// this.Invoke((EventHandler)delegate {
// SetMsg(msgs);
// });
// return;
//}
this
.
SuspendLayout
();
this
.
SuspendLayout
();
listView1
.
Items
.
Clear
();
listView1
.
Items
.
Clear
();
msgs
.
Sort
((
a
,
b
)
=>
{
if
(
a
.
msgLevel
==
MsgLevel
.
alarm
)
return
-
1
;
if
(
a
.
msgLevel
!=
MsgLevel
.
info
)
return
-
1
;
return
0
;
});
foreach
(
Msg
msg
in
msgs
)
foreach
(
Msg
msg
in
msgs
)
{
{
if
(
string
.
IsNullOrEmpty
(
msg
.
msgtxt
)
||
msg
.
datetime
==
null
)
if
(
string
.
IsNullOrEmpty
(
msg
.
msgtxt
)
||
msg
.
datetime
==
null
)
...
...
TheMachine/UC/ConfigControl.cs
查看文件 @
33b5a61
...
@@ -285,6 +285,9 @@ namespace TheMachine
...
@@ -285,6 +285,9 @@ namespace TheMachine
}
}
}
}
CSVConfigReader
.
SaveConfig
(
Config
.
ConfigFilePath
,
Config
);
CSVConfigReader
.
SaveConfig
(
Config
.
ConfigFilePath
,
Config
);
Config
.
DIList
.
Clear
();
Config
.
DOList
.
Clear
();
Config
=
(
Robot_Config
)
CSVConfigReader
.
LoadConfig
(
Config
);
}
}
}
}
}
}
TheMachine/UC/StorePosControl.cs
查看文件 @
33b5a61
...
@@ -99,9 +99,6 @@ namespace TheMachine
...
@@ -99,9 +99,6 @@ namespace TheMachine
}
}
Button
button
=
new
Button
();
Button
button
=
new
Button
();
button
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
button
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
button
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
button
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
@@ -240,6 +237,27 @@ namespace TheMachine
...
@@ -240,6 +237,27 @@ namespace TheMachine
private
void
btnSavePos_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSavePos_Click
(
object
sender
,
EventArgs
e
)
{
{
for
(
int
i
=
0
;
i
<
tableLayoutPanel1
.
Controls
.
Count
;
i
++)
{
if
(
tableLayoutPanel1
.
Controls
[
i
].
GetType
().
Name
!=
"TextBox"
)
continue
;
TextBox
textBox
=
(
TextBox
)
tableLayoutPanel1
.
Controls
[
i
];
PropertyInfo
pi
=
_aCStorePosition
.
GetType
().
GetProperty
(
textBox
.
Name
);
if
(
pi
!=
null
)
{
//var cc = Config.configList.Find(new Predicate<ConfigBase>((c) => { return c.ProName == textBox.Name; }));
//if (cc != null)
// cc.ProValue = textBox.Text;
if
(
pi
.
PropertyType
.
Name
==
"Int32"
)
pi
.
SetValue
(
_aCStorePosition
,
int
.
Parse
(
textBox
.
Text
));
else
if
(
pi
.
PropertyType
.
Name
==
"Double"
)
pi
.
SetValue
(
_aCStorePosition
,
double
.
Parse
(
textBox
.
Text
));
else
pi
.
SetValue
(
_aCStorePosition
,
textBox
.
Text
);
}
}
var
positionConfigFile
=
Path
.
Combine
(
Application
.
StartupPath
,
"StoreConfig\\linePositions.csv"
);
var
positionConfigFile
=
Path
.
Combine
(
Application
.
StartupPath
,
"StoreConfig\\linePositions.csv"
);
bool
result
=
CSVPositionReader
<
ACStorePosition
>.
SavePostion
(
positionConfigFile
,
_aCStorePosition
);
bool
result
=
CSVPositionReader
<
ACStorePosition
>.
SavePostion
(
positionConfigFile
,
_aCStorePosition
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论