Exemplo n.º 1
0
        private void list_objects_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ObjectChange form = new ObjectChange(scene.objects[list_objects.SelectedIndex]);

            form.Show();
            form.Closed += Form_Closed;
        }
Exemplo n.º 2
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            scene.objects.Add(new ParamObject());
            list_objects.Items.Add("Объект " + (scene.objects.Count));
            scene.objects[scene.objects.Count - 1].Outside_tower_height        = 500;
            scene.objects[scene.objects.Count - 1].Outside_tower_radius        = 100;
            scene.objects[scene.objects.Count - 1].Outside_tower_top_height    = 100;
            scene.objects[scene.objects.Count - 1].Outside_tower_top_radius    = 150;
            scene.objects[scene.objects.Count - 1].Inside_tower_height         = 400;
            scene.objects[scene.objects.Count - 1].Inside_tower_radius         = 50;
            scene.objects[scene.objects.Count - 1].Inside_tower_top_height     = 50;
            scene.objects[scene.objects.Count - 1].Inside_tower_top_radius     = 100;
            scene.objects[scene.objects.Count - 1].Outside_wall_lenght         = 500;
            scene.objects[scene.objects.Count - 1].Inside_wall_lenght          = 200;
            scene.objects[scene.objects.Count - 1].Outside_tower_sphere_radius = 50;
            scene.objects[scene.objects.Count - 1].Inside_tower_sphere_radius  = 25;
            scene.objects[scene.objects.Count - 1].Outside_box_count           = 5;
            /*др параметры*/
            ObjectChange form = new ObjectChange(scene.objects[scene.objects.Count - 1]);

            form.Show();
            form.Closed += Form_Closed;
            list_objects.SelectedIndex = scene.objects.Count - 1;

            /*scene.objects[scene.objects.Count - 1].triangles = scene.ConstructionObject(new Vec3(-800,-300,0), scene.objects[scene.objects.Count - 1]);
             * image.Source = scene.DrawObject((int)image.Width, (int)image.Height, "");*/
        }
Exemplo n.º 3
0
        private void Form_Closed(object sender, EventArgs e)
        {
            ObjectChange form = sender as ObjectChange;

            scene.objects[list_objects.SelectedIndex]           = form.result;
            scene.objects[list_objects.SelectedIndex].triangles = scene.ConstructionObject(new Vec3(0, 0, 0), scene.objects[list_objects.SelectedIndex]);
            image.Source = scene.DrawObject((int)image.Width, (int)image.Height);
        }