public void AddBuilding(List <Building> buildingList) { foreach (Building building in buildingList) { bool addBuildingFlag = false; foreach (ModelBase existBuilding in MVCCItemList) { if (existBuilding is UGV) { continue; } Building ExistBuilding = existBuilding as Building; if (ExistBuilding.Id.Equals(building.Id)) { addBuildingFlag = true; break; } } if (!addBuildingFlag) { MVCCItemList.Add(building); } //if (buildingList.Count == MVCCItemList.Count) // break; } }
//private List<Point> mainTouchPoint = new List<Point>(); #region UGVCommand /* * * UGV를 넣는 코드가 들어가면 된다. (영상인식으로 들어온 UGV) * */ public void AddUGV(List <UGV> ugvList) { foreach (UGV ugv in ugvList) { bool addUGVFlag = false; for (int i = 0; i < MVCCItemList.Count; i++) { if (!(MVCCItemList[i] is UGV)) { continue; } UGV existUGV = MVCCItemList[i] as UGV; if (existUGV.Id.Equals(ugv.Id)) { addUGVFlag = true; break; } } if (!addUGVFlag) { MVCCItemList.Add(ugv); MVCCItemStateList.Add(new State(ugv)); } if (ugvList.Count == MVCCItemList.Count) { break; } } }