Files
ENIG/Cs_HMI/AGVMapEditor/Models/MapLabel.cs
ChiKyun Kim de0e39e030 refactor: Consolidate RFID mapping and add bidirectional pathfinding
Major improvements to AGV navigation system:

• Consolidated RFID management into MapNode, removing duplicate RfidMapping class
• Enhanced MapNode with RFID metadata fields (RfidStatus, RfidDescription)
• Added automatic bidirectional connection generation in pathfinding algorithms
• Updated all components to use unified MapNode-based RFID system
• Added command line argument support for AGVMapEditor auto-loading files
• Fixed pathfinding failures by ensuring proper node connectivity

Technical changes:
- Removed RfidMapping class and dependencies across all projects
- Updated AStarPathfinder with EnsureBidirectionalConnections() method
- Modified MapLoader to use AssignAutoRfidIds() for RFID automation
- Enhanced UnifiedAGVCanvas, SimulatorForm, and MainForm for MapNode integration
- Improved data consistency and reduced memory footprint

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 16:41:52 +09:00

125 lines
3.3 KiB
C#

using System;
using System.Drawing;
namespace AGVMapEditor.Models
{
/// <summary>
/// 맵 라벨 정보를 관리하는 클래스
/// 디자인 요소용 텍스트 라벨
/// </summary>
public class MapLabel
{
/// <summary>
/// 라벨 고유 ID
/// </summary>
public string LabelId { get; set; } = string.Empty;
/// <summary>
/// 라벨 텍스트
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// 맵 상의 위치 좌표
/// </summary>
public Point Position { get; set; } = Point.Empty;
/// <summary>
/// 폰트 정보
/// </summary>
public string FontFamily { get; set; } = "Arial";
/// <summary>
/// 폰트 크기
/// </summary>
public float FontSize { get; set; } = 12;
/// <summary>
/// 폰트 스타일 (Bold, Italic 등)
/// </summary>
public FontStyle FontStyle { get; set; } = FontStyle.Regular;
/// <summary>
/// 글자 색상
/// </summary>
public Color ForeColor { get; set; } = Color.Black;
/// <summary>
/// 배경 색상
/// </summary>
public Color BackColor { get; set; } = Color.Transparent;
/// <summary>
/// 배경 표시 여부
/// </summary>
public bool ShowBackground { get; set; } = false;
/// <summary>
/// 라벨 생성 일자
/// </summary>
public DateTime CreatedDate { get; set; } = DateTime.Now;
/// <summary>
/// 라벨 수정 일자
/// </summary>
public DateTime ModifiedDate { get; set; } = DateTime.Now;
/// <summary>
/// 라벨 활성화 여부
/// </summary>
public bool IsActive { get; set; } = true;
/// <summary>
/// 기본 생성자
/// </summary>
public MapLabel()
{
}
/// <summary>
/// 매개변수 생성자
/// </summary>
/// <param name="labelId">라벨 ID</param>
/// <param name="text">라벨 텍스트</param>
/// <param name="position">위치</param>
public MapLabel(string labelId, string text, Point position)
{
LabelId = labelId;
Text = text;
Position = position;
CreatedDate = DateTime.Now;
ModifiedDate = DateTime.Now;
}
/// <summary>
/// 문자열 표현
/// </summary>
public override string ToString()
{
return $"{LabelId}: {Text} at ({Position.X}, {Position.Y})";
}
/// <summary>
/// 라벨 복사
/// </summary>
/// <returns>복사된 라벨</returns>
public MapLabel Clone()
{
return new MapLabel
{
LabelId = LabelId,
Text = Text,
Position = Position,
FontFamily = FontFamily,
FontSize = FontSize,
FontStyle = FontStyle,
ForeColor = ForeColor,
BackColor = BackColor,
ShowBackground = ShowBackground,
CreatedDate = CreatedDate,
ModifiedDate = ModifiedDate,
IsActive = IsActive
};
}
}
}