/// <summary> /// マップ表示更新 /// </summary> public void UpdateMapColor() { MonitorData monitor = MonitorData.GetInstance(); MoveMap moveMap = MoveMap.GetInstance(); for (int y = 0; y < dgvMap.Rows.Count; y++) { for (int x = 0; x < dgvMap.Columns.Count; x++) { dgvMap[x, y].Style.BackColor = moveMap.GetColor(x, y); } } }
/// <summary> /// 設定更新 /// </summary> private void updateSettings() { SettingData setting = SettingData.GetInstance(); DoubleText doubleText = null; // ロボットの縦 doubleText = (DoubleText)pnlSetting.Controls[0]; doubleText.Value = setting.RobotSize.Vertical; // ロボットの横 doubleText = (DoubleText)pnlSetting.Controls[1]; doubleText.Value = setting.RobotSize.Horizontal; // 畑の縦 doubleText = (DoubleText)pnlSetting.Controls[2]; doubleText.Value = setting.FarmSize.Vertical; // 畑の横 doubleText = (DoubleText)pnlSetting.Controls[3]; doubleText.Value = setting.FarmSize.Horizontal; // 草刈り開始時刻 usrKusakariStart.DayOfWeek = (int)setting.KusakariStart.DayOfWeek; usrKusakariStart.Hour = setting.KusakariStart.Hour; usrKusakariStart.Minute = setting.KusakariStart.Minulte; // 夜警開始時刻 usrYakeiStart.DayOfWeek = (int)setting.YakeiStart.DayOfWeek; usrYakeiStart.Hour = setting.YakeiStart.Hour; usrYakeiStart.Minute = setting.YakeiStart.Minulte; // 動作完了判定閾値 FloatText floatText = (FloatText)pnlSetting.Controls[4]; floatText.Value = setting.MoveEndRate * 100; // エリアマップ生成 AreaMap areaMap = AreaMap.GetInstance(); areaMap.Allocate(setting.MapLength, setting.MapWidth); // 動作マップ生成 MoveMap moveMap = MoveMap.GetInstance(); moveMap.Allocate(setting.MapLength, setting.MapWidth); }
/// <summary> /// モニタ更新 /// </summary> private void updateMonitors() { foreach (Control control in pnlMonitor.Controls) { MonitorLabel label = (MonitorLabel)control; label.UpdateValue(); } foreach (Control control in pnlDetail.Controls) { MonitorLabel label = (MonitorLabel)control; label.UpdateValue(); } foreach (Control control in pnlSystemError.Controls) { MonitorLabel label = (MonitorLabel)control; label.UpdateValue(); } lblMovedRate.Text = string.Format("{0:F1}", MoveMap.GetInstance().MovedRate); lblStateDateTime.Text = MonitorData.GetInstance().Commander.LastStartDate.ToString(); }
protected override void analyzeCore(byte[] data) { MoveMap moveMap = MoveMap.GetInstance(); moveMap.Update(data); }