..
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)
|
||||
{
|
||||
|
||||
@@ -140,9 +140,17 @@ namespace AGVNavigationCore.Controls
|
||||
|
||||
string _systemmesage = "";
|
||||
string _infomessage = "";
|
||||
string _tagignoreMessage = "";
|
||||
bool showalertsystem = false;
|
||||
bool showinfo = false;
|
||||
|
||||
bool showtagigreno = false;
|
||||
DateTime tagignoretime = DateTime.Now;
|
||||
public void SetTagIgnore(string m)
|
||||
{
|
||||
_tagignoreMessage = m;
|
||||
tagignoretime = DateTime.Now;
|
||||
showtagigreno = !string.IsNullOrEmpty(m);
|
||||
}
|
||||
public void SetInfoMessage(string m)
|
||||
{
|
||||
_infomessage = m;
|
||||
|
||||
@@ -503,6 +503,11 @@ namespace AGVNavigationCore.PathFinding.Planning
|
||||
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
|
||||
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "11B", "3T", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
|
||||
|
||||
//일반노드도 일부 경로를 계산한다.
|
||||
// 일반노드 3 ->
|
||||
|
||||
// 일반노드 7 ->
|
||||
|
||||
return retval;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -568,6 +573,14 @@ namespace AGVNavigationCore.PathFinding.Planning
|
||||
IEnumerable<MapZonePathData> candidates;
|
||||
// 목적지가 현재 위치와 동일한 경우 처리
|
||||
|
||||
//시작이 일반노드라면 , 경로가 등록된 주변 노드로 이동해서 이후경로를 계산하자
|
||||
//일반노드용 기준은 7,3이있다.
|
||||
//11번은 7로 이동해서 경로를 계산한다.
|
||||
//10,6번은 7로 이동해서 경로를 계산한다.
|
||||
//대상노드까지 CalculateScriptedPath를 재귀로 호출해서 계산을 완료한 후, 대상에서 목적지계산해서 전체 경로를 만들어낸다.
|
||||
|
||||
|
||||
|
||||
|
||||
// 시작Zone과 목표Zone이 다른 경우에만 하드코딩된 zonepath 검색
|
||||
if (startZone != targetZone)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
||||
Reference in New Issue
Block a user