compile ok .ㅠㅠ

This commit is contained in:
chi
2025-05-26 10:21:17 +09:00
parent 57dc6de740
commit 77a6aefb44
27 changed files with 780 additions and 204 deletions

View File

@@ -0,0 +1,37 @@
namespace AGVControl
{
partial class MapControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ClientSize = new System.Drawing.Size(800, 450);
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,120 @@
<?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>
</root>

View File

@@ -0,0 +1,70 @@
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
namespace AGVControl.Models
{
public class AGV
{
public Point CurrentPosition { get; set; }
public string CurrentRFID { get; set; }
public Direction CurrentDirection { get; set; }
public bool IsMoving { get; set; }
public List<Point> CurrentPath { get; set; }
public List<Point> PlannedPath { get; set; }
public List<string> PathRFIDs { get; set; }
public AGV()
{
CurrentPath = new List<Point>();
PlannedPath = new List<Point>();
PathRFIDs = new List<string>();
CurrentDirection = Direction.Forward;
}
public void Move()
{
if (CurrentPath.Count > 0)
{
CurrentPosition = CurrentPath[0];
CurrentPath.RemoveAt(0);
}
}
public void SetNewPath(List<Point> path)
{
CurrentPath = new List<Point>(path);
}
public void ClearPlannedPath()
{
PlannedPath.Clear();
PathRFIDs.Clear();
}
}
public enum Direction
{
Forward,
Backward
}
public class PathNode
{
public Point Location { get; set; }
public string RFID { get; set; }
public double G { get; set; } // 시작점에서 현재 노드까지의 비용
public double H { get; set; } // 현재 노드에서 목표점까지의 예상 비용
public double F => G + H; // 총 비용
public PathNode Parent { get; set; }
public PathNode(Point location, string rfid)
{
Location = location;
RFID = rfid;
G = 0;
H = 0;
Parent = null;
}
}
}

View File

@@ -0,0 +1,14 @@
using System.Drawing;
using System;
namespace AGVControl.Models
{
public class CustomLine
{
public Point StartPoint { get; set; }
public Point EndPoint { get; set; }
public Color LineColor { get; set; }
public int LineWidth { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class MagnetLine
{
public Point StartPoint { get; set; }
public Point EndPoint { get; set; }
public List<Point> BranchPoints { get; set; }
public Dictionary<Point, BranchDirection> BranchDirections { get; set; }
public MagnetLine()
{
BranchPoints = new List<Point>();
BranchDirections = new Dictionary<Point, BranchDirection>();
}
}
}

View File

@@ -0,0 +1,14 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class MapData
{
public List<RFIDPoint> RFIDPoints { get; set; } = new List<RFIDPoint>();
public List<MagnetLine> MagnetLines { get; set; } = new List<MagnetLine>();
public List<MapText> MapTexts { get; set; } = new List<MapText>();
public List<CustomLine> CustomLines { get; set; } = new List<CustomLine>();
public List<RFIDLine> RFIDLines { get; set; } = new List<RFIDLine>();
}
}

View File

@@ -0,0 +1,13 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public enum BranchDirection
{
Left,
Straight,
Right
}
}

View File

@@ -0,0 +1,14 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class MapText
{
public Point Location { get; set; }
public string Text { get; set; }
public Color TextColor { get; set; }
public Color BackgroundColor { get; set; }
public Font Font { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class RFIDLine
{
public Point StartPoint { get; set; }
public Point EndPoint { get; set; }
public string StartRFID { get; set; }
public string EndRFID { get; set; }
public bool IsBidirectional { get; set; } = true; // 양방향 이동 가능 여부
public float Distance { get; set; } // 두 RFID 포인트 사이의 거리
public List<string> ConnectedRFIDs { get; set; } = new List<string>(); // 연결된 모든 RFID 값들
public Dictionary<string, string> NextRFID { get; set; } = new Dictionary<string, string>(); // 각 RFID의 다음 RFID
public Dictionary<string, string> PrevRFID { get; set; } = new Dictionary<string, string>(); // 각 RFID의 이전 RFID
}
}

View File

@@ -0,0 +1,13 @@
using System.Drawing;
using System;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class RFIDPoint
{
public Point Location { get; set; }
public string RFIDValue { get; set; }
public string NextRFID { get; set; } // 다음 RFID 포인트의 값
public bool IsBidirectional { get; set; } // 양방향 연결 여부
}
}

View File

@@ -0,0 +1,34 @@
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
namespace AGVControl.Models
{
public class ToolBarItem
{
private bool _ishovering = false;
public int Idx { get; set; }
public Rectangle Bounds { get; set; }
public bool isHovering
{
get { return _ishovering; }
set
{
Dirty = _ishovering != value;
_ishovering = value;
}
}
public string Title { get; set; }
public bool Dirty { get; private set; }
public ToolBarItem()
{
Bounds = Rectangle.Empty;
}
}
}

View File

@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AGVControl</RootNamespace>
<AssemblyName>AGVControl</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
@@ -57,6 +57,21 @@
<Compile Include="GuideSensor.Designer.cs">
<DependentUpon>GuideSensor.cs</DependentUpon>
</Compile>
<Compile Include="MapControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MapControl.Designer.cs">
<DependentUpon>MapControl.cs</DependentUpon>
</Compile>
<Compile Include="Models\AGV.cs" />
<Compile Include="Models\CustomLine.cs" />
<Compile Include="Models\MagnetLine.cs" />
<Compile Include="Models\MapData.cs" />
<Compile Include="Models\MapElements.cs" />
<Compile Include="Models\MapText.cs" />
<Compile Include="Models\RFIDLine.cs" />
<Compile Include="Models\RFIDPoint.cs" />
<Compile Include="Models\ToolBarItem.cs" />
<Compile Include="MyRadioButton.cs">
<SubType>Component</SubType>
</Compile>
@@ -77,5 +92,16 @@
<DependentUpon>ValueSelect.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MapControl.resx">
<DependentUpon>MapControl.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommUtil\arCommUtil.csproj">
<Project>{14e8c9a5-013e-49ba-b435-ffffff7dd623}</Project>
<Name>arCommUtil</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>