Ejemplo n.º 1
0
        EventHandler<BoolEventArgs> NewDoorHandler(DesignerItem item)
        {
            DoorModel dm = new DoorModel(new Door(), item, Level);
            DoorPropertiesWindow dpw = new DoorPropertiesWindow();
            dpw.DataContext = dm;
            item.PropertyWindow = dpw;

            this.Children.Add(dpw);
            return dpw.SelectionHandler;
        }
Ejemplo n.º 2
0
        private void AddDoor(Door door)
        {
            DesignerItem item = CreateDesignerImage(mDoorImage);

            DoorModel dm = new DoorModel(door, item, Level);
            PropertiesWindow pw = new DoorPropertiesWindow();
            pw.DataContext = dm;
            item.PropertyWindow = pw;
            MyDesignerCanvas.Children.Add(pw);

            item.OnSelected += pw.SelectionHandler;
            item.IsSelected = true;
        }