public void SetupDocument(Document doc) { Clear(); var n = 0; foreach (var room in doc.rooms) { var makeRoom = new UCRoom(); this.Controls.Add(makeRoom); makeRoom.SetupRoom(room); makeRoom.Visible = true; makeRoom.UpdateScalerPosition(); m_listRoom.Add(makeRoom); Console.WriteLine(room.Rect); } foreach (var f in doc.objects) { var makeobj = new UCObject(); this.Controls.Add(makeobj); m_listObject.Add(makeobj); makeobj.SetupData(f); makeobj.UpdateScalerPosition(); } foreach (var d in doc.doors) { Console.WriteLine("hello!" + d.pA + ", " + d.kind); var makeDoor = Canvas.instance.MakeDoor(d); makeDoor.Setup(d); } }
public void MakeRoom(Room nRoom) { var makeRoom = new UCRoom(); this.Controls.Add(makeRoom); makeRoom.SetupRoom(nRoom); makeRoom.Visible = true; m_listRoom.Add(makeRoom); makeRoom.UpdateScalerPosition(); SetZIndex(); }