Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
Camera
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 219495b4
由
张东亮
编写于
2020-08-12 09:15:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
0811
1 个父辈
ff22209f
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
94 行增加
和
58 行删除
.vs/AGVControl/v16/.suo
AGVControl/BLL/Control.cs
AGVControl/BLL/MiR_API.cs
AGVControl/Common.cs
AGVControl/FrmMain.Designer.cs
AGVControl/FrmMain.cs
AGVControl/FrmMain.resx
AGVControl/bin/Debug/AGVControl.exe
AGVControl/bin/Debug/AGVControl.pdb
AGVControl/obj/Debug/AGVControl.csproj.GenerateResource.cache
AGVControl/obj/Debug/AGVControl.exe
AGVControl/obj/Debug/AGVControl.pdb
AGVControl/obj/Debug/DesignTimeResolveAssemblyReferences.cache
AGVControl/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
AGVControl/obj/Debug/Interop.IWshRuntimeLibrary.dll
.vs/AGVControl/v16/.suo
查看文件 @
219495b
此文件类型无法预览
AGVControl/BLL/Control.cs
查看文件 @
219495b
...
@@ -300,7 +300,7 @@ namespace BLL
...
@@ -300,7 +300,7 @@ namespace BLL
if
(
change
)
if
(
change
)
AgvChanged
?.
Invoke
(
i
);
AgvChanged
?.
Invoke
(
i
);
Common
.
log
.
OutInfo
(
log
);
//
Common.log.OutInfo(log);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -1397,7 +1397,7 @@ namespace BLL
...
@@ -1397,7 +1397,7 @@ namespace BLL
else
if
(
agv
.
RFID
[
0
]
==
'A'
)
//包装料架
else
if
(
agv
.
RFID
[
0
]
==
'A'
)
//包装料架
{
{
int
idx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
agv
.
Name
));
int
idx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
agv
.
Name
));
rtn
=
Find
AreaBOutStore
(
idx
,
out
ResultType
resultType
)
;
rtn
=
Find
NeedEnterWithMark
(
agv
);
;
if
(
rtn
)
if
(
rtn
)
{
{
Common
.
log
.
OutInfo
(
agv
.
Name
+
" A7出料架["
+
agv
.
RFID
+
"],去B区"
);
Common
.
log
.
OutInfo
(
agv
.
Name
+
" A7出料架["
+
agv
.
RFID
+
"],去B区"
);
...
@@ -1447,29 +1447,29 @@ namespace BLL
...
@@ -1447,29 +1447,29 @@ namespace BLL
else
else
{
{
int
idx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
agv
.
Name
));
int
idx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
agv
.
Name
));
rtn
=
FindAreaBOutStore
(
idx
,
out
ResultType
resultTyp
e
);
rtn
=
FindAreaBOutStore
(
idx
,
out
ResultType
resultType
,
fals
e
);
if
(!
rtn
&&
resultType
.
Equals
(
ResultType
.
NoEmptyShelf
))
if
(!
rtn
&&
resultType
.
Equals
(
ResultType
.
NoEmptyShelf
))
{
{
rtn
=
FindNeedEnter
(
agv
,
"A8"
);
rtn
=
FindNeedEnter
(
agv
,
"A8"
);
if
(
rtn
)
if
(
rtn
)
{
{
agv
.
NextMission
=
""
;
agv
.
NextMission
=
""
;
Common
.
log
.
OutInfo
(
agv
.
Name
+
" A7出料串["
+
agv
.
RFID
+
"],C7不需要且B区有出库任务,去A8"
);
Common
.
log
.
OutInfo
(
agv
.
Name
+
" A7出料串["
+
agv
.
RFID
+
"],C7不需要且B区有出库任务,
将料串送
去A8"
);
//Common.server.EnterShelf(agv);
//Common.server.EnterShelf(agv);
}
}
else
else
{
{
ClientNode
a8Node
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
"A8"
));
ClientNode
a8Node
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
"A8"
));
log
=
string
.
Format
(
"{0} A7出料串[{1}],C7不需要,B区有出库任务。{2}已满,不可将A7料串放到{2}[ClientAction={3}]。需要人工干预"
,
agv
.
Name
,
agv
.
RFID
,
a8Node
.
Name
,
a8Node
.
Action
.
ToString
());
log
=
string
.
Format
(
"{0} A7出料串[{1}],C7不需要,B区有出库任务。{2}已满,不可将A7料串放到{2}[ClientAction={3}]。需要人工干预"
,
agv
.
Name
,
agv
.
RFID
,
a8Node
.
Name
,
a8Node
.
Action
.
ToString
());
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutTextBox
(
log
);
Common
.
log
.
OutTextBox
(
log
);
//agv.NextMission = "C7";
//agv.NextMission = "C7";
//Common.mir.Add_Mission_Fleet(agv, "Common.agvMission["MoveStandbyTemp"]");
//Common.mir.Add_Mission_Fleet(agv, "Common.agvMission["MoveStandbyTemp"]");
}
}
}
}
else
if
(!
rtn
)
else
if
(!
rtn
)
{
{
if
(!
agv
.
StandbyTemp
)
if
(!
agv
.
StandbyTemp
)
{
{
agv
.
StandbyTemp
=
true
;
agv
.
StandbyTemp
=
true
;
log
=
agv
.
Name
+
" A7出料串["
+
agv
.
RFID
+
"] C7暂时没有位置"
;
log
=
agv
.
Name
+
" A7出料串["
+
agv
.
RFID
+
"] C7暂时没有位置"
;
...
@@ -2003,7 +2003,7 @@ namespace BLL
...
@@ -2003,7 +2003,7 @@ namespace BLL
agv
.
StandbyTemp
=
true
;
agv
.
StandbyTemp
=
true
;
agv
.
NextMission
=
"A2"
;
agv
.
NextMission
=
"A2"
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
if
(
rtn
)
if
(
rtn
)
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 在C2/4/6进入空料串,C7,D1,A2不需要料串,回待机位"
);
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 在C2/4/6进入空料串,C7,D1,A2不需要料串,回待机位"
);
return
false
;
return
false
;
}
}
...
@@ -2028,7 +2028,7 @@ namespace BLL
...
@@ -2028,7 +2028,7 @@ namespace BLL
if
(
rtn
)
if
(
rtn
)
{
{
agv
.
NextMission
=
""
;
agv
.
NextMission
=
""
;
Common
.
log
.
OutInfo
(
"C8出满料串到A8 [Mark="
+
agv
.
Mark
+
"]"
);
Common
.
log
.
OutInfo
(
"C8出满料串到A8 [Mark="
+
agv
.
Mark
+
"]"
);
}
}
else
else
{
{
...
@@ -2037,7 +2037,7 @@ namespace BLL
...
@@ -2037,7 +2037,7 @@ namespace BLL
agv
.
StandbyTemp
=
true
;
agv
.
StandbyTemp
=
true
;
agv
.
NextMission
=
name
;
agv
.
NextMission
=
name
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
if
(
rtn
)
if
(
rtn
)
Common
.
log
.
OutInfo
(
"C8出满料串 [Mark="
+
agv
.
Mark
+
"],A8暂时无法进入,先回待机位"
);
Common
.
log
.
OutInfo
(
"C8出满料串 [Mark="
+
agv
.
Mark
+
"],A8暂时无法进入,先回待机位"
);
}
}
...
@@ -2058,7 +2058,7 @@ namespace BLL
...
@@ -2058,7 +2058,7 @@ namespace BLL
//添加包装料仓优先
//添加包装料仓优先
int
agvIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
==
agv
.
Name
);
int
agvIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
Name
==
agv
.
Name
);
rtn
=
FindAreaBOutStoreAndNeedLeave
(
agvIdx
);
rtn
=
FindAreaBOutStoreAndNeedLeave
(
agvIdx
);
if
(
rtn
)
if
(
rtn
)
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 在D1送完料串,检测到B区域出库/出料架,开始执行"
);
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 在D1送完料串,检测到B区域出库/出料架,开始执行"
);
if
(!
rtn
)
if
(!
rtn
)
...
@@ -2252,7 +2252,7 @@ namespace BLL
...
@@ -2252,7 +2252,7 @@ namespace BLL
/// <returns></returns>
/// <returns></returns>
private
bool
FindAreaBOutStoreAndNeedLeave
(
int
agvIdx
)
private
bool
FindAreaBOutStoreAndNeedLeave
(
int
agvIdx
)
{
{
if
(
FindAreaBOutStore
(
agvIdx
,
out
ResultType
resultType
))
if
(
FindAreaBOutStore
(
agvIdx
,
out
ResultType
resultType
))
return
true
;
return
true
;
if
(
FindAreaBNeedLeave
(
agvIdx
))
if
(
FindAreaBNeedLeave
(
agvIdx
))
...
@@ -2495,8 +2495,9 @@ namespace BLL
...
@@ -2495,8 +2495,9 @@ namespace BLL
/// B区域出库
/// B区域出库
/// </summary>
/// </summary>
/// <param name="agvIdx"></param>
/// <param name="agvIdx"></param>
/// /// <param name="IsMove">只获取任务状态,不发任务给小车(有空架子任务是否直接移动)</param>
/// <returns>true:有出库任务,并拉空架子;false:无出库任务/有出库但无空架子</returns>
/// <returns>true:有出库任务,并拉空架子;false:无出库任务/有出库但无空架子</returns>
private
bool
FindAreaBOutStore
(
int
agvIdx
,
out
ResultType
resultTyp
e
)
private
bool
FindAreaBOutStore
(
int
agvIdx
,
out
ResultType
resultType
,
bool
IsMove
=
tru
e
)
{
{
string
log
;
string
log
;
int
nodeIdx
=
-
1
;
int
nodeIdx
=
-
1
;
...
@@ -2530,7 +2531,8 @@ namespace BLL
...
@@ -2530,7 +2531,8 @@ namespace BLL
agv
.
Place
=
Common
.
nodeInfo
[
n
].
Name
;
agv
.
Place
=
Common
.
nodeInfo
[
n
].
Name
;
agv
.
Mark
=
Common
.
nodeInfo
[
nodeIdx
].
Mark
;
agv
.
Mark
=
Common
.
nodeInfo
[
nodeIdx
].
Mark
;
//agv.CloseDoor = false;
//agv.CloseDoor = false;
if
(!
IsMove
)
return
true
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Move"
+
agv
.
Place
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Move"
+
agv
.
Place
]);
if
(
rtn
)
if
(
rtn
)
{
{
...
@@ -2625,7 +2627,8 @@ namespace BLL
...
@@ -2625,7 +2627,8 @@ namespace BLL
agv
.
Place
=
Common
.
nodeInfo
[
n
].
Name
;
agv
.
Place
=
Common
.
nodeInfo
[
n
].
Name
;
agv
.
Mark
=
Common
.
nodeInfo
[
nodeIdx
].
Mark
;
agv
.
Mark
=
Common
.
nodeInfo
[
nodeIdx
].
Mark
;
//agv.CloseDoor = false;
//agv.CloseDoor = false;
if
(!
IsMove
)
return
true
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Move"
+
agv
.
Place
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Move"
+
agv
.
Place
]);
if
(
rtn
)
if
(
rtn
)
{
{
...
@@ -2694,7 +2697,7 @@ namespace BLL
...
@@ -2694,7 +2697,7 @@ namespace BLL
//测试,临时的
//测试,临时的
for
(
int
i
=
0
;
i
<
node
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
node
.
Count
;
i
++)
{
{
Common
.
log
.
OutString
(
agv
.
Name
+
" BAreaNeedLeave "
+
node
[
i
]
+
" [Name="
+
Common
.
nodeInfo
[
node
[
i
]].
Name
+
"] [Mark="
+
Common
.
nodeInfo
[
node
[
i
]].
Mark
+
"]"
);
Common
.
log
.
OutString
(
agv
.
Name
+
" BAreaNeedLeave "
+
node
[
i
]
+
" [Name="
+
Common
.
nodeInfo
[
node
[
i
]].
Name
+
"] [Mark="
+
Common
.
nodeInfo
[
node
[
i
]].
Mark
+
"]"
);
}
}
if
(
node
.
Count
==
0
)
if
(
node
.
Count
==
0
)
...
@@ -2760,7 +2763,12 @@ namespace BLL
...
@@ -2760,7 +2763,12 @@ namespace BLL
return
false
;
return
false
;
}
}
}
}
/// <summary>
/// 根据mark查找需要进入料架的节点
/// </summary>
/// <param name="agv"></param>
/// <param name="BAreaLeaveCheck"></param>
/// <returns></returns>
private
bool
FindNeedEnterWithMark
(
Agv_Info
agv
,
bool
BAreaLeaveCheck
=
false
)
private
bool
FindNeedEnterWithMark
(
Agv_Info
agv
,
bool
BAreaLeaveCheck
=
false
)
{
{
//寻找下一个任务点
//寻找下一个任务点
...
@@ -2776,10 +2784,10 @@ namespace BLL
...
@@ -2776,10 +2784,10 @@ namespace BLL
{
{
//在A4出料架后,B区域暂时找不到出库料仓,先回待机位,如果mark消失,则将料架送回
//在A4出料架后,B区域暂时找不到出库料仓,先回待机位,如果mark消失,则将料架送回
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Mark
==
agv
.
Mark
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Mark
==
agv
.
Mark
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
if
(
nodeIdx
==
-
1
)
if
(
nodeIdx
==
-
1
)
{
{
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Mark
==
agv
.
Mark
);
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Mark
==
agv
.
Mark
);
if
(
nodeIdx
==
-
1
)
//当前mark任务已结束
if
(
nodeIdx
==
-
1
)
//当前mark任务已结束
{
{
}
}
...
@@ -2801,7 +2809,7 @@ namespace BLL
...
@@ -2801,7 +2809,7 @@ namespace BLL
if
(
item
.
AgvName
.
Equals
(
agv
.
Name
))
if
(
item
.
AgvName
.
Equals
(
agv
.
Name
))
item
.
AgvName
=
""
;
item
.
AgvName
=
""
;
}
}
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] 出库任务未完成,[taskCount="
+
taskCount
.
ToString
()
+
"] 移动到
StandBy
"
;
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] 出库任务未完成,[taskCount="
+
taskCount
.
ToString
()
+
"] 移动到
MoveStandbyTemp
"
;
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
}
}
...
@@ -2855,10 +2863,12 @@ namespace BLL
...
@@ -2855,10 +2863,12 @@ namespace BLL
{
{
Common
.
nodeInfo
[
idx
].
AgvName
=
""
;
Common
.
nodeInfo
[
idx
].
AgvName
=
""
;
Common
.
server
.
NodeRefresh
(
idx
);
Common
.
server
.
NodeRefresh
(
idx
);
log
=
"FindNeedLeave(): "
+
agv
.
Name
+
" 清理当前任务点AgvName [Place="
+
agv
.
Place
+
"]"
;
Common
.
log
.
OutInfo
(
log
);
}
}
else
else
{
{
log
=
"FindNeedLeave(): "
+
agv
.
Name
+
" 清理
AgvName,没有找到 "
+
agv
.
Name
;
log
=
"FindNeedLeave(): "
+
agv
.
Name
+
" 清理
当前任务点AgvName失败(未找到) [Place="
+
agv
.
Place
+
"]"
;
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
}
}
...
@@ -2962,10 +2972,12 @@ namespace BLL
...
@@ -2962,10 +2972,12 @@ namespace BLL
{
{
Common
.
nodeInfo
[
idx
].
AgvName
=
""
;
Common
.
nodeInfo
[
idx
].
AgvName
=
""
;
Common
.
server
.
NodeRefresh
(
idx
);
Common
.
server
.
NodeRefresh
(
idx
);
log
=
"MoveStandby(): "
+
agv
.
Name
+
" 清理当前任务点AgvName [Place="
+
agv
.
Place
+
"]"
;
Common
.
log
.
OutInfo
(
log
);
}
}
else
else
{
{
log
=
"
清理AgvName,没有找到 "
+
agv
.
Name
;
log
=
"
MoveStandby(): "
+
agv
.
Name
+
" 清理当前任务点AgvName失败(未找到) [Place="
+
agv
.
Place
+
"]"
;
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
}
}
...
...
AGVControl/BLL/MiR_API.cs
查看文件 @
219495b
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Web.Script.Serialization
;
using
System.Web.Script.Serialization
;
using
AGVControl
;
using
RestSharp
;
using
RestSharp
;
namespace
BLL
namespace
BLL
...
@@ -190,6 +192,10 @@ namespace BLL
...
@@ -190,6 +192,10 @@ namespace BLL
{
{
//防止上一个任务已执行但返回失败时,删除任务
//防止上一个任务已执行但返回失败时,删除任务
Del_Mission
(
info
);
Del_Mission
(
info
);
var
key
=
Common
.
agvMission
.
Where
(
qq
=>
qq
.
Value
==
mission_id
).
Select
(
qq
=>
qq
.
Key
);
info
.
CurTaskName
=
key
.
ToList
()[
0
];
Common
.
log
.
OutInfo
(
string
.
Format
(
"{0} Add_Mission [{1}]"
,
info
.
Name
,
key
.
ToList
()[
0
]));
string
url
=
"http://"
+
info
.
IP
+
"/api/v2.0.0/mission_queue"
;
string
url
=
"http://"
+
info
.
IP
+
"/api/v2.0.0/mission_queue"
;
string
body
=
"{\"mission_id\":\""
+
mission_id
+
"\"}"
;
string
body
=
"{\"mission_id\":\""
+
mission_id
+
"\"}"
;
...
@@ -227,6 +233,9 @@ namespace BLL
...
@@ -227,6 +233,9 @@ namespace BLL
{
{
//防止上一个任务已执行但返回失败时,删除任务
//防止上一个任务已执行但返回失败时,删除任务
Del_Mission
(
info
);
Del_Mission
(
info
);
var
key
=
Common
.
agvMission
.
Where
(
qq
=>
qq
.
Value
==
mission_id
).
Select
(
qq
=>
qq
.
Key
);
info
.
CurTaskName
=
key
.
ToList
()[
0
];
Common
.
log
.
OutInfo
(
string
.
Format
(
"{0} Add_Mission_Fleet [{1}]"
,
info
.
Name
,
key
.
ToList
()[
0
]));
string
ip
=
AGVControl
.
Common
.
appConfig
.
AppSettings
.
Settings
[
"FLEET"
].
Value
;
string
ip
=
AGVControl
.
Common
.
appConfig
.
AppSettings
.
Settings
[
"FLEET"
].
Value
;
string
url
=
"http://"
+
ip
+
"/api/v2.0.0/mission_scheduler"
;
string
url
=
"http://"
+
ip
+
"/api/v2.0.0/mission_scheduler"
;
...
...
AGVControl/Common.cs
查看文件 @
219495b
...
@@ -350,6 +350,7 @@ namespace AGVControl
...
@@ -350,6 +350,7 @@ namespace AGVControl
/// </summary>
/// </summary>
public
bool
IsClearRunInfo
=
false
;
public
bool
IsClearRunInfo
=
false
;
public
string
CurTaskName
{
get
;
set
;
}
public
struct
DockingStru
public
struct
DockingStru
{
{
public
DateTime
startTime
;
public
DateTime
startTime
;
...
@@ -382,7 +383,7 @@ namespace AGVControl
...
@@ -382,7 +383,7 @@ namespace AGVControl
//AGV名称,IP,AGV状态,任务状态,地点,后续任务,在线,电量,调用,清除缓存
//AGV名称,IP,AGV状态,任务状态,地点,后续任务,在线,电量,调用,清除缓存
List
<
string
>
vs
=
new
List
<
string
>();
List
<
string
>
vs
=
new
List
<
string
>();
vs
.
Add
(
Name
);
vs
.
Add
(
Name
);
vs
.
Add
(
IP
);
//
vs.Add(IP);
if
(
IsCon
)
if
(
IsCon
)
{
{
vs
.
Add
(
StateText
);
vs
.
Add
(
StateText
);
...
@@ -392,6 +393,8 @@ namespace AGVControl
...
@@ -392,6 +393,8 @@ namespace AGVControl
vs
.
Add
(
Place
);
vs
.
Add
(
Place
);
vs
.
Add
(
NextMission
);
vs
.
Add
(
NextMission
);
}
}
else
vs
.
AddRange
(
new
string
[]{
""
,
""
,
""
,
""
,
""
,
""
});
vs
.
Add
(
IsCon
.
ToString
());
vs
.
Add
(
IsCon
.
ToString
());
vs
.
Add
(
Battery
+
"%"
);
vs
.
Add
(
Battery
+
"%"
);
vs
.
Add
(
IsUse
.
ToString
());
vs
.
Add
(
IsUse
.
ToString
());
...
@@ -404,9 +407,10 @@ namespace AGVControl
...
@@ -404,9 +407,10 @@ namespace AGVControl
public
string
[]
ToMission
()
public
string
[]
ToMission
()
{
{
//AGV名称,IP,AGV状态,任务状态,地点,后续任务,在线,电量,调用,清除缓存
//AGV名称,IP,AGV状态,任务状态,地点,后续任务,在线,电量,调用,清除缓存
string
[]
s
=
new
string
[
2
];
string
[]
s
=
new
string
[
3
];
s
[
0
]
=
Name
;
s
[
0
]
=
Name
;
s
[
1
]
=
Mission_text
;
s
[
1
]
=
CurTaskName
;
s
[
2
]
=
Mission_text
;
return
s
;
return
s
;
}
}
...
...
AGVControl/FrmMain.Designer.cs
查看文件 @
219495b
...
@@ -74,9 +74,9 @@
...
@@ -74,9 +74,9 @@
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
dgvMission
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
dgvMission
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Column20
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column20
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column24
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column21
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column21
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column1
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column1
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column2
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column3
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column3
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column14
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column14
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column22
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column22
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
...
@@ -108,7 +108,6 @@
...
@@ -108,7 +108,6 @@
this
.
DgvAgv
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
DgvAgv
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
DgvAgv
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
DgvAgv
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
Column1
,
this
.
Column1
,
this
.
Column2
,
this
.
Column3
,
this
.
Column3
,
this
.
Column14
,
this
.
Column14
,
this
.
Column22
,
this
.
Column22
,
...
@@ -125,7 +124,7 @@
...
@@ -125,7 +124,7 @@
this
.
DgvAgv
.
RowHeadersVisible
=
false
;
this
.
DgvAgv
.
RowHeadersVisible
=
false
;
this
.
DgvAgv
.
RowHeadersWidth
=
51
;
this
.
DgvAgv
.
RowHeadersWidth
=
51
;
this
.
DgvAgv
.
RowTemplate
.
Height
=
23
;
this
.
DgvAgv
.
RowTemplate
.
Height
=
23
;
this
.
DgvAgv
.
Size
=
new
System
.
Drawing
.
Size
(
9
70
,
126
);
this
.
DgvAgv
.
Size
=
new
System
.
Drawing
.
Size
(
9
88
,
126
);
this
.
DgvAgv
.
TabIndex
=
0
;
this
.
DgvAgv
.
TabIndex
=
0
;
this
.
DgvAgv
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
DgvAgv_CellClick
);
this
.
DgvAgv
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
DgvAgv_CellClick
);
//
//
...
@@ -152,9 +151,10 @@
...
@@ -152,9 +151,10 @@
this
.
DgvNode
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
DgvNode
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
DgvNode
.
Name
=
"DgvNode"
;
this
.
DgvNode
.
Name
=
"DgvNode"
;
this
.
DgvNode
.
ReadOnly
=
true
;
this
.
DgvNode
.
ReadOnly
=
true
;
this
.
DgvNode
.
RowHeadersVisible
=
false
;
this
.
DgvNode
.
RowHeadersWidth
=
50
;
this
.
DgvNode
.
RowHeadersWidth
=
50
;
this
.
DgvNode
.
RowTemplate
.
Height
=
23
;
this
.
DgvNode
.
RowTemplate
.
Height
=
23
;
this
.
DgvNode
.
Size
=
new
System
.
Drawing
.
Size
(
9
50
,
486
);
this
.
DgvNode
.
Size
=
new
System
.
Drawing
.
Size
(
9
68
,
486
);
this
.
DgvNode
.
TabIndex
=
1
;
this
.
DgvNode
.
TabIndex
=
1
;
this
.
DgvNode
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
DgvNode_CellClick
);
this
.
DgvNode
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
DgvNode_CellClick
);
//
//
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
this
.
TxtLog
.
Multiline
=
true
;
this
.
TxtLog
.
Multiline
=
true
;
this
.
TxtLog
.
Name
=
"TxtLog"
;
this
.
TxtLog
.
Name
=
"TxtLog"
;
this
.
TxtLog
.
ScrollBars
=
System
.
Windows
.
Forms
.
ScrollBars
.
Both
;
this
.
TxtLog
.
ScrollBars
=
System
.
Windows
.
Forms
.
ScrollBars
.
Both
;
this
.
TxtLog
.
Size
=
new
System
.
Drawing
.
Size
(
3
29
,
486
);
this
.
TxtLog
.
Size
=
new
System
.
Drawing
.
Size
(
3
35
,
486
);
this
.
TxtLog
.
TabIndex
=
4
;
this
.
TxtLog
.
TabIndex
=
4
;
//
//
// tabControl1
// tabControl1
...
@@ -260,7 +260,7 @@
...
@@ -260,7 +260,7 @@
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
144
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
144
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
9
70
,
527
);
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
9
88
,
527
);
this
.
tabControl1
.
TabIndex
=
5
;
this
.
tabControl1
.
TabIndex
=
5
;
//
//
// tabPage1
// tabPage1
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
9
62
,
498
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
9
80
,
498
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
"节点"
;
this
.
tabPage1
.
Text
=
"节点"
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
@@ -305,7 +305,7 @@
...
@@ -305,7 +305,7 @@
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage3
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
9
62
,
498
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
9
80
,
498
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
"任务"
;
this
.
tabPage3
.
Text
=
"任务"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
...
@@ -569,7 +569,7 @@
...
@@ -569,7 +569,7 @@
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
9
62
,
498
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
9
80
,
498
);
this
.
tabPage2
.
TabIndex
=
3
;
this
.
tabPage2
.
TabIndex
=
3
;
this
.
tabPage2
.
Text
=
"日志"
;
this
.
tabPage2
.
Text
=
"日志"
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
...
@@ -586,7 +586,7 @@
...
@@ -586,7 +586,7 @@
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
9
56
,
492
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
9
74
,
492
);
this
.
tableLayoutPanel1
.
TabIndex
=
5
;
this
.
tableLayoutPanel1
.
TabIndex
=
5
;
//
//
// dgvMission
// dgvMission
...
@@ -595,14 +595,15 @@
...
@@ -595,14 +595,15 @@
this
.
dgvMission
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
dgvMission
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
dgvMission
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
dgvMission
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
Column20
,
this
.
Column20
,
this
.
Column24
,
this
.
Column21
});
this
.
Column21
});
this
.
dgvMission
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
dgvMission
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
dgvMission
.
Location
=
new
System
.
Drawing
.
Point
(
3
38
,
3
);
this
.
dgvMission
.
Location
=
new
System
.
Drawing
.
Point
(
3
44
,
3
);
this
.
dgvMission
.
Name
=
"dgvMission"
;
this
.
dgvMission
.
Name
=
"dgvMission"
;
this
.
dgvMission
.
RowHeadersVisible
=
false
;
this
.
dgvMission
.
RowHeadersVisible
=
false
;
this
.
dgvMission
.
RowHeadersWidth
=
51
;
this
.
dgvMission
.
RowHeadersWidth
=
51
;
this
.
dgvMission
.
RowTemplate
.
Height
=
27
;
this
.
dgvMission
.
RowTemplate
.
Height
=
27
;
this
.
dgvMission
.
Size
=
new
System
.
Drawing
.
Size
(
6
15
,
186
);
this
.
dgvMission
.
Size
=
new
System
.
Drawing
.
Size
(
6
27
,
186
);
this
.
dgvMission
.
TabIndex
=
5
;
this
.
dgvMission
.
TabIndex
=
5
;
//
//
// Column20
// Column20
...
@@ -612,9 +613,16 @@
...
@@ -612,9 +613,16 @@
this
.
Column20
.
Name
=
"Column20"
;
this
.
Column20
.
Name
=
"Column20"
;
this
.
Column20
.
Width
=
125
;
this
.
Column20
.
Width
=
125
;
//
//
// Column24
//
this
.
Column24
.
HeaderText
=
"任务名称"
;
this
.
Column24
.
MinimumWidth
=
6
;
this
.
Column24
.
Name
=
"Column24"
;
this
.
Column24
.
Width
=
125
;
//
// Column21
// Column21
//
//
this
.
Column21
.
HeaderText
=
"
任务
"
;
this
.
Column21
.
HeaderText
=
"
执行内容
"
;
this
.
Column21
.
MinimumWidth
=
6
;
this
.
Column21
.
MinimumWidth
=
6
;
this
.
Column21
.
Name
=
"Column21"
;
this
.
Column21
.
Name
=
"Column21"
;
this
.
Column21
.
Width
=
450
;
this
.
Column21
.
Width
=
450
;
...
@@ -628,15 +636,6 @@
...
@@ -628,15 +636,6 @@
this
.
Column1
.
SortMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnSortMode
.
NotSortable
;
this
.
Column1
.
SortMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnSortMode
.
NotSortable
;
this
.
Column1
.
Width
=
80
;
this
.
Column1
.
Width
=
80
;
//
//
// Column2
//
this
.
Column2
.
HeaderText
=
"IP"
;
this
.
Column2
.
MinimumWidth
=
6
;
this
.
Column2
.
Name
=
"Column2"
;
this
.
Column2
.
ReadOnly
=
true
;
this
.
Column2
.
SortMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnSortMode
.
NotSortable
;
this
.
Column2
.
Width
=
125
;
//
// Column3
// Column3
//
//
this
.
Column3
.
HeaderText
=
"AGV状态"
;
this
.
Column3
.
HeaderText
=
"AGV状态"
;
...
@@ -725,7 +724,7 @@
...
@@ -725,7 +724,7 @@
// FrmMain
// FrmMain
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
994
,
683
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1012
,
683
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
DgvAgv
);
this
.
Controls
.
Add
(
this
.
DgvAgv
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
@@ -794,9 +793,9 @@
...
@@ -794,9 +793,9 @@
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
DataGridView
dgvMission
;
private
System
.
Windows
.
Forms
.
DataGridView
dgvMission
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column20
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column20
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column24
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column21
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column21
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column2
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column3
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column3
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column14
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column14
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column22
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column22
;
...
...
AGVControl/FrmMain.cs
查看文件 @
219495b
...
@@ -31,6 +31,8 @@ namespace AGVControl
...
@@ -31,6 +31,8 @@ namespace AGVControl
n
=
DgvAgv
.
Rows
.
Add
(
Common
.
agvInfo
[
i
].
ToRow
());
n
=
DgvAgv
.
Rows
.
Add
(
Common
.
agvInfo
[
i
].
ToRow
());
dgvMission
.
Rows
.
Add
(
Common
.
agvInfo
[
i
].
ToMission
());
dgvMission
.
Rows
.
Add
(
Common
.
agvInfo
[
i
].
ToMission
());
DgvAgv
.
Rows
[
n
].
HeaderCell
.
Value
=
(
n
+
1
).
ToString
();
DgvAgv
.
Rows
[
n
].
HeaderCell
.
Value
=
(
n
+
1
).
ToString
();
if
(
i
%
2
==
0
)
DgvAgv
.
Rows
[
n
].
DefaultCellStyle
.
BackColor
=
Color
.
LightBlue
;
if
(!
Common
.
agvInfo
[
i
].
IsCon
)
if
(!
Common
.
agvInfo
[
i
].
IsCon
)
DgvAgv
.
Rows
[
n
].
DefaultCellStyle
.
ForeColor
=
Color
.
Red
;
DgvAgv
.
Rows
[
n
].
DefaultCellStyle
.
ForeColor
=
Color
.
Red
;
}
}
...
@@ -39,6 +41,8 @@ namespace AGVControl
...
@@ -39,6 +41,8 @@ namespace AGVControl
{
{
n
=
DgvNode
.
Rows
.
Add
(
Common
.
nodeInfo
[
i
].
ToRow
());
n
=
DgvNode
.
Rows
.
Add
(
Common
.
nodeInfo
[
i
].
ToRow
());
DgvNode
.
Rows
[
n
].
HeaderCell
.
Value
=
(
n
+
1
).
ToString
();
DgvNode
.
Rows
[
n
].
HeaderCell
.
Value
=
(
n
+
1
).
ToString
();
if
(
i
%
2
==
0
)
DgvNode
.
Rows
[
n
].
DefaultCellStyle
.
BackColor
=
Color
.
LightBlue
;
if
(!
Common
.
nodeInfo
[
i
].
Online
)
if
(!
Common
.
nodeInfo
[
i
].
Online
)
DgvNode
.
Rows
[
n
].
DefaultCellStyle
.
ForeColor
=
Color
.
Red
;
DgvNode
.
Rows
[
n
].
DefaultCellStyle
.
ForeColor
=
Color
.
Red
;
}
}
...
@@ -46,8 +50,8 @@ namespace AGVControl
...
@@ -46,8 +50,8 @@ namespace AGVControl
LstAgvPlace
.
Items
.
Clear
();
LstAgvPlace
.
Items
.
Clear
();
foreach
(
var
item
in
Common
.
agvMission
.
Keys
.
ToArray
())
foreach
(
var
item
in
Common
.
agvMission
.
Keys
.
ToArray
())
{
{
if
(
item
.
Length
.
Equals
(
6
))
//
if (item.Length.Equals(6))
continue
;
//
continue;
LstAgvPlace
.
Items
.
Add
(
item
);
LstAgvPlace
.
Items
.
Add
(
item
);
}
}
...
@@ -143,17 +147,24 @@ namespace AGVControl
...
@@ -143,17 +147,24 @@ namespace AGVControl
private
void
DgvAgv_CellClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
private
void
DgvAgv_CellClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
{
{
if
(
e
.
RowIndex
==
-
1
)
return
;
if
(
e
.
RowIndex
==
-
1
)
return
;
if
(
e
.
ColumnIndex
==
10
)
if
(
e
.
ColumnIndex
==
9
)
{
{
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
!
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
;
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
!
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
;
DgvAgv
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
DgvAgv
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
Common
.
appConfig
.
AppSettings
.
Settings
[
Common
.
agvInfo
[
e
.
RowIndex
].
Name
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
Common
.
appConfig
.
AppSettings
.
Settings
[
Common
.
agvInfo
[
e
.
RowIndex
].
Name
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
Common
.
appConfig
.
Save
();
Common
.
appConfig
.
Save
();
}
}
else
if
(
e
.
ColumnIndex
==
1
1
)
else
if
(
e
.
ColumnIndex
==
1
0
)
{
{
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Mark
.
Length
>
1
)
{
if
(
MessageBox
.
Show
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
+
" 正在执行包装仓出库任务,确定清除当前任务?"
,
"警告"
,
MessageBoxButtons
.
YesNo
)
==
DialogResult
.
No
)
{
return
;
}
}
//清除小车缓存
//清除小车缓存
Common
.
log
.
OutInfo
(
string
.
Format
(
"手动清除缓存
,{0} {1}"
,
Common
.
agvInfo
[
e
.
RowIndex
].
Name
,
Common
.
agvInfo
[
e
.
RowIndex
].
Plac
e
));
Common
.
log
.
OutInfo
(
string
.
Format
(
"手动清除缓存
:{0}[CurTaskName={1}]"
,
Common
.
agvInfo
[
e
.
RowIndex
].
ToRow
(),
Common
.
agvInfo
[
e
.
RowIndex
].
CurTaskNam
e
));
string
place
=
Common
.
agvInfo
[
e
.
RowIndex
].
Place
;
string
place
=
Common
.
agvInfo
[
e
.
RowIndex
].
Place
;
Common
.
agvInfo
[
e
.
RowIndex
].
Mark
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
Mark
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
...
@@ -231,7 +242,8 @@ namespace AGVControl
...
@@ -231,7 +242,8 @@ namespace AGVControl
Common
.
agvInfo
[
idx
].
Place
=
""
;
Common
.
agvInfo
[
idx
].
Place
=
""
;
Common
.
agvInfo
[
idx
].
IsClearRunInfo
=
false
;
Common
.
agvInfo
[
idx
].
IsClearRunInfo
=
false
;
Common
.
log
.
OutInfo
(
"手动添加任务: "
+
LstAgvPlace
.
Text
);
Common
.
log
.
OutInfo
(
"手动添加任务: "
+
LstAgvPlace
.
Text
);
Common
.
log
.
OutTextBox
(
"手动添加任务: "
+
LstAgvPlace
.
Text
);
DgvAgv
.
Rows
[
idx
].
SetValues
(
Common
.
agvInfo
[
idx
].
ToRow
());
}
}
}
}
catch
(
Exception
ex
){
Common
.
log
.
OutInfo
(
"手动添加任务失败: "
+
ex
.
Message
+
ex
.
StackTrace
);
};
catch
(
Exception
ex
){
Common
.
log
.
OutInfo
(
"手动添加任务失败: "
+
ex
.
Message
+
ex
.
StackTrace
);
};
...
...
AGVControl/FrmMain.resx
查看文件 @
219495b
...
@@ -120,9 +120,6 @@
...
@@ -120,9 +120,6 @@
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</metadata>
...
@@ -183,6 +180,9 @@
...
@@ -183,6 +180,9 @@
<metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</metadata>
<metadata name="Column24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</metadata>
...
...
AGVControl/bin/Debug/AGVControl.exe
查看文件 @
219495b
此文件类型无法预览
AGVControl/bin/Debug/AGVControl.pdb
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/AGVControl.csproj.GenerateResource.cache
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/AGVControl.exe
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/AGVControl.pdb
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/DesignTimeResolveAssemblyReferences.cache
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
查看文件 @
219495b
此文件类型无法预览
AGVControl/obj/Debug/Interop.IWshRuntimeLibrary.dll
查看文件 @
219495b
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论