Exemplo n.º 1
0
        private void addChild(object sender, RoutedEventArgs e)
        {
            BodyPart childBodyPart = new BodyPart();
            AddBodyPartWindow addChildWindow = new AddBodyPartWindow();
            addChildWindow.parent = bodyPart;
            addChildWindow.ShowDialog();

            if (addChildWindow.createdPart == true)
            {
                MainWindow.bodyParts.Add(addChildWindow.bodyPart);
                BodyPartItem bodyPartItem = new BodyPartItem(MainWindow.bodyParts.Last().name, addChildWindow.bodyPart);
                MainWindow.bodyPartItems.Add(bodyPartItem);
                Core.mainWindow.addToStackPanel(bodyPartItem);
            }
        }
Exemplo n.º 2
0
        //-------------------------------
        //Physical Characteristics Tab
        private void Btn_NewPart_Click(object sender, RoutedEventArgs e)
        {
            AddBodyPartWindow addBodyPart = new AddBodyPartWindow();
            addBodyPart.Owner = this;
            addBodyPart.ShowDialog();

            if (addBodyPart.createdPart == true)
            {
                bodyParts.Add(addBodyPart.bodyPart);
                BodyPartItem bodyPartItem = new BodyPartItem(bodyParts.Last().name, addBodyPart.bodyPart);
                bodyPartItems.Add(bodyPartItem);
                addToStackPanel(bodyPartItem);
            }
        }
Exemplo n.º 3
0
 public void addToStackPanel(BodyPartItem item)
 {
     StckPanel_Characteristics.Children.Add(item.panel);
 }