refactor: Move AGV development projects to separate AGVLogic folder
- Reorganized AGVMapEditor, AGVNavigationCore, AGVSimulator into AGVLogic folder - Removed deleted project files from root folder tracking - Updated CLAUDE.md with AGVLogic-specific development guidelines - Clean separation of independent project development from main codebase - Projects now ready for independent development and future integration 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
80
Cs_HMI/AGVLogic/AGVSimulator/AGVSimulator.csproj
Normal file
80
Cs_HMI/AGVLogic/AGVSimulator/AGVSimulator.csproj
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B2C3D4E5-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>AGVSimulator</RootNamespace>
|
||||
<AssemblyName>AGVSimulator</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\SimulatorConfig.cs" />
|
||||
<Compile Include="Models\VirtualAGV.cs" />
|
||||
<Compile Include="Models\SimulationState.cs" />
|
||||
<Compile Include="Forms\SimulatorForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SimulatorForm.Designer.cs">
|
||||
<DependentUpon>SimulatorForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\SimulatorForm.resx">
|
||||
<DependentUpon>SimulatorForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="build.bat" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AGVNavigationCore\AGVNavigationCore.csproj">
|
||||
<Project>{C5F7A8B2-8D3E-4A1B-9C6E-7F4D5E2A9B1C}</Project>
|
||||
<Name>AGVNavigationCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\AGVMapEditor\AGVMapEditor.csproj">
|
||||
<Project>{a1b2c3d4-e5f6-7890-abcd-ef1234567890}</Project>
|
||||
<Name>AGVMapEditor</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
833
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.Designer.cs
generated
Normal file
833
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.Designer.cs
generated
Normal file
@@ -0,0 +1,833 @@
|
||||
namespace AGVSimulator.Forms
|
||||
{
|
||||
partial class SimulatorForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 필수 디자이너 변수입니다.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 사용 중인 모든 리소스를 정리합니다.
|
||||
/// </summary>
|
||||
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
// 시뮬레이션 정지
|
||||
if (_simulationTimer != null)
|
||||
{
|
||||
_simulationTimer.Stop();
|
||||
_simulationTimer.Dispose();
|
||||
}
|
||||
|
||||
// AGV 정리
|
||||
if (_agvList != null)
|
||||
{
|
||||
foreach (var agv in _agvList)
|
||||
{
|
||||
agv.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form 디자이너에서 생성한 코드
|
||||
|
||||
/// <summary>
|
||||
/// 디자이너 지원에 필요한 메서드입니다.
|
||||
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this._menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reloadMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.launchMapEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.simulationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.startSimulationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stopSimulationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fitToMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resetZoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._toolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.openMapToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.reloadMapToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.launchMapEditorToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.startSimulationToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.stopSimulationToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.resetToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.btAllReset = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.fitToMapToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.resetZoomToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this._statusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this._statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this._coordLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this._controlPanel = new System.Windows.Forms.Panel();
|
||||
this._statusGroup = new System.Windows.Forms.GroupBox();
|
||||
this._pathLengthLabel = new System.Windows.Forms.Label();
|
||||
this._agvCountLabel = new System.Windows.Forms.Label();
|
||||
this._simulationStatusLabel = new System.Windows.Forms.Label();
|
||||
this._pathGroup = new System.Windows.Forms.GroupBox();
|
||||
this._clearPathButton = new System.Windows.Forms.Button();
|
||||
this._startPathButton = new System.Windows.Forms.Button();
|
||||
this._calculatePathButton = new System.Windows.Forms.Button();
|
||||
this._targetCalcButton = new System.Windows.Forms.Button();
|
||||
this._avoidRotationCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this._targetNodeCombo = new System.Windows.Forms.ComboBox();
|
||||
this.targetNodeLabel = new System.Windows.Forms.Label();
|
||||
this._startNodeCombo = new System.Windows.Forms.ComboBox();
|
||||
this.startNodeLabel = new System.Windows.Forms.Label();
|
||||
this._agvControlGroup = new System.Windows.Forms.GroupBox();
|
||||
this._setPositionButton = new System.Windows.Forms.Button();
|
||||
this._rfidTextBox = new System.Windows.Forms.TextBox();
|
||||
this._rfidLabel = new System.Windows.Forms.Label();
|
||||
this._directionCombo = new System.Windows.Forms.ComboBox();
|
||||
this._directionLabel = new System.Windows.Forms.Label();
|
||||
this._stopSimulationButton = new System.Windows.Forms.Button();
|
||||
this._startSimulationButton = new System.Windows.Forms.Button();
|
||||
this._removeAgvButton = new System.Windows.Forms.Button();
|
||||
this._addAgvButton = new System.Windows.Forms.Button();
|
||||
this._agvListCombo = new System.Windows.Forms.ComboBox();
|
||||
this._canvasPanel = new System.Windows.Forms.Panel();
|
||||
this._agvInfoPanel = new System.Windows.Forms.Panel();
|
||||
this._agvInfoTitleLabel = new System.Windows.Forms.Label();
|
||||
this._liftDirectionLabel = new System.Windows.Forms.Label();
|
||||
this._motorDirectionLabel = new System.Windows.Forms.Label();
|
||||
this._pathDebugLabel = new System.Windows.Forms.Label();
|
||||
this._menuStrip.SuspendLayout();
|
||||
this._toolStrip.SuspendLayout();
|
||||
this._statusStrip.SuspendLayout();
|
||||
this._controlPanel.SuspendLayout();
|
||||
this._statusGroup.SuspendLayout();
|
||||
this._pathGroup.SuspendLayout();
|
||||
this._agvControlGroup.SuspendLayout();
|
||||
this._agvInfoPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// _menuStrip
|
||||
//
|
||||
this._menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.simulationToolStripMenuItem,
|
||||
this.viewToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this._menuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this._menuStrip.Name = "_menuStrip";
|
||||
this._menuStrip.Size = new System.Drawing.Size(1200, 24);
|
||||
this._menuStrip.TabIndex = 0;
|
||||
this._menuStrip.Text = "menuStrip";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openMapToolStripMenuItem,
|
||||
this.reloadMapToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.launchMapEditorToolStripMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
|
||||
this.fileToolStripMenuItem.Text = "파일(&F)";
|
||||
//
|
||||
// openMapToolStripMenuItem
|
||||
//
|
||||
this.openMapToolStripMenuItem.Name = "openMapToolStripMenuItem";
|
||||
this.openMapToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openMapToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.openMapToolStripMenuItem.Text = "맵 열기(&O)...";
|
||||
this.openMapToolStripMenuItem.Click += new System.EventHandler(this.OnOpenMap_Click);
|
||||
//
|
||||
// reloadMapToolStripMenuItem
|
||||
//
|
||||
this.reloadMapToolStripMenuItem.Name = "reloadMapToolStripMenuItem";
|
||||
this.reloadMapToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
|
||||
this.reloadMapToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.reloadMapToolStripMenuItem.Text = "맵 다시열기(&R)";
|
||||
this.reloadMapToolStripMenuItem.Click += new System.EventHandler(this.OnReloadMap_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(218, 6);
|
||||
//
|
||||
// launchMapEditorToolStripMenuItem
|
||||
//
|
||||
this.launchMapEditorToolStripMenuItem.Name = "launchMapEditorToolStripMenuItem";
|
||||
this.launchMapEditorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M)));
|
||||
this.launchMapEditorToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.launchMapEditorToolStripMenuItem.Text = "MapEditor 실행(&M)";
|
||||
this.launchMapEditorToolStripMenuItem.Click += new System.EventHandler(this.OnLaunchMapEditor_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(218, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.exitToolStripMenuItem.Text = "종료(&X)";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.OnExit_Click);
|
||||
//
|
||||
// simulationToolStripMenuItem
|
||||
//
|
||||
this.simulationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.startSimulationToolStripMenuItem,
|
||||
this.stopSimulationToolStripMenuItem,
|
||||
this.resetToolStripMenuItem});
|
||||
this.simulationToolStripMenuItem.Name = "simulationToolStripMenuItem";
|
||||
this.simulationToolStripMenuItem.Size = new System.Drawing.Size(94, 20);
|
||||
this.simulationToolStripMenuItem.Text = "시뮬레이션(&S)";
|
||||
//
|
||||
// startSimulationToolStripMenuItem
|
||||
//
|
||||
this.startSimulationToolStripMenuItem.Name = "startSimulationToolStripMenuItem";
|
||||
this.startSimulationToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
|
||||
this.startSimulationToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
|
||||
this.startSimulationToolStripMenuItem.Text = "시작(&S)";
|
||||
this.startSimulationToolStripMenuItem.Click += new System.EventHandler(this.OnStartSimulation_Click);
|
||||
//
|
||||
// stopSimulationToolStripMenuItem
|
||||
//
|
||||
this.stopSimulationToolStripMenuItem.Name = "stopSimulationToolStripMenuItem";
|
||||
this.stopSimulationToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F6;
|
||||
this.stopSimulationToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
|
||||
this.stopSimulationToolStripMenuItem.Text = "정지(&T)";
|
||||
this.stopSimulationToolStripMenuItem.Click += new System.EventHandler(this.OnStopSimulation_Click);
|
||||
//
|
||||
// resetToolStripMenuItem
|
||||
//
|
||||
this.resetToolStripMenuItem.Name = "resetToolStripMenuItem";
|
||||
this.resetToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F7;
|
||||
this.resetToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
|
||||
this.resetToolStripMenuItem.Text = "초기화(&R)";
|
||||
this.resetToolStripMenuItem.Click += new System.EventHandler(this.OnReset_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fitToMapToolStripMenuItem,
|
||||
this.resetZoomToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
|
||||
this.viewToolStripMenuItem.Text = "보기(&V)";
|
||||
//
|
||||
// fitToMapToolStripMenuItem
|
||||
//
|
||||
this.fitToMapToolStripMenuItem.Name = "fitToMapToolStripMenuItem";
|
||||
this.fitToMapToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
||||
this.fitToMapToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
|
||||
this.fitToMapToolStripMenuItem.Text = "맵 맞춤(&F)";
|
||||
this.fitToMapToolStripMenuItem.Click += new System.EventHandler(this.OnFitToMap_Click);
|
||||
//
|
||||
// resetZoomToolStripMenuItem
|
||||
//
|
||||
this.resetZoomToolStripMenuItem.Name = "resetZoomToolStripMenuItem";
|
||||
this.resetZoomToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D0)));
|
||||
this.resetZoomToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
|
||||
this.resetZoomToolStripMenuItem.Text = "줌 초기화(&Z)";
|
||||
this.resetZoomToolStripMenuItem.Click += new System.EventHandler(this.OnResetZoom_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.aboutToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(72, 20);
|
||||
this.helpToolStripMenuItem.Text = "도움말(&H)";
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.aboutToolStripMenuItem.Text = "정보(&A)...";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.OnAbout_Click);
|
||||
//
|
||||
// _toolStrip
|
||||
//
|
||||
this._toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openMapToolStripButton,
|
||||
this.reloadMapToolStripButton,
|
||||
this.launchMapEditorToolStripButton,
|
||||
this.toolStripSeparator2,
|
||||
this.startSimulationToolStripButton,
|
||||
this.stopSimulationToolStripButton,
|
||||
this.resetToolStripButton,
|
||||
this.btAllReset,
|
||||
this.toolStripSeparator3,
|
||||
this.fitToMapToolStripButton,
|
||||
this.resetZoomToolStripButton});
|
||||
this._toolStrip.Location = new System.Drawing.Point(0, 24);
|
||||
this._toolStrip.Name = "_toolStrip";
|
||||
this._toolStrip.Size = new System.Drawing.Size(1200, 25);
|
||||
this._toolStrip.TabIndex = 1;
|
||||
this._toolStrip.Text = "toolStrip";
|
||||
//
|
||||
// openMapToolStripButton
|
||||
//
|
||||
this.openMapToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.openMapToolStripButton.Name = "openMapToolStripButton";
|
||||
this.openMapToolStripButton.Size = new System.Drawing.Size(51, 22);
|
||||
this.openMapToolStripButton.Text = "맵 열기";
|
||||
this.openMapToolStripButton.ToolTipText = "맵 파일을 엽니다";
|
||||
this.openMapToolStripButton.Click += new System.EventHandler(this.OnOpenMap_Click);
|
||||
//
|
||||
// reloadMapToolStripButton
|
||||
//
|
||||
this.reloadMapToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.reloadMapToolStripButton.Name = "reloadMapToolStripButton";
|
||||
this.reloadMapToolStripButton.Size = new System.Drawing.Size(59, 22);
|
||||
this.reloadMapToolStripButton.Text = "다시열기";
|
||||
this.reloadMapToolStripButton.ToolTipText = "현재 맵을 다시 로드합니다";
|
||||
this.reloadMapToolStripButton.Click += new System.EventHandler(this.OnReloadMap_Click);
|
||||
//
|
||||
// launchMapEditorToolStripButton
|
||||
//
|
||||
this.launchMapEditorToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.launchMapEditorToolStripButton.Name = "launchMapEditorToolStripButton";
|
||||
this.launchMapEditorToolStripButton.Size = new System.Drawing.Size(66, 22);
|
||||
this.launchMapEditorToolStripButton.Text = "MapEditor";
|
||||
this.launchMapEditorToolStripButton.ToolTipText = "MapEditor를 실행합니다";
|
||||
this.launchMapEditorToolStripButton.Click += new System.EventHandler(this.OnLaunchMapEditor_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// startSimulationToolStripButton
|
||||
//
|
||||
this.startSimulationToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.startSimulationToolStripButton.Name = "startSimulationToolStripButton";
|
||||
this.startSimulationToolStripButton.Size = new System.Drawing.Size(99, 22);
|
||||
this.startSimulationToolStripButton.Text = "시뮬레이션 시작";
|
||||
this.startSimulationToolStripButton.ToolTipText = "시뮬레이션을 시작합니다";
|
||||
this.startSimulationToolStripButton.Click += new System.EventHandler(this.OnStartSimulation_Click);
|
||||
//
|
||||
// stopSimulationToolStripButton
|
||||
//
|
||||
this.stopSimulationToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.stopSimulationToolStripButton.Name = "stopSimulationToolStripButton";
|
||||
this.stopSimulationToolStripButton.Size = new System.Drawing.Size(99, 22);
|
||||
this.stopSimulationToolStripButton.Text = "시뮬레이션 정지";
|
||||
this.stopSimulationToolStripButton.ToolTipText = "시뮬레이션을 정지합니다";
|
||||
this.stopSimulationToolStripButton.Click += new System.EventHandler(this.OnStopSimulation_Click);
|
||||
//
|
||||
// resetToolStripButton
|
||||
//
|
||||
this.resetToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.resetToolStripButton.Name = "resetToolStripButton";
|
||||
this.resetToolStripButton.Size = new System.Drawing.Size(47, 22);
|
||||
this.resetToolStripButton.Text = "초기화";
|
||||
this.resetToolStripButton.ToolTipText = "시뮬레이션을 초기화합니다";
|
||||
this.resetToolStripButton.Click += new System.EventHandler(this.OnReset_Click);
|
||||
//
|
||||
// btAllReset
|
||||
//
|
||||
this.btAllReset.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.btAllReset.Name = "btAllReset";
|
||||
this.btAllReset.Size = new System.Drawing.Size(71, 22);
|
||||
this.btAllReset.Text = "전체초기화";
|
||||
this.btAllReset.ToolTipText = "시뮬레이션을 초기화합니다";
|
||||
this.btAllReset.Click += new System.EventHandler(this.btAllReset_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// fitToMapToolStripButton
|
||||
//
|
||||
this.fitToMapToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.fitToMapToolStripButton.Name = "fitToMapToolStripButton";
|
||||
this.fitToMapToolStripButton.Size = new System.Drawing.Size(51, 22);
|
||||
this.fitToMapToolStripButton.Text = "맵 맞춤";
|
||||
this.fitToMapToolStripButton.ToolTipText = "맵 전체를 화면에 맞춥니다";
|
||||
this.fitToMapToolStripButton.Click += new System.EventHandler(this.OnFitToMap_Click);
|
||||
//
|
||||
// resetZoomToolStripButton
|
||||
//
|
||||
this.resetZoomToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.resetZoomToolStripButton.Name = "resetZoomToolStripButton";
|
||||
this.resetZoomToolStripButton.Size = new System.Drawing.Size(63, 22);
|
||||
this.resetZoomToolStripButton.Text = "줌 초기화";
|
||||
this.resetZoomToolStripButton.ToolTipText = "줌을 초기화합니다";
|
||||
this.resetZoomToolStripButton.Click += new System.EventHandler(this.OnResetZoom_Click);
|
||||
//
|
||||
// _statusStrip
|
||||
//
|
||||
this._statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._statusLabel,
|
||||
this._coordLabel});
|
||||
this._statusStrip.Location = new System.Drawing.Point(0, 778);
|
||||
this._statusStrip.Name = "_statusStrip";
|
||||
this._statusStrip.Size = new System.Drawing.Size(1200, 22);
|
||||
this._statusStrip.TabIndex = 2;
|
||||
this._statusStrip.Text = "statusStrip";
|
||||
//
|
||||
// _statusLabel
|
||||
//
|
||||
this._statusLabel.Name = "_statusLabel";
|
||||
this._statusLabel.Size = new System.Drawing.Size(31, 17);
|
||||
this._statusLabel.Text = "준비";
|
||||
//
|
||||
// _coordLabel
|
||||
//
|
||||
this._coordLabel.Name = "_coordLabel";
|
||||
this._coordLabel.Size = new System.Drawing.Size(0, 17);
|
||||
//
|
||||
// _controlPanel
|
||||
//
|
||||
this._controlPanel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this._controlPanel.Controls.Add(this._statusGroup);
|
||||
this._controlPanel.Controls.Add(this._pathGroup);
|
||||
this._controlPanel.Controls.Add(this._agvControlGroup);
|
||||
this._controlPanel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this._controlPanel.Location = new System.Drawing.Point(967, 49);
|
||||
this._controlPanel.Name = "_controlPanel";
|
||||
this._controlPanel.Size = new System.Drawing.Size(233, 729);
|
||||
this._controlPanel.TabIndex = 3;
|
||||
//
|
||||
// _statusGroup
|
||||
//
|
||||
this._statusGroup.Controls.Add(this._pathLengthLabel);
|
||||
this._statusGroup.Controls.Add(this._agvCountLabel);
|
||||
this._statusGroup.Controls.Add(this._simulationStatusLabel);
|
||||
this._statusGroup.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this._statusGroup.Location = new System.Drawing.Point(0, 446);
|
||||
this._statusGroup.Name = "_statusGroup";
|
||||
this._statusGroup.Size = new System.Drawing.Size(233, 100);
|
||||
this._statusGroup.TabIndex = 3;
|
||||
this._statusGroup.TabStop = false;
|
||||
this._statusGroup.Text = "상태 정보";
|
||||
//
|
||||
// _pathLengthLabel
|
||||
//
|
||||
this._pathLengthLabel.AutoSize = true;
|
||||
this._pathLengthLabel.Location = new System.Drawing.Point(10, 65);
|
||||
this._pathLengthLabel.Name = "_pathLengthLabel";
|
||||
this._pathLengthLabel.Size = new System.Drawing.Size(71, 12);
|
||||
this._pathLengthLabel.TabIndex = 2;
|
||||
this._pathLengthLabel.Text = "경로 길이: -";
|
||||
//
|
||||
// _agvCountLabel
|
||||
//
|
||||
this._agvCountLabel.AutoSize = true;
|
||||
this._agvCountLabel.Location = new System.Drawing.Point(10, 45);
|
||||
this._agvCountLabel.Name = "_agvCountLabel";
|
||||
this._agvCountLabel.Size = new System.Drawing.Size(60, 12);
|
||||
this._agvCountLabel.TabIndex = 1;
|
||||
this._agvCountLabel.Text = "AGV 수: 0";
|
||||
//
|
||||
// _simulationStatusLabel
|
||||
//
|
||||
this._simulationStatusLabel.AutoSize = true;
|
||||
this._simulationStatusLabel.Location = new System.Drawing.Point(10, 25);
|
||||
this._simulationStatusLabel.Name = "_simulationStatusLabel";
|
||||
this._simulationStatusLabel.Size = new System.Drawing.Size(97, 12);
|
||||
this._simulationStatusLabel.TabIndex = 0;
|
||||
this._simulationStatusLabel.Text = "시뮬레이션: 정지";
|
||||
//
|
||||
// _pathGroup
|
||||
//
|
||||
this._pathGroup.Controls.Add(this._clearPathButton);
|
||||
this._pathGroup.Controls.Add(this._startPathButton);
|
||||
this._pathGroup.Controls.Add(this._calculatePathButton);
|
||||
this._pathGroup.Controls.Add(this._targetCalcButton);
|
||||
this._pathGroup.Controls.Add(this._avoidRotationCheckBox);
|
||||
this._pathGroup.Controls.Add(this._targetNodeCombo);
|
||||
this._pathGroup.Controls.Add(this.targetNodeLabel);
|
||||
this._pathGroup.Controls.Add(this._startNodeCombo);
|
||||
this._pathGroup.Controls.Add(this.startNodeLabel);
|
||||
this._pathGroup.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this._pathGroup.Location = new System.Drawing.Point(0, 214);
|
||||
this._pathGroup.Name = "_pathGroup";
|
||||
this._pathGroup.Size = new System.Drawing.Size(233, 232);
|
||||
this._pathGroup.TabIndex = 1;
|
||||
this._pathGroup.TabStop = false;
|
||||
this._pathGroup.Text = "경로 제어";
|
||||
//
|
||||
// _clearPathButton
|
||||
//
|
||||
this._clearPathButton.Location = new System.Drawing.Point(150, 177);
|
||||
this._clearPathButton.Name = "_clearPathButton";
|
||||
this._clearPathButton.Size = new System.Drawing.Size(70, 25);
|
||||
this._clearPathButton.TabIndex = 6;
|
||||
this._clearPathButton.Text = "경로 지우기";
|
||||
this._clearPathButton.UseVisualStyleBackColor = true;
|
||||
this._clearPathButton.Click += new System.EventHandler(this.OnClearPath_Click);
|
||||
//
|
||||
// _startPathButton
|
||||
//
|
||||
this._startPathButton.Location = new System.Drawing.Point(80, 177);
|
||||
this._startPathButton.Name = "_startPathButton";
|
||||
this._startPathButton.Size = new System.Drawing.Size(65, 25);
|
||||
this._startPathButton.TabIndex = 5;
|
||||
this._startPathButton.Text = "경로 시작";
|
||||
this._startPathButton.UseVisualStyleBackColor = true;
|
||||
this._startPathButton.Click += new System.EventHandler(this.OnStartPath_Click);
|
||||
//
|
||||
// _calculatePathButton
|
||||
//
|
||||
this._calculatePathButton.Location = new System.Drawing.Point(10, 177);
|
||||
this._calculatePathButton.Name = "_calculatePathButton";
|
||||
this._calculatePathButton.Size = new System.Drawing.Size(65, 25);
|
||||
this._calculatePathButton.TabIndex = 4;
|
||||
this._calculatePathButton.Text = "경로 계산";
|
||||
this._calculatePathButton.UseVisualStyleBackColor = true;
|
||||
this._calculatePathButton.Click += new System.EventHandler(this.OnCalculatePath_Click);
|
||||
//
|
||||
//
|
||||
// _targetCalcButton
|
||||
//
|
||||
this._targetCalcButton.Location = new System.Drawing.Point(10, 148);
|
||||
this._targetCalcButton.Name = "_targetCalcButton";
|
||||
this._targetCalcButton.Size = new System.Drawing.Size(70, 25);
|
||||
this._targetCalcButton.TabIndex = 9;
|
||||
this._targetCalcButton.Text = "타겟계산";
|
||||
this._targetCalcButton.UseVisualStyleBackColor = true;
|
||||
this._targetCalcButton.Click += new System.EventHandler(this.OnTargetCalc_Click);
|
||||
//
|
||||
// _avoidRotationCheckBox
|
||||
//
|
||||
this._avoidRotationCheckBox.AutoSize = true;
|
||||
this._avoidRotationCheckBox.Location = new System.Drawing.Point(10, 126);
|
||||
this._avoidRotationCheckBox.Name = "_avoidRotationCheckBox";
|
||||
this._avoidRotationCheckBox.Size = new System.Drawing.Size(104, 16);
|
||||
this._avoidRotationCheckBox.TabIndex = 7;
|
||||
this._avoidRotationCheckBox.Text = "회전 구간 회피";
|
||||
this._avoidRotationCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// _targetNodeCombo
|
||||
//
|
||||
this._targetNodeCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this._targetNodeCombo.Location = new System.Drawing.Point(10, 97);
|
||||
this._targetNodeCombo.Name = "_targetNodeCombo";
|
||||
this._targetNodeCombo.Size = new System.Drawing.Size(210, 20);
|
||||
this._targetNodeCombo.TabIndex = 3;
|
||||
//
|
||||
// targetNodeLabel
|
||||
//
|
||||
this.targetNodeLabel.AutoSize = true;
|
||||
this.targetNodeLabel.Location = new System.Drawing.Point(10, 75);
|
||||
this.targetNodeLabel.Name = "targetNodeLabel";
|
||||
this.targetNodeLabel.Size = new System.Drawing.Size(63, 12);
|
||||
this.targetNodeLabel.TabIndex = 2;
|
||||
this.targetNodeLabel.Text = "목표 RFID:";
|
||||
//
|
||||
// _startNodeCombo
|
||||
//
|
||||
this._startNodeCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this._startNodeCombo.Location = new System.Drawing.Point(10, 45);
|
||||
this._startNodeCombo.Name = "_startNodeCombo";
|
||||
this._startNodeCombo.Size = new System.Drawing.Size(210, 20);
|
||||
this._startNodeCombo.TabIndex = 1;
|
||||
//
|
||||
// startNodeLabel
|
||||
//
|
||||
this.startNodeLabel.AutoSize = true;
|
||||
this.startNodeLabel.Location = new System.Drawing.Point(10, 25);
|
||||
this.startNodeLabel.Name = "startNodeLabel";
|
||||
this.startNodeLabel.Size = new System.Drawing.Size(63, 12);
|
||||
this.startNodeLabel.TabIndex = 0;
|
||||
this.startNodeLabel.Text = "시작 RFID:";
|
||||
//
|
||||
// _agvControlGroup
|
||||
//
|
||||
this._agvControlGroup.Controls.Add(this._setPositionButton);
|
||||
this._agvControlGroup.Controls.Add(this._rfidTextBox);
|
||||
this._agvControlGroup.Controls.Add(this._rfidLabel);
|
||||
this._agvControlGroup.Controls.Add(this._directionCombo);
|
||||
this._agvControlGroup.Controls.Add(this._directionLabel);
|
||||
this._agvControlGroup.Controls.Add(this._stopSimulationButton);
|
||||
this._agvControlGroup.Controls.Add(this._startSimulationButton);
|
||||
this._agvControlGroup.Controls.Add(this._removeAgvButton);
|
||||
this._agvControlGroup.Controls.Add(this._addAgvButton);
|
||||
this._agvControlGroup.Controls.Add(this._agvListCombo);
|
||||
this._agvControlGroup.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this._agvControlGroup.Location = new System.Drawing.Point(0, 0);
|
||||
this._agvControlGroup.Name = "_agvControlGroup";
|
||||
this._agvControlGroup.Size = new System.Drawing.Size(233, 214);
|
||||
this._agvControlGroup.TabIndex = 0;
|
||||
this._agvControlGroup.TabStop = false;
|
||||
this._agvControlGroup.Text = "AGV 제어";
|
||||
//
|
||||
// _setPositionButton
|
||||
//
|
||||
this._setPositionButton.Location = new System.Drawing.Point(160, 138);
|
||||
this._setPositionButton.Name = "_setPositionButton";
|
||||
this._setPositionButton.Size = new System.Drawing.Size(60, 67);
|
||||
this._setPositionButton.TabIndex = 7;
|
||||
this._setPositionButton.Text = "위치설정";
|
||||
this._setPositionButton.UseVisualStyleBackColor = true;
|
||||
this._setPositionButton.Click += new System.EventHandler(this.OnSetPosition_Click);
|
||||
//
|
||||
// _rfidTextBox
|
||||
//
|
||||
this._rfidTextBox.Location = new System.Drawing.Point(10, 140);
|
||||
this._rfidTextBox.Name = "_rfidTextBox";
|
||||
this._rfidTextBox.Size = new System.Drawing.Size(140, 21);
|
||||
this._rfidTextBox.TabIndex = 6;
|
||||
this._rfidTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.OnRfidTextBox_KeyPress);
|
||||
//
|
||||
// _rfidLabel
|
||||
//
|
||||
this._rfidLabel.AutoSize = true;
|
||||
this._rfidLabel.Location = new System.Drawing.Point(10, 120);
|
||||
this._rfidLabel.Name = "_rfidLabel";
|
||||
this._rfidLabel.Size = new System.Drawing.Size(87, 12);
|
||||
this._rfidLabel.TabIndex = 5;
|
||||
this._rfidLabel.Text = "RFID 현재위치:";
|
||||
//
|
||||
// _directionCombo
|
||||
//
|
||||
this._directionCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this._directionCombo.FormattingEnabled = true;
|
||||
this._directionCombo.Location = new System.Drawing.Point(10, 185);
|
||||
this._directionCombo.Name = "_directionCombo";
|
||||
this._directionCombo.Size = new System.Drawing.Size(140, 20);
|
||||
this._directionCombo.TabIndex = 8;
|
||||
//
|
||||
// _directionLabel
|
||||
//
|
||||
this._directionLabel.AutoSize = true;
|
||||
this._directionLabel.Location = new System.Drawing.Point(10, 165);
|
||||
this._directionLabel.Name = "_directionLabel";
|
||||
this._directionLabel.Size = new System.Drawing.Size(85, 12);
|
||||
this._directionLabel.TabIndex = 9;
|
||||
this._directionLabel.Text = "모터 구동방향:";
|
||||
//
|
||||
// _stopSimulationButton
|
||||
//
|
||||
this._stopSimulationButton.Location = new System.Drawing.Point(120, 85);
|
||||
this._stopSimulationButton.Name = "_stopSimulationButton";
|
||||
this._stopSimulationButton.Size = new System.Drawing.Size(100, 25);
|
||||
this._stopSimulationButton.TabIndex = 4;
|
||||
this._stopSimulationButton.Text = "시뮬레이션 정지";
|
||||
this._stopSimulationButton.UseVisualStyleBackColor = true;
|
||||
this._stopSimulationButton.Click += new System.EventHandler(this.OnStopSimulation_Click);
|
||||
//
|
||||
// _startSimulationButton
|
||||
//
|
||||
this._startSimulationButton.Location = new System.Drawing.Point(10, 85);
|
||||
this._startSimulationButton.Name = "_startSimulationButton";
|
||||
this._startSimulationButton.Size = new System.Drawing.Size(100, 25);
|
||||
this._startSimulationButton.TabIndex = 3;
|
||||
this._startSimulationButton.Text = "시뮬레이션 시작";
|
||||
this._startSimulationButton.UseVisualStyleBackColor = true;
|
||||
this._startSimulationButton.Click += new System.EventHandler(this.OnStartSimulation_Click);
|
||||
//
|
||||
// _removeAgvButton
|
||||
//
|
||||
this._removeAgvButton.Location = new System.Drawing.Point(120, 55);
|
||||
this._removeAgvButton.Name = "_removeAgvButton";
|
||||
this._removeAgvButton.Size = new System.Drawing.Size(100, 25);
|
||||
this._removeAgvButton.TabIndex = 2;
|
||||
this._removeAgvButton.Text = "AGV 제거";
|
||||
this._removeAgvButton.UseVisualStyleBackColor = true;
|
||||
this._removeAgvButton.Click += new System.EventHandler(this.OnRemoveAGV_Click);
|
||||
//
|
||||
// _addAgvButton
|
||||
//
|
||||
this._addAgvButton.Location = new System.Drawing.Point(10, 55);
|
||||
this._addAgvButton.Name = "_addAgvButton";
|
||||
this._addAgvButton.Size = new System.Drawing.Size(100, 25);
|
||||
this._addAgvButton.TabIndex = 1;
|
||||
this._addAgvButton.Text = "AGV 추가";
|
||||
this._addAgvButton.UseVisualStyleBackColor = true;
|
||||
this._addAgvButton.Click += new System.EventHandler(this.OnAddAGV_Click);
|
||||
//
|
||||
// _agvListCombo
|
||||
//
|
||||
this._agvListCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this._agvListCombo.Location = new System.Drawing.Point(10, 25);
|
||||
this._agvListCombo.Name = "_agvListCombo";
|
||||
this._agvListCombo.Size = new System.Drawing.Size(210, 20);
|
||||
this._agvListCombo.TabIndex = 0;
|
||||
this._agvListCombo.SelectedIndexChanged += new System.EventHandler(this.OnAGVList_SelectedIndexChanged);
|
||||
//
|
||||
// _canvasPanel
|
||||
//
|
||||
this._canvasPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this._canvasPanel.Location = new System.Drawing.Point(0, 109);
|
||||
this._canvasPanel.Name = "_canvasPanel";
|
||||
this._canvasPanel.Size = new System.Drawing.Size(967, 669);
|
||||
this._canvasPanel.TabIndex = 4;
|
||||
//
|
||||
// _agvInfoPanel
|
||||
//
|
||||
this._agvInfoPanel.BackColor = System.Drawing.Color.LightBlue;
|
||||
this._agvInfoPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this._agvInfoPanel.Controls.Add(this._agvInfoTitleLabel);
|
||||
this._agvInfoPanel.Controls.Add(this._liftDirectionLabel);
|
||||
this._agvInfoPanel.Controls.Add(this._motorDirectionLabel);
|
||||
this._agvInfoPanel.Controls.Add(this._pathDebugLabel);
|
||||
this._agvInfoPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this._agvInfoPanel.Location = new System.Drawing.Point(0, 49);
|
||||
this._agvInfoPanel.Name = "_agvInfoPanel";
|
||||
this._agvInfoPanel.Size = new System.Drawing.Size(967, 60);
|
||||
this._agvInfoPanel.TabIndex = 5;
|
||||
//
|
||||
// _agvInfoTitleLabel
|
||||
//
|
||||
this._agvInfoTitleLabel.AutoSize = true;
|
||||
this._agvInfoTitleLabel.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this._agvInfoTitleLabel.Location = new System.Drawing.Point(10, 12);
|
||||
this._agvInfoTitleLabel.Name = "_agvInfoTitleLabel";
|
||||
this._agvInfoTitleLabel.Size = new System.Drawing.Size(91, 15);
|
||||
this._agvInfoTitleLabel.TabIndex = 0;
|
||||
this._agvInfoTitleLabel.Text = "AGV 상태 정보:";
|
||||
//
|
||||
// _liftDirectionLabel
|
||||
//
|
||||
this._liftDirectionLabel.AutoSize = true;
|
||||
this._liftDirectionLabel.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this._liftDirectionLabel.Location = new System.Drawing.Point(120, 12);
|
||||
this._liftDirectionLabel.Name = "_liftDirectionLabel";
|
||||
this._liftDirectionLabel.Size = new System.Drawing.Size(83, 15);
|
||||
this._liftDirectionLabel.TabIndex = 1;
|
||||
this._liftDirectionLabel.Text = "리프트 방향: -";
|
||||
//
|
||||
// _motorDirectionLabel
|
||||
//
|
||||
this._motorDirectionLabel.AutoSize = true;
|
||||
this._motorDirectionLabel.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this._motorDirectionLabel.Location = new System.Drawing.Point(250, 12);
|
||||
this._motorDirectionLabel.Name = "_motorDirectionLabel";
|
||||
this._motorDirectionLabel.Size = new System.Drawing.Size(71, 15);
|
||||
this._motorDirectionLabel.TabIndex = 2;
|
||||
this._motorDirectionLabel.Text = "모터 방향: -";
|
||||
//
|
||||
// _pathDebugLabel
|
||||
//
|
||||
this._pathDebugLabel.AutoSize = true;
|
||||
this._pathDebugLabel.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this._pathDebugLabel.ForeColor = System.Drawing.Color.DarkBlue;
|
||||
this._pathDebugLabel.Location = new System.Drawing.Point(10, 30);
|
||||
this._pathDebugLabel.Name = "_pathDebugLabel";
|
||||
this._pathDebugLabel.Size = new System.Drawing.Size(114, 15);
|
||||
this._pathDebugLabel.TabIndex = 3;
|
||||
this._pathDebugLabel.Text = "경로: 설정되지 않음";
|
||||
//
|
||||
// SimulatorForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1200, 800);
|
||||
this.Controls.Add(this._canvasPanel);
|
||||
this.Controls.Add(this._agvInfoPanel);
|
||||
this.Controls.Add(this._controlPanel);
|
||||
this.Controls.Add(this._statusStrip);
|
||||
this.Controls.Add(this._toolStrip);
|
||||
this.Controls.Add(this._menuStrip);
|
||||
this.MainMenuStrip = this._menuStrip;
|
||||
this.Name = "SimulatorForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "AGV 시뮬레이터";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this._menuStrip.ResumeLayout(false);
|
||||
this._menuStrip.PerformLayout();
|
||||
this._toolStrip.ResumeLayout(false);
|
||||
this._toolStrip.PerformLayout();
|
||||
this._statusStrip.ResumeLayout(false);
|
||||
this._statusStrip.PerformLayout();
|
||||
this._controlPanel.ResumeLayout(false);
|
||||
this._statusGroup.ResumeLayout(false);
|
||||
this._statusGroup.PerformLayout();
|
||||
this._pathGroup.ResumeLayout(false);
|
||||
this._pathGroup.PerformLayout();
|
||||
this._agvControlGroup.ResumeLayout(false);
|
||||
this._agvControlGroup.PerformLayout();
|
||||
this._agvInfoPanel.ResumeLayout(false);
|
||||
this._agvInfoPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip _menuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openMapToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem simulationToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem startSimulationToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem stopSimulationToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem resetToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fitToMapToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem resetZoomToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStrip _toolStrip;
|
||||
private System.Windows.Forms.ToolStripButton openMapToolStripButton;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripButton startSimulationToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton stopSimulationToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton resetToolStripButton;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripButton fitToMapToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton resetZoomToolStripButton;
|
||||
private System.Windows.Forms.StatusStrip _statusStrip;
|
||||
private System.Windows.Forms.ToolStripStatusLabel _statusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel _coordLabel;
|
||||
private System.Windows.Forms.Panel _controlPanel;
|
||||
private System.Windows.Forms.GroupBox _agvControlGroup;
|
||||
private System.Windows.Forms.ComboBox _agvListCombo;
|
||||
private System.Windows.Forms.Button _addAgvButton;
|
||||
private System.Windows.Forms.Button _removeAgvButton;
|
||||
private System.Windows.Forms.Button _startSimulationButton;
|
||||
private System.Windows.Forms.Button _stopSimulationButton;
|
||||
private System.Windows.Forms.GroupBox _pathGroup;
|
||||
private System.Windows.Forms.Label startNodeLabel;
|
||||
private System.Windows.Forms.ComboBox _startNodeCombo;
|
||||
private System.Windows.Forms.Label targetNodeLabel;
|
||||
private System.Windows.Forms.ComboBox _targetNodeCombo;
|
||||
private System.Windows.Forms.Button _calculatePathButton;
|
||||
private System.Windows.Forms.Button _startPathButton;
|
||||
private System.Windows.Forms.Button _clearPathButton;
|
||||
private System.Windows.Forms.Button _targetCalcButton;
|
||||
private System.Windows.Forms.CheckBox _avoidRotationCheckBox;
|
||||
private System.Windows.Forms.GroupBox _statusGroup;
|
||||
private System.Windows.Forms.Label _simulationStatusLabel;
|
||||
private System.Windows.Forms.Label _agvCountLabel;
|
||||
private System.Windows.Forms.Label _pathLengthLabel;
|
||||
private System.Windows.Forms.Panel _canvasPanel;
|
||||
private System.Windows.Forms.Label _rfidLabel;
|
||||
private System.Windows.Forms.TextBox _rfidTextBox;
|
||||
private System.Windows.Forms.Button _setPositionButton;
|
||||
private System.Windows.Forms.ComboBox _directionCombo;
|
||||
private System.Windows.Forms.Label _directionLabel;
|
||||
private System.Windows.Forms.ToolStripButton btAllReset;
|
||||
private System.Windows.Forms.ToolStripMenuItem reloadMapToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem launchMapEditorToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripButton reloadMapToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton launchMapEditorToolStripButton;
|
||||
private System.Windows.Forms.Panel _agvInfoPanel;
|
||||
private System.Windows.Forms.Label _liftDirectionLabel;
|
||||
private System.Windows.Forms.Label _motorDirectionLabel;
|
||||
private System.Windows.Forms.Label _agvInfoTitleLabel;
|
||||
private System.Windows.Forms.Label _pathDebugLabel;
|
||||
}
|
||||
}
|
||||
1339
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs
Normal file
1339
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.cs
Normal file
File diff suppressed because it is too large
Load Diff
129
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.resx
Normal file
129
Cs_HMI/AGVLogic/AGVSimulator/Forms/SimulatorForm.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="_menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>237, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
135
Cs_HMI/AGVLogic/AGVSimulator/Models/SimulationState.cs
Normal file
135
Cs_HMI/AGVLogic/AGVSimulator/Models/SimulationState.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
|
||||
namespace AGVSimulator.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 시뮬레이션 상태 관리 클래스
|
||||
/// </summary>
|
||||
public class SimulationState
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 실행 중 여부
|
||||
/// </summary>
|
||||
public bool IsRunning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 시작 시간
|
||||
/// </summary>
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 경과 시간
|
||||
/// </summary>
|
||||
public TimeSpan ElapsedTime => StartTime.HasValue ? DateTime.Now - StartTime.Value : TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 속도 배율 (1.0 = 실시간, 2.0 = 2배속)
|
||||
/// </summary>
|
||||
public float SpeedMultiplier { get; set; } = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// 총 처리된 이벤트 수
|
||||
/// </summary>
|
||||
public int TotalEvents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 총 이동 거리 (모든 AGV 합계)
|
||||
/// </summary>
|
||||
public float TotalDistance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 발생한 오류 수
|
||||
/// </summary>
|
||||
public int ErrorCount { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// 기본 생성자
|
||||
/// </summary>
|
||||
public SimulationState()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 시작
|
||||
/// </summary>
|
||||
public void Start()
|
||||
{
|
||||
if (!IsRunning)
|
||||
{
|
||||
IsRunning = true;
|
||||
StartTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 정지
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
IsRunning = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 시뮬레이션 상태 초기화
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
IsRunning = false;
|
||||
StartTime = null;
|
||||
SpeedMultiplier = 1.0f;
|
||||
TotalEvents = 0;
|
||||
TotalDistance = 0;
|
||||
ErrorCount = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이벤트 발생 시 호출
|
||||
/// </summary>
|
||||
public void RecordEvent()
|
||||
{
|
||||
TotalEvents++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이동 거리 추가
|
||||
/// </summary>
|
||||
/// <param name="distance">이동한 거리</param>
|
||||
public void AddDistance(float distance)
|
||||
{
|
||||
TotalDistance += distance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 오류 발생 시 호출
|
||||
/// </summary>
|
||||
public void RecordError()
|
||||
{
|
||||
ErrorCount++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 통계 정보 조회
|
||||
/// </summary>
|
||||
/// <returns>통계 정보 문자열</returns>
|
||||
public string GetStatistics()
|
||||
{
|
||||
return $"실행시간: {ElapsedTime:hh\\:mm\\:ss}, " +
|
||||
$"이벤트: {TotalEvents}, " +
|
||||
$"총거리: {TotalDistance:F1}, " +
|
||||
$"오류: {ErrorCount}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
128
Cs_HMI/AGVLogic/AGVSimulator/Models/SimulatorConfig.cs
Normal file
128
Cs_HMI/AGVLogic/AGVSimulator/Models/SimulatorConfig.cs
Normal file
@@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AGVSimulator.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 시뮬레이터 환경 설정 클래스
|
||||
/// </summary>
|
||||
public class SimulatorConfig
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// MapEditor 실행 파일 경로
|
||||
/// </summary>
|
||||
public string MapEditorExecutablePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 마지막으로 로드한 맵 파일 경로
|
||||
/// </summary>
|
||||
public string LastMapFilePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 설정 파일 자동 저장 여부
|
||||
/// </summary>
|
||||
public bool AutoSave { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 프로그램 시작시 마지막 맵 파일을 자동으로 로드할지 여부
|
||||
/// </summary>
|
||||
public bool AutoLoadLastMapFile { get; set; } = true;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Static Methods
|
||||
|
||||
/// <summary>
|
||||
/// 설정 파일 기본 경로
|
||||
/// </summary>
|
||||
private static string ConfigFilePath => Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"AGVSimulator",
|
||||
"config.json");
|
||||
|
||||
/// <summary>
|
||||
/// 설정을 파일에서 로드
|
||||
/// </summary>
|
||||
/// <returns>로드된 설정 객체</returns>
|
||||
public static SimulatorConfig Load()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(ConfigFilePath))
|
||||
{
|
||||
var json = File.ReadAllText(ConfigFilePath);
|
||||
return JsonConvert.DeserializeObject<SimulatorConfig>(json) ?? new SimulatorConfig();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"설정 로드 실패: {ex.Message}");
|
||||
}
|
||||
|
||||
return new SimulatorConfig();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 설정을 파일에 저장
|
||||
/// </summary>
|
||||
/// <param name="config">저장할 설정 객체</param>
|
||||
/// <returns>저장 성공 여부</returns>
|
||||
public static bool Save(SimulatorConfig config)
|
||||
{
|
||||
try
|
||||
{
|
||||
var directory = Path.GetDirectoryName(ConfigFilePath);
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
var json = JsonConvert.SerializeObject(config, Formatting.Indented);
|
||||
File.WriteAllText(ConfigFilePath, json);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"설정 저장 실패: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Methods
|
||||
|
||||
/// <summary>
|
||||
/// 현재 설정을 저장
|
||||
/// </summary>
|
||||
/// <returns>저장 성공 여부</returns>
|
||||
public bool Save()
|
||||
{
|
||||
return Save(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapEditor 실행 파일 경로 유효성 확인
|
||||
/// </summary>
|
||||
/// <returns>유효한 경로인지 여부</returns>
|
||||
public bool IsMapEditorPathValid()
|
||||
{
|
||||
return !string.IsNullOrEmpty(MapEditorExecutablePath) &&
|
||||
File.Exists(MapEditorExecutablePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 마지막 맵 파일이 존재하는지 확인
|
||||
/// </summary>
|
||||
/// <returns>마지막 맵 파일이 유효한지 여부</returns>
|
||||
public bool HasValidLastMapFile()
|
||||
{
|
||||
return !string.IsNullOrEmpty(LastMapFilePath) && File.Exists(LastMapFilePath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
561
Cs_HMI/AGVLogic/AGVSimulator/Models/VirtualAGV.cs
Normal file
561
Cs_HMI/AGVLogic/AGVSimulator/Models/VirtualAGV.cs
Normal file
@@ -0,0 +1,561 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Drawing;
|
||||
//using System.Linq;
|
||||
//using AGVMapEditor.Models;
|
||||
//using AGVNavigationCore.Models;
|
||||
//using AGVNavigationCore.PathFinding;
|
||||
//using AGVNavigationCore.PathFinding.Core;
|
||||
//using AGVNavigationCore.Controls;
|
||||
|
||||
//namespace AGVSimulator.Models
|
||||
//{
|
||||
|
||||
// /// <summary>
|
||||
// /// 가상 AGV 클래스
|
||||
// /// 실제 AGV의 동작을 시뮬레이션
|
||||
// /// </summary>
|
||||
// public class VirtualAGV : IAGV
|
||||
// {
|
||||
// #region Events
|
||||
|
||||
// /// <summary>
|
||||
// /// AGV 상태 변경 이벤트
|
||||
// /// </summary>
|
||||
// public event EventHandler<AGVState> StateChanged;
|
||||
|
||||
// /// <summary>
|
||||
// /// 위치 변경 이벤트
|
||||
// /// </summary>
|
||||
// public event EventHandler<(Point, AgvDirection, MapNode)> PositionChanged;
|
||||
|
||||
// /// <summary>
|
||||
// /// RFID 감지 이벤트
|
||||
// /// </summary>
|
||||
// public event EventHandler<string> RfidDetected;
|
||||
|
||||
// /// <summary>
|
||||
// /// 경로 완료 이벤트
|
||||
// /// </summary>
|
||||
// public event EventHandler<AGVPathResult> PathCompleted;
|
||||
|
||||
// /// <summary>
|
||||
// /// 오류 발생 이벤트
|
||||
// /// </summary>
|
||||
// public event EventHandler<string> ErrorOccurred;
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Fields
|
||||
|
||||
// private string _agvId;
|
||||
// private Point _currentPosition;
|
||||
// private Point _targetPosition;
|
||||
// private string _targetId;
|
||||
// private string _currentId;
|
||||
// private AgvDirection _currentDirection;
|
||||
// private AgvDirection _targetDirection;
|
||||
// private AGVState _currentState;
|
||||
// private float _currentSpeed;
|
||||
|
||||
// // 경로 관련
|
||||
// private AGVPathResult _currentPath;
|
||||
// private List<string> _remainingNodes;
|
||||
// private int _currentNodeIndex;
|
||||
// private MapNode _currentNode;
|
||||
// private MapNode _targetNode;
|
||||
|
||||
// // 이동 관련
|
||||
// private System.Windows.Forms.Timer _moveTimer;
|
||||
// private DateTime _lastMoveTime;
|
||||
// private Point _moveStartPosition;
|
||||
// private Point _moveTargetPosition;
|
||||
// private float _moveProgress;
|
||||
|
||||
// // 도킹 관련
|
||||
// private DockingDirection _dockingDirection;
|
||||
|
||||
// // 시뮬레이션 설정
|
||||
// private readonly float _moveSpeed = 50.0f; // 픽셀/초
|
||||
// private readonly float _rotationSpeed = 90.0f; // 도/초
|
||||
// private readonly int _updateInterval = 50; // ms
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Properties
|
||||
|
||||
// /// <summary>
|
||||
// /// AGV ID
|
||||
// /// </summary>
|
||||
// public string AgvId => _agvId;
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 위치
|
||||
// /// </summary>
|
||||
// public Point CurrentPosition
|
||||
// {
|
||||
// get => _currentPosition;
|
||||
// set => _currentPosition = value;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 방향
|
||||
// /// 모터의 동작 방향
|
||||
// /// </summary>
|
||||
// public AgvDirection CurrentDirection
|
||||
// {
|
||||
// get => _currentDirection;
|
||||
// set => _currentDirection = value;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 상태
|
||||
// /// </summary>
|
||||
// public AGVState CurrentState
|
||||
// {
|
||||
// get => _currentState;
|
||||
// set => _currentState = value;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 속도
|
||||
// /// </summary>
|
||||
// public float CurrentSpeed => _currentSpeed;
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 경로
|
||||
// /// </summary>
|
||||
// public AGVPathResult CurrentPath => _currentPath;
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 노드 ID
|
||||
// /// </summary>
|
||||
// public string CurrentNodeId => _currentNode.NodeId;
|
||||
|
||||
// /// <summary>
|
||||
// /// 목표 위치
|
||||
// /// </summary>
|
||||
// public Point? TargetPosition => _targetPosition;
|
||||
|
||||
// /// <summary>
|
||||
// /// 배터리 레벨 (시뮬레이션)
|
||||
// /// </summary>
|
||||
// public float BatteryLevel { get; set; } = 100.0f;
|
||||
|
||||
// /// <summary>
|
||||
// /// 목표 노드 ID
|
||||
// /// </summary>
|
||||
// public string TargetNodeId => _targetNode.NodeId;
|
||||
|
||||
// /// <summary>
|
||||
// /// 도킹 방향
|
||||
// /// </summary>
|
||||
// public DockingDirection DockingDirection => _dockingDirection;
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Constructor
|
||||
|
||||
// /// <summary>
|
||||
// /// 생성자
|
||||
// /// </summary>
|
||||
// /// <param name="agvId">AGV ID</param>
|
||||
// /// <param name="startPosition">시작 위치</param>
|
||||
// /// <param name="startDirection">시작 방향</param>
|
||||
// public VirtualAGV(string agvId, Point startPosition, AgvDirection startDirection = AgvDirection.Forward)
|
||||
// {
|
||||
// _agvId = agvId;
|
||||
// _currentPosition = startPosition;
|
||||
// _currentDirection = startDirection;
|
||||
// _currentState = AGVState.Idle;
|
||||
// _currentSpeed = 0;
|
||||
// _dockingDirection = DockingDirection.Forward; // 기본값: 전진 도킹
|
||||
// _currentNode = null; // = string.Empty;
|
||||
// _targetNode = null;// string.Empty;
|
||||
|
||||
// InitializeTimer();
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Initialization
|
||||
|
||||
// private void InitializeTimer()
|
||||
// {
|
||||
// _moveTimer = new System.Windows.Forms.Timer();
|
||||
// _moveTimer.Interval = _updateInterval;
|
||||
// _moveTimer.Tick += OnMoveTimer_Tick;
|
||||
// _lastMoveTime = DateTime.Now;
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Public Methods
|
||||
|
||||
// /// <summary>
|
||||
// /// 경로 실행 시작
|
||||
// /// </summary>
|
||||
// /// <param name="path">실행할 경로</param>
|
||||
// /// <param name="mapNodes">맵 노드 목록</param>
|
||||
// public void StartPath(AGVPathResult path, List<MapNode> mapNodes)
|
||||
// {
|
||||
// if (path == null || !path.Success)
|
||||
// {
|
||||
// OnError("유효하지 않은 경로입니다.");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// _currentPath = path;
|
||||
// _remainingNodes = new List<string>(path.Path);
|
||||
// _currentNodeIndex = 0;
|
||||
|
||||
// // 시작 노드와 목표 노드 설정
|
||||
// if (_remainingNodes.Count > 0)
|
||||
// {
|
||||
// var startNode = mapNodes.FirstOrDefault(n => n.NodeId == _remainingNodes[0]);
|
||||
// if (startNode != null)
|
||||
// {
|
||||
// _currentNode = startNode;
|
||||
|
||||
// // 목표 노드 설정 (경로의 마지막 노드)
|
||||
// if (_remainingNodes.Count > 1)
|
||||
// {
|
||||
// var _targetNodeId = _remainingNodes[_remainingNodes.Count - 1];
|
||||
// var targetNode = mapNodes.FirstOrDefault(n => n.NodeId == _targetNodeId);
|
||||
|
||||
// // 목표 노드의 타입에 따라 도킹 방향 결정
|
||||
// if (targetNode != null)
|
||||
// {
|
||||
// _dockingDirection = GetDockingDirection(targetNode.Type);
|
||||
// }
|
||||
// }
|
||||
|
||||
// StartMovement();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// OnError($"시작 노드를 찾을 수 없습니다: {_remainingNodes[0]}");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 경로 정지
|
||||
// /// </summary>
|
||||
// public void StopPath()
|
||||
// {
|
||||
// _moveTimer.Stop();
|
||||
// _currentPath = null;
|
||||
// _remainingNodes?.Clear();
|
||||
// SetState(AGVState.Idle);
|
||||
// _currentSpeed = 0;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 긴급 정지
|
||||
// /// </summary>
|
||||
// public void EmergencyStop()
|
||||
// {
|
||||
// StopPath();
|
||||
// OnError("긴급 정지가 실행되었습니다.");
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 수동 이동 (테스트용)
|
||||
// /// </summary>
|
||||
// /// <param name="targetPosition">목표 위치</param>
|
||||
// public void MoveTo(Point targetPosition)
|
||||
// {
|
||||
// _targetPosition = targetPosition;
|
||||
// _moveStartPosition = _currentPosition;
|
||||
// _moveTargetPosition = targetPosition;
|
||||
// _moveProgress = 0;
|
||||
|
||||
// SetState(AGVState.Moving);
|
||||
// _moveTimer.Start();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 수동 회전 (테스트용)
|
||||
// /// </summary>
|
||||
// /// <param name="direction">회전 방향</param>
|
||||
// public void Rotate(AgvDirection direction)
|
||||
// {
|
||||
// if (_currentState != AGVState.Idle)
|
||||
// return;
|
||||
|
||||
// SetState(AGVState.Rotating);
|
||||
|
||||
// // 시뮬레이션: 즉시 방향 변경 (실제로는 시간이 걸림)
|
||||
// _currentDirection = direction;
|
||||
|
||||
// System.Threading.Thread.Sleep(500); // 회전 시간 시뮬레이션
|
||||
// SetState(AGVState.Idle);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// AGV 위치 직접 설정 (시뮬레이터용)
|
||||
// /// TargetPosition을 이전 위치로 저장하여 리프트 방향 계산이 가능하도록 함
|
||||
// /// </summary>
|
||||
// /// <param name="newPosition">새로운 위치</param>
|
||||
// /// <param name="motorDirection">모터이동방향</param>
|
||||
// public void SetPosition(MapNode node, Point newPosition, AgvDirection motorDirection)
|
||||
// {
|
||||
// // 현재 위치를 이전 위치로 저장 (리프트 방향 계산용)
|
||||
// if (_currentPosition != Point.Empty)
|
||||
// {
|
||||
// _targetPosition = _currentPosition; // 이전 위치 (previousPos 역할)
|
||||
// _targetDirection = _currentDirection;
|
||||
// _targetNode = node;
|
||||
// }
|
||||
|
||||
// // 새로운 위치 설정
|
||||
// _currentPosition = newPosition;
|
||||
// _currentDirection = motorDirection;
|
||||
// _currentNode = node;
|
||||
|
||||
// // 위치 변경 이벤트 발생
|
||||
// PositionChanged?.Invoke(this, (_currentPosition, _currentDirection, _currentNode));
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 충전 시작 (시뮬레이션)
|
||||
// /// </summary>
|
||||
// public void StartCharging()
|
||||
// {
|
||||
// if (_currentState == AGVState.Idle)
|
||||
// {
|
||||
// SetState(AGVState.Charging);
|
||||
// // 충전 시뮬레이션 시작
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 충전 종료
|
||||
// /// </summary>
|
||||
// public void StopCharging()
|
||||
// {
|
||||
// if (_currentState == AGVState.Charging)
|
||||
// {
|
||||
// SetState(AGVState.Idle);
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// AGV 정보 조회
|
||||
// /// </summary>
|
||||
// public string GetStatus()
|
||||
// {
|
||||
// return $"AGV[{_agvId}] 위치:({_currentPosition.X},{_currentPosition.Y}) " +
|
||||
// $"방향:{_currentDirection} 상태:{_currentState} " +
|
||||
// $"속도:{_currentSpeed:F1} 배터리:{BatteryLevel:F1}%";
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 현재 RFID 시뮬레이션 (현재 위치 기준)
|
||||
// /// </summary>
|
||||
// public string SimulateRfidReading(List<MapNode> mapNodes)
|
||||
// {
|
||||
// // 현재 위치에서 가장 가까운 노드 찾기
|
||||
// var closestNode = FindClosestNode(_currentPosition, mapNodes);
|
||||
// if (closestNode == null)
|
||||
// return null;
|
||||
|
||||
// // 해당 노드의 RFID 정보 반환 (MapNode에 RFID 정보 포함)
|
||||
// return closestNode.HasRfid() ? closestNode.RfidId : null;
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Private Methods
|
||||
|
||||
// private void StartMovement()
|
||||
// {
|
||||
// SetState(AGVState.Moving);
|
||||
// _moveTimer.Start();
|
||||
// _lastMoveTime = DateTime.Now;
|
||||
// }
|
||||
|
||||
// private void OnMoveTimer_Tick(object sender, EventArgs e)
|
||||
// {
|
||||
// var now = DateTime.Now;
|
||||
// var deltaTime = (float)(now - _lastMoveTime).TotalSeconds;
|
||||
// _lastMoveTime = now;
|
||||
|
||||
// UpdateMovement(deltaTime);
|
||||
// UpdateBattery(deltaTime);
|
||||
|
||||
// // 위치 변경 이벤트 발생
|
||||
// PositionChanged?.Invoke(this, (_currentPosition, _currentDirection, _currentNode));
|
||||
// }
|
||||
|
||||
// private void UpdateMovement(float deltaTime)
|
||||
// {
|
||||
// if (_currentState != AGVState.Moving)
|
||||
// return;
|
||||
|
||||
// // 목표 위치까지의 거리 계산
|
||||
// var distance = CalculateDistance(_currentPosition, _moveTargetPosition);
|
||||
|
||||
// if (distance < 5.0f) // 도달 임계값
|
||||
// {
|
||||
// // 목표 도달
|
||||
// _currentPosition = _moveTargetPosition;
|
||||
// _currentSpeed = 0;
|
||||
|
||||
// // 다음 노드로 이동
|
||||
// ProcessNextNode();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // 계속 이동
|
||||
// var moveDistance = _moveSpeed * deltaTime;
|
||||
// var direction = new PointF(
|
||||
// _moveTargetPosition.X - _currentPosition.X,
|
||||
// _moveTargetPosition.Y - _currentPosition.Y
|
||||
// );
|
||||
|
||||
// // 정규화
|
||||
// var length = (float)Math.Sqrt(direction.X * direction.X + direction.Y * direction.Y);
|
||||
// if (length > 0)
|
||||
// {
|
||||
// direction.X /= length;
|
||||
// direction.Y /= length;
|
||||
// }
|
||||
|
||||
// // 새 위치 계산
|
||||
// _currentPosition = new Point(
|
||||
// (int)(_currentPosition.X + direction.X * moveDistance),
|
||||
// (int)(_currentPosition.Y + direction.Y * moveDistance)
|
||||
// );
|
||||
|
||||
// _currentSpeed = _moveSpeed;
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void UpdateBattery(float deltaTime)
|
||||
// {
|
||||
// // 배터리 소모 시뮬레이션
|
||||
// if (_currentState == AGVState.Moving)
|
||||
// {
|
||||
// BatteryLevel -= 0.1f * deltaTime; // 이동시 소모
|
||||
// }
|
||||
// else if (_currentState == AGVState.Charging)
|
||||
// {
|
||||
// BatteryLevel += 5.0f * deltaTime; // 충전
|
||||
// BatteryLevel = Math.Min(100.0f, BatteryLevel);
|
||||
// }
|
||||
|
||||
// BatteryLevel = Math.Max(0, BatteryLevel);
|
||||
|
||||
// // 배터리 부족 경고
|
||||
// if (BatteryLevel < 20.0f && _currentState != AGVState.Charging)
|
||||
// {
|
||||
// OnError($"배터리 부족: {BatteryLevel:F1}%");
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void ProcessNextNode()
|
||||
// {
|
||||
// if (_remainingNodes == null || _currentNodeIndex >= _remainingNodes.Count - 1)
|
||||
// {
|
||||
// // 경로 완료
|
||||
// _moveTimer.Stop();
|
||||
// SetState(AGVState.Idle);
|
||||
// PathCompleted?.Invoke(this, _currentPath);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // 다음 노드로 이동
|
||||
// _currentNodeIndex++;
|
||||
// var nextNodeId = _remainingNodes[_currentNodeIndex];
|
||||
|
||||
// // RFID 감지 시뮬레이션
|
||||
// RfidDetected?.Invoke(this, $"RFID_{nextNodeId}");
|
||||
// //_currentNodeId = nextNodeId;
|
||||
|
||||
// // 다음 목표 위치 설정 (실제로는 맵에서 좌표 가져와야 함)
|
||||
// // 여기서는 간단히 현재 위치에서 랜덤 오프셋으로 설정
|
||||
// var random = new Random();
|
||||
// _moveTargetPosition = new Point(
|
||||
// _currentPosition.X + random.Next(-100, 100),
|
||||
// _currentPosition.Y + random.Next(-100, 100)
|
||||
// );
|
||||
// }
|
||||
|
||||
// private MapNode FindClosestNode(Point position, List<MapNode> mapNodes)
|
||||
// {
|
||||
// if (mapNodes == null || mapNodes.Count == 0)
|
||||
// return null;
|
||||
|
||||
// MapNode closestNode = null;
|
||||
// float closestDistance = float.MaxValue;
|
||||
|
||||
// foreach (var node in mapNodes)
|
||||
// {
|
||||
// var distance = CalculateDistance(position, node.Position);
|
||||
// if (distance < closestDistance)
|
||||
// {
|
||||
// closestDistance = distance;
|
||||
// closestNode = node;
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 일정 거리 내에 있는 노드만 반환
|
||||
// return closestDistance < 50.0f ? closestNode : null;
|
||||
// }
|
||||
|
||||
// private float CalculateDistance(Point from, Point to)
|
||||
// {
|
||||
// var dx = to.X - from.X;
|
||||
// var dy = to.Y - from.Y;
|
||||
// return (float)Math.Sqrt(dx * dx + dy * dy);
|
||||
// }
|
||||
|
||||
// private void SetState(AGVState newState)
|
||||
// {
|
||||
// if (_currentState != newState)
|
||||
// {
|
||||
// _currentState = newState;
|
||||
// StateChanged?.Invoke(this, newState);
|
||||
// }
|
||||
// }
|
||||
|
||||
// private DockingDirection GetDockingDirection(NodeType nodeType)
|
||||
// {
|
||||
// switch (nodeType)
|
||||
// {
|
||||
// case NodeType.Charging:
|
||||
// return DockingDirection.Forward; // 충전기: 전진 도킹
|
||||
// case NodeType.Docking:
|
||||
// return DockingDirection.Backward; // 장비 (로더, 클리너, 오프로더, 버퍼): 후진 도킹
|
||||
// default:
|
||||
// return DockingDirection.Forward; // 기본값: 전진
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void OnError(string message)
|
||||
// {
|
||||
// SetState(AGVState.Error);
|
||||
// ErrorOccurred?.Invoke(this, message);
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Cleanup
|
||||
|
||||
// /// <summary>
|
||||
// /// 리소스 정리
|
||||
// /// </summary>
|
||||
// public void Dispose()
|
||||
// {
|
||||
// _moveTimer?.Stop();
|
||||
// _moveTimer?.Dispose();
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
// }
|
||||
//}
|
||||
44
Cs_HMI/AGVLogic/AGVSimulator/Program.cs
Normal file
44
Cs_HMI/AGVLogic/AGVSimulator/Program.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using AGVSimulator.Forms;
|
||||
|
||||
namespace AGVSimulator
|
||||
{
|
||||
/// <summary>
|
||||
/// AGV 시뮬레이터 프로그램 진입점
|
||||
/// </summary>
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 콘솔 출력 (타임스탬프 포함)
|
||||
/// </summary>
|
||||
public static void WriteLine(string message)
|
||||
{
|
||||
string timestampedMessage = $"[{DateTime.Now:HH:mm:ss.fff}] {message}";
|
||||
Console.WriteLine(timestampedMessage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 애플리케이션의 주 진입점입니다.
|
||||
/// </summary>
|
||||
/// <param name="args">명령줄 인수</param>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new SimulatorForm());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[ERROR] 시뮬레이터 실행 중 오류: {ex.Message}");
|
||||
Console.WriteLine($"[ERROR] 스택 트레이스: {ex.StackTrace}");
|
||||
|
||||
MessageBox.Show($"시뮬레이터 실행 중 오류가 발생했습니다:\n{ex.Message}",
|
||||
"시스템 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Cs_HMI/AGVLogic/AGVSimulator/Properties/AssemblyInfo.cs
Normal file
36
Cs_HMI/AGVLogic/AGVSimulator/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("AGV Simulator")]
|
||||
[assembly: AssemblyDescription("ENIG AGV System Simulator")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ENIG")]
|
||||
[assembly: AssemblyProduct("AGV HMI System")]
|
||||
[assembly: AssemblyCopyright("Copyright © ENIG 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("b2c3d4e5-f6a7-4901-bcde-f23456789012")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 개의 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
29
Cs_HMI/AGVLogic/AGVSimulator/build.bat
Normal file
29
Cs_HMI/AGVLogic/AGVSimulator/build.bat
Normal file
@@ -0,0 +1,29 @@
|
||||
@echo off
|
||||
echo Building V2GDecoder VC++ Project...
|
||||
|
||||
REM Check if Visual Studio 2022 is installed (Professional or Community)
|
||||
set MSBUILD_PRO="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
||||
set MSBUILD_COM="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
|
||||
set MSBUILD_BT="F:\(VHD) Program Files\Microsoft Visual Studio\2022\MSBuild\Current\Bin\MSBuild.exe"
|
||||
|
||||
if exist %MSBUILD_PRO% (
|
||||
echo "Found Visual Studio 2022 Professional"
|
||||
set MSBUILD=%MSBUILD_PRO%
|
||||
) else if exist %MSBUILD_COM% (
|
||||
echo "Found Visual Studio 2022 Community"
|
||||
set MSBUILD=%MSBUILD_COM%
|
||||
) else if exist %MSBUILD_BT% (
|
||||
echo "Found Visual Studio 2022 BuildTools"
|
||||
set MSBUILD=%MSBUILD_BT%
|
||||
) else (
|
||||
echo "Visual Studio 2022 (Professional or Community) not found!"
|
||||
echo "Please install Visual Studio 2022 or update the MSBuild path."
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Build Debug x64 configuration
|
||||
echo Building Debug x64 configuration...
|
||||
%MSBUILD% AGVSimulator.csproj
|
||||
|
||||
pause
|
||||
4
Cs_HMI/AGVLogic/AGVSimulator/packages.config
Normal file
4
Cs_HMI/AGVLogic/AGVSimulator/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user