From 9db88e5d6b03ce138f82bc9ddc94d8ab0781924f Mon Sep 17 00:00:00 2001 From: backuppc Date: Mon, 15 Dec 2025 08:33:42 +0900 Subject: [PATCH] =?UTF-8?q?.agvmap=20=ED=99=95=EC=9E=A5=EC=9E=90=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=ED=95=98=EA=B3=A0=20.json=20=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=ED=95=9C=20mapeditor=20=EC=99=80=20=ED=98=B8?= =?UTF-8?q?=ED=99=98=EC=84=B1=20=EC=9C=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cs_HMI/AGVLogic/AGVMapEditor/Forms/MainForm.cs | 10 +++++----- .../Utils/DirectionalPathfinderTest.cs | 4 ++-- Cs_HMI/AGVLogic/AGVNavigationCore/Utils/TestRunner.cs | 2 +- Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs | 8 ++++---- Cs_HMI/Project/ViewForm/fAuto.cs | 10 +++++----- Cs_HMI/Project/fMain.cs | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cs_HMI/AGVLogic/AGVMapEditor/Forms/MainForm.cs b/Cs_HMI/AGVLogic/AGVMapEditor/Forms/MainForm.cs index b442903..28f5d78 100644 --- a/Cs_HMI/AGVLogic/AGVMapEditor/Forms/MainForm.cs +++ b/Cs_HMI/AGVLogic/AGVMapEditor/Forms/MainForm.cs @@ -546,8 +546,8 @@ namespace AGVMapEditor.Forms { var openFileDialog = new OpenFileDialog { - Filter = "AGV Map Files (*.agvmap;*.json)|*.agvmap;*.json|All Files (*.*)|*.*", - DefaultExt = "agvmap", + Filter = "AGV Map Files (*.json)|*.json|All Files (*.*)|*.*", + DefaultExt = "json", }; @@ -595,9 +595,9 @@ namespace AGVMapEditor.Forms { var saveFileDialog = new SaveFileDialog { - Filter = "AGV Map Files (*.agvmap)|*.agvmap", - DefaultExt = "agvmap", - FileName = "NewMap.agvmap" + Filter = "AGV Map Files (*.json)|*.json", + DefaultExt = "json", + FileName = "NewMap.json" }; if (saveFileDialog.ShowDialog() == DialogResult.OK) diff --git a/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/DirectionalPathfinderTest.cs b/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/DirectionalPathfinderTest.cs index a4dfc80..672fb6c 100644 --- a/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/DirectionalPathfinderTest.cs +++ b/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/DirectionalPathfinderTest.cs @@ -11,7 +11,7 @@ namespace AGVNavigationCore.Utils { /// /// DirectionalPathfinder 테스트 클래스 - /// NewMap.agvmap을 로드하여 방향별 다음 노드를 검증 + /// NewMap.json 로드하여 방향별 다음 노드를 검증 /// public class DirectionalPathfinderTest { @@ -26,7 +26,7 @@ namespace AGVNavigationCore.Utils } /// - /// NewMap.agvmap 파일 로드 + /// NewMap.json 파일 로드 /// public bool LoadMapFile(string filePath) { diff --git a/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/TestRunner.cs b/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/TestRunner.cs index 7bca1b8..f621f78 100644 --- a/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/TestRunner.cs +++ b/Cs_HMI/AGVLogic/AGVNavigationCore/Utils/TestRunner.cs @@ -14,7 +14,7 @@ namespace AGVNavigationCore.Utils { public void RunTests() { - string mapFilePath = @"C:\Data\Source\(5613#) ENIG AGV\Source\Cs_HMI\Data\NewMap.agvmap"; + string mapFilePath = @"C:\Data\Source\(5613#) ENIG AGV\Source\Cs_HMI\Data\NewMap.json"; var tester = new DirectionalPathfinderTest(); diff --git a/Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs b/Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs index 0ca0f59..4aa4eb1 100644 --- a/Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs +++ b/Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs @@ -231,7 +231,7 @@ namespace AGVSimulator.Forms { using (var openDialog = new OpenFileDialog()) { - openDialog.Filter = "AGV Map Files (*.agvmap)|*.agvmap|모든 파일 (*.*)|*.*"; + openDialog.Filter = "AGV Map Files (*.json)|*.json|모든 파일 (*.*)|*.*"; openDialog.Title = "맵 파일 열기"; if (openDialog.ShowDialog() == DialogResult.OK) @@ -2038,9 +2038,9 @@ namespace AGVSimulator.Forms using (var saveDialog = new SaveFileDialog()) { - saveDialog.Filter = "AGV Map Files (*.agvmap)|*.agvmap|모든 파일 (*.*)|*.*"; + saveDialog.Filter = "AGV Map Files (*.json)|*.json|모든 파일 (*.*)|*.*"; saveDialog.Title = "맵 파일 저장"; - saveDialog.DefaultExt = "agvmap"; + saveDialog.DefaultExt = "json"; // 현재 파일이 있으면 기본 파일명으로 설정 if (!string.IsNullOrEmpty(_currentMapFilePath)) @@ -2051,7 +2051,7 @@ namespace AGVSimulator.Forms else { // 기본 파일명: 날짜_시간 형식 - saveDialog.FileName = $"ScanMap_{DateTime.Now:yyyyMMdd_HHmmss}.agvmap"; + saveDialog.FileName = $"ScanMap_{DateTime.Now:yyyyMMdd_HHmmss}.json"; } if (saveDialog.ShowDialog() == DialogResult.OK) diff --git a/Cs_HMI/Project/ViewForm/fAuto.cs b/Cs_HMI/Project/ViewForm/fAuto.cs index 4b69b6e..54b7d0d 100644 --- a/Cs_HMI/Project/ViewForm/fAuto.cs +++ b/Cs_HMI/Project/ViewForm/fAuto.cs @@ -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]; } diff --git a/Cs_HMI/Project/fMain.cs b/Cs_HMI/Project/fMain.cs index 28048ac..1a26117 100644 --- a/Cs_HMI/Project/fMain.cs +++ b/Cs_HMI/Project/fMain.cs @@ -769,8 +769,8 @@ namespace Project //mapsave using (var sd = new SaveFileDialog()) { - sd.Filter = "AGV Map Files (*.agvmap)|*.agvmap|All Files (*.*)|*.*"; - sd.DefaultExt = "agvmap"; + sd.Filter = "AGV Map Files (*.json)|*.json|All Files (*.*)|*.*"; + sd.DefaultExt = "json"; sd.FileName = PUB._mapCanvas.MapFileName; if (sd.ShowDialog() == DialogResult.OK) { @@ -785,8 +785,8 @@ namespace Project var od = new OpenFileDialog { - Filter = "AGV Map Files (*.agvmap;*.json)|*.agvmap;*.json|All Files (*.*)|*.*", - DefaultExt = "agvmap", + Filter = "AGV Map Files (*.json)|*.json|All Files (*.*)|*.*", + DefaultExt = "json", FileName = PUB._mapCanvas.MapFileName, };