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