.agvmap 확장자제거하고 .json 으로 통일한 mapeditor 와 호환성 유지
This commit is contained in:
@@ -40,7 +40,6 @@ namespace Project.ViewForm
|
||||
|
||||
private void InitializeMapCanvas()
|
||||
{
|
||||
|
||||
// RfidMappings 제거 - MapNode에 통합됨
|
||||
|
||||
// 이벤트 연결
|
||||
@@ -63,7 +62,8 @@ namespace Project.ViewForm
|
||||
{
|
||||
if (e.Button != MouseButtons.Right) return;
|
||||
if (node == null) return;
|
||||
if ((node is MapNode mapnode) == false) return;
|
||||
var mapnode = node as MapNode;
|
||||
if (mapnode == null) return;
|
||||
|
||||
// 도킹 가능한 노드인지 또는 작업 노드인지 확인
|
||||
if (mapnode.isDockingNode == false) return;
|
||||
@@ -159,12 +159,12 @@ namespace Project.ViewForm
|
||||
|
||||
|
||||
//맵파일로딩
|
||||
if (PUB.setting.LastMapFile.isEmpty()) PUB.setting.LastMapFile = System.IO.Path.Combine(mapPath.FullName, "default.agvmap");
|
||||
if (PUB.setting.LastMapFile.isEmpty()) PUB.setting.LastMapFile = System.IO.Path.Combine(mapPath.FullName, "default.json");
|
||||
System.IO.FileInfo filePath = new System.IO.FileInfo(PUB.setting.LastMapFile);
|
||||
if (filePath.Exists == false) filePath = new System.IO.FileInfo(System.IO.Path.Combine(mapPath.FullName, "default.agvmap"));
|
||||
if (filePath.Exists == false) filePath = new System.IO.FileInfo(System.IO.Path.Combine(mapPath.FullName, "default.json"));
|
||||
if (filePath.Exists == false) //그래도없다면 맵폴더에서 파일을 찾아본다.
|
||||
{
|
||||
var files = mapPath.GetFiles("*.agvmap");
|
||||
var files = mapPath.GetFiles("*.json");
|
||||
if (files.Any()) filePath = files[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user