..
This commit is contained in:
@@ -106,6 +106,7 @@ namespace AGVNavigationCore.Controls
|
||||
}
|
||||
DrawSystemMessage(g);
|
||||
DrawAlertMessage(g);
|
||||
DrawTagIgnoreMessage(g);
|
||||
|
||||
}
|
||||
|
||||
@@ -313,6 +314,61 @@ namespace AGVNavigationCore.Controls
|
||||
g.FillEllipse(brush, iconX - 2, iconY + 10, 4, 4); // dot
|
||||
}
|
||||
|
||||
}
|
||||
void DrawTagIgnoreMessage(Graphics g)
|
||||
{
|
||||
if (!showtagigreno || String.IsNullOrEmpty(this._tagignoreMessage)) return;
|
||||
var ts = DateTime.Now - tagignoretime;
|
||||
if (ts.TotalSeconds > 5) return;
|
||||
|
||||
// 상단 중앙에 반투명 빨간색 배경 바 표시
|
||||
int barHeight = 40;
|
||||
int barWidth = Math.Min(600, this.Width - 40); // 최대 600px, 좌우 여백 20px
|
||||
int barX = (this.Width - barWidth) / 2;
|
||||
int barY = this.Height - barHeight-20;
|
||||
|
||||
// 둥근 사각형 배경
|
||||
using (var path = new GraphicsPath())
|
||||
{
|
||||
int radius = 10;
|
||||
path.AddArc(barX, barY, radius * 2, radius * 2, 180, 90);
|
||||
path.AddArc(barX + barWidth - radius * 2, barY, radius * 2, radius * 2, 270, 90);
|
||||
path.AddArc(barX + barWidth - radius * 2, barY + barHeight - radius * 2, radius * 2, radius * 2, 0, 90);
|
||||
path.AddArc(barX, barY + barHeight - radius * 2, radius * 2, radius * 2, 90, 90);
|
||||
path.CloseFigure();
|
||||
|
||||
using (var brush = new SolidBrush(Color.FromArgb(255, Color.Violet)))
|
||||
{
|
||||
g.FillPath(brush, path);
|
||||
}
|
||||
|
||||
using (var pen = new Pen(Color.FromArgb(255, 255, 255), 2))
|
||||
{
|
||||
g.DrawPath(pen, path);
|
||||
}
|
||||
}
|
||||
|
||||
// 텍스트 깜박임 효과 (배경은 유지하고 텍스트만 깜박임)
|
||||
|
||||
using (var font = new Font("Malgun Gothic", 12, FontStyle.Bold))
|
||||
using (var brush = new SolidBrush(Color.Black))
|
||||
{
|
||||
var textSize = g.MeasureString(_tagignoreMessage, font);
|
||||
g.DrawString(_tagignoreMessage, font, brush,
|
||||
barX + (barWidth - textSize.Width) / 2,
|
||||
barY + (barHeight - textSize.Height) / 2);
|
||||
}
|
||||
|
||||
// 경고 아이콘 그리기 (왼쪽)
|
||||
// 간단한 느낌표 아이콘
|
||||
int iconX = barX + 15;
|
||||
int iconY = barY + barHeight / 2;
|
||||
using (var brush = new SolidBrush(Color.Black))
|
||||
{
|
||||
g.FillEllipse(brush, iconX - 2, iconY - 8, 4, 16); // body
|
||||
g.FillEllipse(brush, iconX - 2, iconY + 10, 4, 4); // dot
|
||||
}
|
||||
|
||||
}
|
||||
private void DrawSyncScreen(Graphics g)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user