시뮬레이터에서 맵 로드시에 맵에 배경색이 있다면 적용 하게 함
Xbee Open 시에 return값 변경 return true -> return isopen LogFlushAll 함수추가 (_step_close 에서 사용)
This commit is contained in:
@@ -118,6 +118,8 @@ namespace AGVSimulator.Forms
|
||||
this._liftDirectionLabel = new System.Windows.Forms.Label();
|
||||
this._motorDirectionLabel = new System.Windows.Forms.Label();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.propertyNode = new System.Windows.Forms.PropertyGrid();
|
||||
this._menuStrip.SuspendLayout();
|
||||
this._toolStrip.SuspendLayout();
|
||||
this._statusStrip.SuspendLayout();
|
||||
@@ -127,6 +129,7 @@ namespace AGVSimulator.Forms
|
||||
this._agvControlGroup.SuspendLayout();
|
||||
this._canvasPanel.SuspendLayout();
|
||||
this._agvInfoPanel.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// _menuStrip
|
||||
@@ -455,6 +458,7 @@ namespace AGVSimulator.Forms
|
||||
// _controlPanel
|
||||
//
|
||||
this._controlPanel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this._controlPanel.Controls.Add(this.groupBox1);
|
||||
this._controlPanel.Controls.Add(this._statusGroup);
|
||||
this._controlPanel.Controls.Add(this._pathGroup);
|
||||
this._controlPanel.Controls.Add(this._agvControlGroup);
|
||||
@@ -789,6 +793,25 @@ namespace AGVSimulator.Forms
|
||||
this.timer1.Interval = 500;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.propertyNode);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 546);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(233, 94);
|
||||
this.groupBox1.TabIndex = 4;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "노드 정보";
|
||||
//
|
||||
// propertyNode
|
||||
//
|
||||
this.propertyNode.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.propertyNode.Location = new System.Drawing.Point(3, 17);
|
||||
this.propertyNode.Name = "propertyNode";
|
||||
this.propertyNode.Size = new System.Drawing.Size(227, 74);
|
||||
this.propertyNode.TabIndex = 0;
|
||||
//
|
||||
// SimulatorForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -821,6 +844,7 @@ namespace AGVSimulator.Forms
|
||||
this._canvasPanel.ResumeLayout(false);
|
||||
this._agvInfoPanel.ResumeLayout(false);
|
||||
this._agvInfoPanel.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -899,5 +923,7 @@ namespace AGVSimulator.Forms
|
||||
private System.Windows.Forms.ToolStripButton btMakeMap;
|
||||
private System.Windows.Forms.ToolStripMenuItem 맵저장SToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem 맵다른이름으로저장ToolStripMenuItem;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.PropertyGrid propertyNode;
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace AGVSimulator.Forms
|
||||
_simulatorCanvas.Dock = DockStyle.Fill;
|
||||
|
||||
// 목적지 선택 이벤트 구독
|
||||
_simulatorCanvas.NodeSelected += OnTargetNodeSelected;
|
||||
_simulatorCanvas.NodesSelected += OnTargetNodeSelected;
|
||||
|
||||
_canvasPanel.Controls.Add(_simulatorCanvas);
|
||||
}
|
||||
@@ -394,10 +394,13 @@ namespace AGVSimulator.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTargetNodeSelected(object sender, MapNode selectedNode)
|
||||
private void OnTargetNodeSelected(object sender, List<MapNode> selectedNodes)
|
||||
{
|
||||
try
|
||||
{
|
||||
// PropertyGrid 업데이트 (항상 수행)
|
||||
propertyNode.SelectedObject = selectedNodes.FirstOrDefault();
|
||||
|
||||
// 타겟계산 모드에서만 처리
|
||||
if (_isTargetCalcMode)
|
||||
{
|
||||
@@ -406,6 +409,7 @@ namespace AGVSimulator.Forms
|
||||
//_targetCalcButton.Text = "타겟계산";
|
||||
//_targetCalcButton.BackColor = SystemColors.Control;
|
||||
//_simulatorCanvas.CurrentEditMode = UnifiedAGVCanvas.EditMode.Select;
|
||||
var selectedNode = selectedNodes.FirstOrDefault();
|
||||
if (selectedNode == null) return;
|
||||
|
||||
// 목적지를 선택된 노드로 설정
|
||||
@@ -865,6 +869,13 @@ namespace AGVSimulator.Forms
|
||||
// 시뮬레이터 캔버스에 맵 설정
|
||||
_simulatorCanvas.Nodes = _mapNodes;
|
||||
|
||||
// 맵 설정 적용 (배경색, 그리드 표시)
|
||||
if (result.Settings != null)
|
||||
{
|
||||
_simulatorCanvas.BackColor = System.Drawing.Color.FromArgb(result.Settings.BackgroundColorArgb);
|
||||
_simulatorCanvas.ShowGrid = result.Settings.ShowGrid;
|
||||
}
|
||||
|
||||
// 설정에 마지막 맵 파일 경로 저장
|
||||
_config.LastMapFilePath = filePath;
|
||||
if (_config.AutoSave)
|
||||
@@ -1876,6 +1887,7 @@ namespace AGVSimulator.Forms
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 맵 데이터를 파일에 저장 (MapLoader 공통 저장 로직 사용)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user