Exemple #1
0
        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);
            }
        }
Exemple #2
0
        public void MakeObject(Furniture obj)
        {
            var makeObj = new UCObject();

            this.Controls.Add(makeObj);
            m_listObject.Add(makeObj);
            makeObj.SetupData(obj);
            makeObj.UpdateScalerPosition();
            SetZIndex();
        }