Ejemplo n.º 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.UserControl = ((VIDGS配置软件.Viewport3DControl)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.viewPort3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 4:
                this.model3DGroup = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 5:
                this.contentView = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 2
0
        private void CreateModel()
        {
            const double dt = 0.1;
            const int nSteps = 100;
            var mb = new MeshBuilder(true, true);
            for (double y0 = -5; y0 <= 5; y0 += 0.25)
            {
                var p0 = new Point(-3, y0);
                Point[] pts = Solve(Velocity, p0, dt, nSteps);
                var vel = new double[pts.Length];
                var diam = new double[pts.Length];
                int i = 0;
                var pts3d = new Point3D[pts.Length];
                double vmax = 0;
                foreach (Point pt in pts)
                {
                    pts3d[i] = new Point3D(pt.X, pt.Y, 0);
                    double v = Velocity(pt.X, pt.Y).Length;
                    if (v > vmax) vmax = v;
                    vel[i++] = v;
                }
                for (int j = 0; j < vel.Length; j++)
                    vel[j] /= vmax;
                for (int j = 0; j < vel.Length; j++)
                    diam[j] = 0.075;

                mb.AddTube(pts3d, vel, diam, 12, false);
            }
            StreamLinesModel = new GeometryModel3D();
            StreamLinesModel.Geometry = mb.ToMesh();
            StreamLinesModel.Material = Materials.Hue;
            StreamLinesModel.BackMaterial = Materials.Hue;
        }
Ejemplo n.º 3
0
        private void CreateBackFace(int width, int height, BitmapImage bitmapImage)
        {
            ;

            MeshGeometry3D mesh = new MeshGeometry3D();

            mesh.Positions.Add(new Point3D(-width, -height, -10));
            mesh.Positions.Add(new Point3D(width, -height, -10));
            mesh.Positions.Add(new Point3D(width, height, -10));
            mesh.Positions.Add(new Point3D(-width, height, -10));

            mesh.TriangleIndices.Add(0);
            mesh.TriangleIndices.Add(1);
            mesh.TriangleIndices.Add(3);
            mesh.TriangleIndices.Add(1);
            mesh.TriangleIndices.Add(2);
            mesh.TriangleIndices.Add(3);

            // These are the lines you need to allow an image to be painted onto the 3d model
            mesh.TextureCoordinates.Add(new Point(0, 0));
            mesh.TextureCoordinates.Add(new Point(1, 0));
            mesh.TextureCoordinates.Add(new Point(1, 1));
            mesh.TextureCoordinates.Add(new Point(0, 1));

            ImageBrush imageBrush = new ImageBrush(bitmapImage);

            GeometryModel3D geometry = new GeometryModel3D(mesh, new DiffuseMaterial(imageBrush));
            //GeometryModel3D geometry = new GeometryModel3D(mesh, new DiffuseMaterial(new SolidColorBrush(Colors.Red)));

            group.Children.Add(geometry);
        }
        public MainWindow()
        {
            InitializeComponent();

            _samples = new ValueHolder<short[]>();
            _samplingRate = new ValueHolder<int>();

            _soundManager = new SoundManager();
            _soundManager.NewSamples += HandleNewSamples;
            _soundManager.StartRecording(0, 30);

            _samplingRate.Value = _soundManager.SamplingRate;

            _soundVisualizerVM = new SoundVisualizerVM(_samples, _samplingRate);

            _soundVisualizer = new SoundVisualizerControl(_soundVisualizerVM);
            //MainGrid.Children.Add(_soundVisualizer);

            _scene = new WPF3DScene();
            MainGrid.Children.Add(_scene);
            _model = Create3DModel();
            _scene.AddModel(_model);
            AddUIP3DPlane();
            _soundVisualizerVM.AverageAmplitudeFromLastSampling.PropertyChanged += HandleAverageAmplitudeChanged;

            DeviceButton.Click += DeviceButton_Click;
            DeviceButton.Content = _soundManager.GetAvailableDevices().Keys.First().ProductName;
        }
Ejemplo n.º 5
0
        // Add all cubes to a ModelVisual3D, reuse geometry but create new visual for each cube - this is slow
        /*   GeometryModel3D AddGeometrySeparate(IEnumerable<Point3D> centers, double L)
           {
               var mv = new ModelVisual3D();

               var cubit = new CubeVisual3D { SideLength = L * 0.95, Fill = Brushes.Gold };
               var cuboidGeometry = cubit.Model.Geometry as MeshGeometry3D;
               var r = new Random();

               foreach (var center in centers)
               {
                   var tg = new Transform3DGroup();
                   tg.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(1, 0, 0), (r.NextDouble() - 0.5) * 10)));
                   tg.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 1, 0), (r.NextDouble() - 0.5) * 10)));
                   tg.Children.Add(new TranslateTransform3D(center.ToVector3D()));

                   var c = new ModelVisual3D
                               {
                                   Content =
                                       new GeometryModel3D
                                           {
                                               Geometry = cuboidGeometry,
                                               Material = cubit.Material,
                                               Transform = tg
                                           }
                               };
                   mv.Children.Add(c);
               }
              return mv;
           }*/

        // All cubes in one GeometryModel - much faster
        GeometryModel3D AddGeometry(IEnumerable<Point3D> centers, double L)
        {
            var w = new Stopwatch();
            w.Start();
            /*            var geometry = new MeshGeometry3D();
                        foreach (var center in centers)
                        {
                            MeshGeometryHelper.AddBox(geometry,center, L, L, L);
                        }
                        */

            var builder = new MeshBuilder();
            foreach (var center in centers)
            {
                builder.AddBox(center, L, L, L);
            }
            var geometry = builder.ToMesh();
            geometry.Freeze();

            Trace.WriteLine(Level + ": " + w.ElapsedMilliseconds + " ms");

            var mv = new GeometryModel3D
                             {
                                 Geometry = geometry,
                                 Material = MaterialHelper.CreateMaterial(Brushes.Gold)
                             };
            TriangleCount = geometry.TriangleIndices.Count / 3;

            return mv;
        }
Ejemplo n.º 6
0
        private void Expand(GeometryModel3D model, Transform3D transformation)
        {
            Transform3D ot;
            if (originalTransforms.ContainsKey(model))
                ot = originalTransforms[model];
            else
            {
                ot = model.Transform;
                originalTransforms.Add(model, ot);
            }

            Transform3D totalTransform = Transform3DHelper.CombineTransform(transformation, ot);

            var mesh = model.Geometry as MeshGeometry3D;
            if (mesh == null)
                return;
            var bounds = new Rect3D();
            foreach (int i in mesh.TriangleIndices)
                bounds.Union(totalTransform.Transform(mesh.Positions[i]));

            Point3D p = bounds.Location;
            Vector3D d = p - actualExpandOrigin;
            d *= Expansion;
            Point3D p2 = actualExpandOrigin + d;
            var t = new TranslateTransform3D(p2 - p);

            model.Transform = Transform3DHelper.CombineTransform(ot, t);
        }
Ejemplo n.º 7
0
 // Public parameterless constructor
 public ModelVisualBase()
 {
     meshgeo = new MeshGeometry3D();
     geomodel = new GeometryModel3D();
     Geometry = meshgeo;
     Content = geomodel;
 }
Ejemplo n.º 8
0
        ///////////////////////////////////////////////////////////////
        // Create switch command for various sections, split code into separate objects / function of 3D drawing for each type
        /////////////////////////////////////////////////
        // Tutorial
        /// http://kindohm.com/technical/WPF3DTutorial.htm  ScreenSpaceLines3D
        /// <summary>
        /// ///////////////////////////////////////////////////////
        /// MAIN CONSTRUCTOR
        /// ///////////////////////////////////////////////////////
        /// </summary>
        //---------------------------------------------------------------------------------------------
        //---------------------------------------------------------------------------------------------
        //---------------------------------------------------------------------------------------------
        public Window2(bool bDebugging)
        {
            InitializeComponent();

              Model3DGroup gr = new Model3DGroup();
              //gr.Children.Add(new AmbientLight());

              GeometryModel3D SolidModel3D = new GeometryModel3D();
              MeshGeometry3D mesh = new MeshGeometry3D();
              mesh.Positions = new Point3DCollection();

              //ScreenSpaceLines3D line = new ScreenSpaceLines3D();
              //line.Color = Color.FromRgb(0,255,0);
              //line.Points.Add(mesh.Positions[0]);
              //line.Points.Add(mesh.Positions[1]);

              //Viewport3D view = new Viewport3D();
              //view.Children.Add(line);

              //gr.Children.Add(new AmbientLight());
              SolidModel3D.Geometry = mesh;
              SolidColorBrush br = new SolidColorBrush(Color.FromRgb(255, 0, 0));
              SolidModel3D.Material = new DiffuseMaterial(br);

              gr.Children.Add(SolidModel3D); // Add solid to model group

              _trackport.Model = (Model3D)gr; //CreateRectangle(p3, p2, p6, p7, Brushes.Red);

              _trackport.Trackball.TranslateScale = 1000;   //step for moving object (panning)

              _trackport.SetupScene();
        }
        public virtual Model3DGroup GetModel()
        {
            MeshGeometry3D meshVehicle = new MeshGeometry3D();
            Point3D p1 = new Point3D(0, 0, 0);
            Point3D p2 = new Point3D(1, 0, 0);
            Point3D p3 = new Point3D(1, 0, 1);
            Point3D p4 = new Point3D(0, 0, 1);
            Point3D p5 = new Point3D(0, 1, 0);
            Point3D p6 = new Point3D(1, 1, 0);
            Point3D p7 = new Point3D(1, 1, 1);
            Point3D p8 = new Point3D(0, 1, 1);
            Helpers.Geometry.Geometry3DHelper.CubeModel(p1, p2, p3, p4, p5, p6, p7, p8, ref meshVehicle);

            GeometryModel3D geom = new GeometryModel3D(meshVehicle, new DiffuseMaterial(Brushes.OrangeRed));

            Model3DGroup group = new Model3DGroup();
            //geom.Transform = new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 1, 0), angle));
            group.Children.Add(geom);

            Transform3DGroup trgr = new Transform3DGroup();
            trgr.Children.Add(new ScaleTransform3D(Size.Y, Size.X, Size.Z));
            trgr.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 0, 3), -Angle)));
            trgr.Children.Add(new TranslateTransform3D(Position.Y, Position.X, 0));
            group.Transform = trgr;
            return group;
        }
Ejemplo n.º 10
0
        public NodesVisual()
        {
            InitializeComponent();

            // Make IMU model here

            Model3DGroup items = new Model3DGroup();
            GeometryModel3D model = new GeometryModel3D();
            MeshGeometry3D geom = new MeshGeometry3D();
            DiffuseMaterial paint = new DiffuseMaterial(new SolidColorBrush(Colors.Red));

            double xPos, yPos, zPos;

            for(int z = 0; z < 2; z++)
                for (int y = 0; y < 2; y++)
                    for (int x = 0; x < 2; x++)
                    {
                        xPos = x * CUBE_SIZE - CUBE_SIZE / 2;
                        yPos = y * CUBE_SIZE - CUBE_SIZE / 2;
                        zPos = z * CUBE_SIZE - CUBE_SIZE / 2;

                        geom.Positions.Add(new Point3D(xPos, yPos, zPos));
                        Debug.Print("(" + x + "," + y + "," + z + ")");
                    }
            

            // TriangleIndices = "2 3 1  2 1 0  7 1 3  7 5 1  6 5 7  6 4 5  6 2 0  6 0 4  2 7 3  2 6 7  0 1 5  0 5 4" >
            geom.TriangleIndices.Add(2);    geom.TriangleIndices.Add(3);    geom.TriangleIndices.Add(1);
            geom.TriangleIndices.Add(2);    geom.TriangleIndices.Add(1);    geom.TriangleIndices.Add(0);
            geom.TriangleIndices.Add(7);    geom.TriangleIndices.Add(1);    geom.TriangleIndices.Add(3);

            geom.TriangleIndices.Add(7);    geom.TriangleIndices.Add(5);    geom.TriangleIndices.Add(1);
            geom.TriangleIndices.Add(6);    geom.TriangleIndices.Add(5);    geom.TriangleIndices.Add(7);
            geom.TriangleIndices.Add(6);    geom.TriangleIndices.Add(4);    geom.TriangleIndices.Add(5);

            geom.TriangleIndices.Add(6);    geom.TriangleIndices.Add(2);    geom.TriangleIndices.Add(0);
            geom.TriangleIndices.Add(6);    geom.TriangleIndices.Add(0);    geom.TriangleIndices.Add(4);
            geom.TriangleIndices.Add(2);    geom.TriangleIndices.Add(7);    geom.TriangleIndices.Add(3);

            geom.TriangleIndices.Add(2);    geom.TriangleIndices.Add(6);    geom.TriangleIndices.Add(7);
            geom.TriangleIndices.Add(0);    geom.TriangleIndices.Add(1);    geom.TriangleIndices.Add(5);
            geom.TriangleIndices.Add(0);    geom.TriangleIndices.Add(5);    geom.TriangleIndices.Add(4);

            model.Material = paint;
            model.Geometry = geom;
            items.Children.Add(model);

            imu = new ModelVisual3D();
            imu.Content = items;
            viewportIMU.Children.Add(imu);

            combobox_nodeSelect.Items.Clear();
            Nodes.UpdateAvailableSensors();

            foreach (string sensor in Nodes.COM_Ports)
                combobox_nodeSelect.Items.Add(sensor);

            if (!combobox_nodeSelect.Items.IsEmpty)
                combobox_nodeSelect.SelectedIndex = 0;
        }
Ejemplo n.º 11
0
        public MainWindow()
        {
            this.InitializeComponent();
            //BuildSolid();   //导入图形入口

            // 在此点下面插入创建对象所需的代码。
            // 初始化
            // Geometry creation
            mGeometryAdd = new GeometryModel3D[100];
            txt3D = new GeometryModel3D[100];
            AddCnt = 0;
            AddCntTxt = 0;

               /*DiffuseMaterial tmp = new DiffuseMaterial();
            SolidColorBrush solid = new SolidColorBrush();
            solid.Opacity = 0.5;
            tmp.Brush = new SolidColorBrush(solid);
              mGeometry = new GeometryModel3D(test, tmp);*/

            mGeometry = new GeometryModel3D(test, new DiffuseMaterial(Brushes.YellowGreen));

            mGeometry.Transform = new Transform3DGroup();
            group.Children.Add(mGeometry);
            MapHave = 1;
            MapCnt++;

            draw = new DrawOperator();

            PathHave = 0;   //是否添加巡检路径
            DataHave = 0;   //是否添加巡检数据
        }
Ejemplo n.º 12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.hxViewport3D = ((HelixToolkit.Wpf.HelixViewport3D)(target));
                return;

            case 2:
                this.modelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 3:
                this.model2 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 4:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 5:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 6:
                this.textEdit = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 7:
                this.debugOutput = ((System.Windows.Controls.RichTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 13
0
 // Public parameterless constructor
 public ModelBase()
 {
     meshGeometry = new MeshGeometry3D();
     modelContent = new GeometryModel3D();
     Geometry = meshGeometry;
     Content = modelContent;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Применить трансформацию к модели.
 /// </summary>
 /// <param name="model">Модель.</param>
 /// <param name="frameSection">Секция фрейма модели.</param>
 private void ApplyTransformation(GeometryModel3D model, Frame frameSection)
 {
     Matrix3D currentMatrix = this.GetMatrix(frameSection);
       while (frameSection.ParentFrame >= 0)
     currentMatrix = Matrix3D.Multiply(currentMatrix, this.GetMatrix(this.ModelGroupMetadata.FrameList.Structure.Frames[frameSection.ParentFrame]));
       model.Transform = new MatrixTransform3D(currentMatrix);
 }
Ejemplo n.º 15
0
 public PlaneModel(GeometryModel3D plane, Color planeColor, Point3DCollection points)
 {
     this.plane = plane;
     this.planeColor = planeColor;
     this.points = points;
     this.crosses = 0;
 }
Ejemplo n.º 16
0
        public ParticleSystem(int maxCount, System.Windows.Media.Color color)
        {
            this.maxParticleCount = maxCount;

            this.particleList = new List<Particle>();

            this.particleModel = new GeometryModel3D();
            this.particleModel.Geometry = new MeshGeometry3D();

            Ellipse e = new Ellipse();
            e.Width = 32.0;
            e.Height = 32.0;
            RadialGradientBrush b = new RadialGradientBrush();
            b.GradientStops.Add(new GradientStop(System.Windows.Media.Color.FromArgb(0xFF, color.R, color.G, color.B), 0.25));
            b.GradientStops.Add(new GradientStop(System.Windows.Media.Color.FromArgb(0x00, color.R, color.G, color.B), 1.0));
            e.Fill = b;
            e.Measure(new System.Windows.Size(32, 32));
            e.Arrange(new Rect(0, 0, 32, 32));

            var brush = new VisualBrush(e);

            DiffuseMaterial material = new DiffuseMaterial(brush);

            this.particleModel.Material = material;

            this.rand = new Random(brush.GetHashCode());
        }
Ejemplo n.º 17
0
        protected override void ExportModel(System.Windows.Media.Media3D.GeometryModel3D model, System.Windows.Media.Media3D.Transform3D inheritedTransform)
        {
            var mesh    = model.Geometry as MeshGeometry3D;
            var indices = new StringBuilder();

            foreach (int i in mesh.TriangleIndices)
            {
                indices.Append(i + " ");
            }
            var points = new StringBuilder();

            foreach (var pt in mesh.Positions)
            {
                points.AppendFormat(CultureInfo.InvariantCulture, "{0} {1} {2} ", pt.X, pt.Y, pt.Z);
            }

            writer.WriteStartElement("Transform");
            writer.WriteStartElement("Shape");
            writer.WriteStartElement("IndexedFaceSet");
            writer.WriteAttributeString("coordIndex", indices.ToString());
            writer.WriteStartElement("Coordinate");
            writer.WriteAttributeString("point", points.ToString());
            writer.WriteEndElement();
            writer.WriteEndElement(); // IndexedFaceSet
            writer.WriteStartElement("Appearance");

            writer.WriteStartElement("Material");
            writer.WriteAttributeString("diffuseColor", "0.8 0.8 0.2");
            writer.WriteAttributeString("specularColor", "0.5 0.5 0.5");
            writer.WriteEndElement();
            writer.WriteEndElement(); // Appearance

            writer.WriteEndElement(); // Shape
            writer.WriteEndElement(); // Transform
        }
Ejemplo n.º 18
0
        //-------------------------------------------------------------------------------------
        /// <summary>
        /// CreateSatelliteModel
        /// </summary>
        //-------------------------------------------------------------------------------------
        public static GeometryModel3D CreateSatelliteModel(Model3DGroup group)
        {
            var model2 = new GeometryModel3D();
            var mesh2 = new MeshGeometry3D();

            mesh2.Positions.Add(new Point3D(0, 0, -.1));
            mesh2.Positions.Add(new Point3D(-.1, 0, .1));
            mesh2.Positions.Add(new Point3D(.1, 0, .1));
            mesh2.Positions.Add(new Point3D(0, .1, 0));
            mesh2.TriangleIndices.Add(0);
            mesh2.TriangleIndices.Add(1);
            mesh2.TriangleIndices.Add(2);

            mesh2.TriangleIndices.Add(0);
            mesh2.TriangleIndices.Add(3);
            mesh2.TriangleIndices.Add(1);

            mesh2.TriangleIndices.Add(3);
            mesh2.TriangleIndices.Add(2);
            mesh2.TriangleIndices.Add(1);

            mesh2.TriangleIndices.Add(1);
            mesh2.TriangleIndices.Add(1);
            mesh2.TriangleIndices.Add(3);

            model2.Geometry = mesh2;

            return model2;
        }
Ejemplo n.º 19
0
        private void Initializer(Point3D location)
        {
            var geometryModel = new GeometryModel3D();

            var meshBuilder = new MeshBuilder();

            meshBuilder.AddBox(new Point3D(location.X, location.Y, location.Z + 3.5), 1.5, 1.5, 0.25);

            meshBuilder.AddBox(new Point3D(location.X, location.Y + 1, location.Z + 3.5), 0.25, 1.25, 0.25);
            meshBuilder.AddBox(new Point3D(location.X, location.Y - 1, location.Z + 3.5), 0.25, 1.25, 0.25);

            meshBuilder.AddBox(new Point3D(location.X + 1, location.Y , location.Z + 3.5), 1.25, 0.25, 0.25);
            meshBuilder.AddBox(new Point3D(location.X - 1, location.Y, location.Z + 3.5), 1.25, 0.25, 0.25);

            meshBuilder.AddBox(new Point3D(location.X, location.Y + 1.5, location.Z + 3), 0.25, 0.25, 0.75);
            meshBuilder.AddBox(new Point3D(location.X, location.Y - 1.5, location.Z + 3), 0.25, 0.25, 0.75);

            meshBuilder.AddBox(new Point3D(location.X + 1.5, location.Y, location.Z + 3), 0.25, 0.25, 0.75);
            meshBuilder.AddBox(new Point3D(location.X - 1.5, location.Y, location.Z + 3), 0.25, 0.25, 0.75);

            meshBuilder.AddBox(new Point3D(location.X, location.Y, location.Z + 4), 0.5, 0.5, 1);

            geometryModel.Geometry = meshBuilder.ToMesh();
            geometryModel.Material = Materials.Gold;

            Visual3DModel = geometryModel;
        }
Ejemplo n.º 20
0
        public MeshElement3D()
        {
            Content = new GeometryModel3D();
            CompositionTarget.Rendering += CompositionTarget_Rendering;

            InvalidateModel();
        }
Ejemplo n.º 21
0
        public PhotoAlbum()
        {
            InitializeComponent();
            dt.Interval = TimeSpan.FromSeconds(2);
            dt.Tick += new EventHandler(dt_Tick);
            for (int i = 0; i < 16; i++)
            {
                ImageBrush ib = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/images/albums/im" + i + ".jpg")));
                ib.Stretch = Stretch.Uniform;

                ModelVisual3D mv = new ModelVisual3D();
                Material mat = new DiffuseMaterial(ib);
                GeometryModel3D plane = new GeometryModel3D(planeFactory.Mesh, mat);
                mv.Content = plane;
                mvs[i] = mv;
                myViewPort3D.Children.Add(mv);
                Matrix3D trix = new Matrix3D();
                double x = ran.NextDouble() * 50 - 50;
                double y = ran.NextDouble() * 2 - 2;
                double z = -i * 10;
                p3s[i] = new Point3D(x, y, z);
                trix.Append(new TranslateTransform3D(x, y, z).Value);
                mv.Transform = new MatrixTransform3D(trix);
            }

            pa = new Point3DAnimation(p3s[0], TimeSpan.FromMilliseconds(300));
            pa.AccelerationRatio = 0.3;
            pa.DecelerationRatio = 0.3;
            pa.Completed += new EventHandler(pa_Completed);
            cam.BeginAnimation(PerspectiveCamera.PositionProperty, pa);
        }
Ejemplo n.º 22
0
 private void LoadMeshes(GeometryModel3D[] meshes, Scene scene, SystemMaterial[] materials)
 {
      for (int i = 0; i < scene.MeshCount; ++i)
     {
         meshes[i] = this.ConvertMesh(scene.Meshes[i], materials);
     }
 }
        public Model3DGroup CreateTriangleModel(Point3D p0, Point3D p1, Point3D p2)
        {
            MeshGeometry3D mesh = new MeshGeometry3D();
            mesh.Positions.Add(p0);
            mesh.Positions.Add(p1);
            mesh.Positions.Add(p2);

            for (int i = 0; i < 3; i++)
            {
                mesh.TriangleIndices.Add(i);
            }

            Vector3D normal = CalculateNormal(p0, p1, p2);

            for (int i = 0; i < 3; i++)
            {
                mesh.Normals.Add(normal);
            }

            Material material = new DiffuseMaterial(new SolidColorBrush(Colors.DarkCyan));
            GeometryModel3D model = new GeometryModel3D(mesh, material);
            Model3DGroup group = new Model3DGroup();
            group.Children.Add(model);
            return group;
        }
        private void simpleButtonClick(object sender, RoutedEventArgs e)
        {
            MeshGeometry3D triagleMesh = new MeshGeometry3D();
            Point3D p0 = new Point3D(0, 0, 0);
            Point3D p1 = new Point3D(5, 0, 0);
            Point3D p2 = new Point3D(0, 0, 5);

            triagleMesh.Positions.Add(p0);
            triagleMesh.Positions.Add(p1);
            triagleMesh.Positions.Add(p2);

            triagleMesh.TriangleIndices.Add(0);
            triagleMesh.TriangleIndices.Add(2);
            triagleMesh.TriangleIndices.Add(1);

            Vector3D normal = new Vector3D(0, 1, 0);
            triagleMesh.Normals.Add(normal);
            triagleMesh.Normals.Add(normal);
            triagleMesh.Normals.Add(normal);

            Material material = new DiffuseMaterial(new SolidColorBrush(Colors.LawnGreen));
            GeometryModel3D triangleModel = new GeometryModel3D(triagleMesh, material);

            ModelVisual3D model = new ModelVisual3D();
            model.Content = triangleModel;
            this.mainViewport.Children.Add(model);
        }
Ejemplo n.º 25
0
        public GeometryModel3D ConvertOne( EngineViewModel engine )
        {
            var white = Color.FromRgb(255, 255, 255);
            var whiteBrush = new SolidColorBrush(white);
            var model = new GeometryModel3D(GetGeometry(), new DiffuseMaterial(whiteBrush));

            var transform = new Transform3DGroup();
            var scaleTransform = new ScaleTransform3D();
            var translateTransform = new TranslateTransform3D();

            transform.Children.Add(scaleTransform);
            transform.Children.Add(translateTransform);

            scaleTransform.ScaleX = 3;
            scaleTransform.ScaleY = 3;

            var powerBinding = new Binding("Power") {Mode = BindingMode.OneWay, Source = engine};
            BindingOperations.SetBinding(
                scaleTransform,
                ScaleTransform3D.ScaleZProperty,
                powerBinding);

            translateTransform.OffsetX = engine.OffsetX;
            translateTransform.OffsetY = engine.OffsetY;

            model.Transform = transform;

            return model;
        }
Ejemplo n.º 26
0
        public static Model3D GetSkeletonModel(AnimData animData, int frameNo)
        {
            if (null == animData) {
                return null;
            }

            GeometryModel3D model = new GeometryModel3D();
            MeshGeometry3D mesh = new MeshGeometry3D();

            Point3D[] parentPoints = new Point3D[64];
            parentPoints[0] = new Point3D(0, 0, 0);

            for (int jointNum = 0; jointNum < animData.skeletonDef.GetLength(0); ++jointNum)
            {
                int parentIndex = animData.skeletonDef[jointNum];
                // Binding position
                Point3D pos = animData.bindingPose[jointNum];

                if (frameNo >= 0)
                {
                    AnimMeshPose pose = animData.perFrameFKPoses[frameNo, jointNum];
                    pos = pose.Position;
                }
                parentPoints[parentIndex + 1] = pos;
                AddBone(mesh, parentPoints[parentIndex], pos);
            }

            model.Geometry = mesh;

            DiffuseMaterial dm = new DiffuseMaterial();
            dm.Brush = new SolidColorBrush(Colors.DarkGreen);
            model.Material = dm;

            return model;
        }
        // TODO: Let's have a WireFrame property so color and thickness can be defined
        // Keep the IsWireFrame property as well

        public ModelVisualBase()
        {
            Geometry = Geometry.Clone();
            GeometryModel3D model = new GeometryModel3D(Geometry, null);
            Content = model;

            AlgorithmicTransforms = new AlgorithmicTransformCollection();
        }
Ejemplo n.º 28
0
 public GenieTransition()
 {
     _viewport =
         Application.LoadComponent(new Uri("/FluidKit;component/Controls/Transition/Genie/Genie.xaml",
                                           UriKind.Relative)) as Viewport3D;
     _slidingScreen = _viewport.FindName("SlidingScreen") as GeometryModel3D;
     NameScope.GetNameScope(_viewport).UnregisterName("SlidingScreen");
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "ScreenSpaceVisual3D" /> class.
 /// </summary>
 protected ScreenSpaceVisual3D()
 {
     this.Mesh = new MeshGeometry3D();
     this.Model = new GeometryModel3D { Geometry = this.Mesh };
     this.Content = this.Model;
     this.Points = new List<Point3D>();
     this.OnColorChanged();
 }
Ejemplo n.º 30
0
        protected override void BeginTransition3D(TransitionElement transitionElement, ContentPresenter oldContent, ContentPresenter newContent, Viewport3D viewport)
        {
            Brush clone = CreateBrush(oldContent);

            Size size = transitionElement.RenderSize;
            MeshGeometry3D leftDoor = CreateMesh(new Point3D(),
               new Vector3D(size.Width / 2, 0, 0),
               new Vector3D(0, size.Height, 0),
               1,
               1,
               new Rect(0, 0, 0.5, 1));

            GeometryModel3D leftDoorGeometry = new GeometryModel3D();
            leftDoorGeometry.Geometry = leftDoor;
            leftDoorGeometry.Material = new DiffuseMaterial(clone);

            AxisAngleRotation3D leftRotation = new AxisAngleRotation3D(new Vector3D(0, 1, 0), 0);
            leftDoorGeometry.Transform = new RotateTransform3D(leftRotation);

            GeometryModel3D rightDoorGeometry = new GeometryModel3D();
            MeshGeometry3D rightDoor = CreateMesh(new Point3D(size.Width / 2, 0, 0),
                 new Vector3D(size.Width / 2, 0, 0),
                 new Vector3D(0, size.Height, 0),
                 1,
                 1,
                 new Rect(0.5, 0, 0.5, 1));

            rightDoorGeometry.Geometry = rightDoor;
            rightDoorGeometry.Material = new DiffuseMaterial(clone);

            AxisAngleRotation3D rightRotation = new AxisAngleRotation3D(new Vector3D(0, 1, 0), 0);
            rightDoorGeometry.Transform = new RotateTransform3D(rightRotation, size.Width, 0, 0);


            Model3DGroup doors = new Model3DGroup();
            doors.Children.Add(leftDoorGeometry);
            doors.Children.Add(rightDoorGeometry);

            ModelVisual3D model = new ModelVisual3D();
            model.Content = doors;

            // Replace old content in visual tree with new 3d model
            transitionElement.HideContent(oldContent);
            viewport.Children.Add(model);

            DoubleAnimation da = new DoubleAnimation(90 - 0.5 * FieldOfView, Duration);
            leftRotation.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);

            da = new DoubleAnimation(-(90 - 0.5 * FieldOfView), Duration);
            rightRotation.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);

            da = new DoubleAnimation(0, Duration);
            da.Completed += delegate
            {
                EndTransition(transitionElement, oldContent, newContent);
            };
            clone.BeginAnimation(Brush.OpacityProperty, da);
        }
 private GeometryModel3D Create3DModel()
 {
     _mesh = SimpleGeometry3D.CreateSphere(new Point3D(0, 0, 0), 0.2, 32, 32);
     _originalPoints = _mesh.Positions;
     var geometry = new GeometryModel3D();
     geometry.Geometry = _mesh;
     geometry.Material = new DiffuseMaterial { Brush = Brushes.SaddleBrown, AmbientColor = Color.FromRgb(150,150,150)};
     return geometry;
 }
Ejemplo n.º 32
0
        public ThrustLine(Viewport3D viewport, SharedVisuals sharedVisuals, Vector3D forceDirection, Vector3D localOffset)
        {
            this.Viewport = viewport;
            _forceDirection = forceDirection;
            _forceStrength = forceDirection.Length;       // this way they don't have to set this if they don't want
            this.BodyOffset = new TranslateTransform3D(localOffset);       // just setting it to something so it's not null

            #region Create Visual

            // I'll create the visual, but won't add it until they fire the thruster

            // Material
            MaterialGroup materials = new MaterialGroup();
            materials.Children.Add(new DiffuseMaterial(Brushes.Coral));
            materials.Children.Add(new SpecularMaterial(Brushes.Gold, 100d));

            // Geometry Model
            // Create a skinny 3D rectangle along the x axis
            GeometryModel3D geometry = new GeometryModel3D();
            geometry.Material = materials;
            geometry.BackMaterial = materials;
            geometry.Geometry = sharedVisuals.ThrustLineMesh;


            // Figure out how much to rotate the cube to be along the opposite of the force line.  I do the opposite, because
            // thruster flames shoot in the opposite direction that they're pushing
            Vector3D flameLine = forceDirection;
            flameLine.Negate();

            Vector3D axis;
            double radians;
            Math3D.GetRotation(out axis, out radians, new Vector3D(1, 0, 0), flameLine);

            if (radians == 0d)
            {
                _initialRotate = null;
            }
            else
            {
                _initialRotate = new RotateTransform3D(new AxisAngleRotation3D(axis, Math1D.RadiansToDegrees(radians)));
            }

            //// Transform
            //Transform3DGroup transform = new Transform3DGroup();		// rotate needs to be added before translate
            //transform.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(axis, Math3D.RadiansToDegrees(radians))));
            //transform.Children.Add(new TranslateTransform3D(from));




            // Model Visual
            _model = new ModelVisual3D();
            _model.Content = geometry;
            _model.Transform = new TranslateTransform3D();        // I won't do anything with this right now

            #endregion
        }
Ejemplo n.º 33
0
        public Window2()
        {
            InitializeComponent();

            Image3DFacade Image3D = new Image3DFacade(wallPaper, image3D);
            mGeometry = Image3D.Create3DImage();
        
            group.Children.Add(mGeometry);
		}
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 25 "..\..\Materials.xaml"
                ((System.Windows.Controls.StackPanel)(target)).AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.chk_Click));

            #line default
            #line hidden
                return;

            case 2:
                this.chkBackground = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 3:
                this.chkDiffuse = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 4:
                this.chkSpecular = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 5:
                this.chkEmissive = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 6:
                this.rect = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 7:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 8:
                this.Scene = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 9:
                this.ring = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 10:
                this.Torus01OR9GR10 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 11:
                this.materialsGroup = ((System.Windows.Media.Media3D.MaterialGroup)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cubeGeometry = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 2:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 36
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Cube = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 2:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 37
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainViewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 3:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.scale = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;

            case 5:
                this.rotateY = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 6:
                this.rotateX = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 7:
                this.translate = ((System.Windows.Media.Media3D.TranslateTransform3D)(target));
                return;

            case 8:
                this.model3DGroup = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 9:
                this.geometryModel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 10:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 11:
                this.meshBack = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 38
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 2:
                this.light = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 3:
                this.magicCube = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.cube = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 5:
                this.F1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 6:
                this.F2 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 7:
                this.F3 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 8:
                this.F4 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 9:
                this.F5 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 10:
                this.F6 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.AboutY = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 2:
                this.House = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 3:
                this.Roof = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.stackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.viewport3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.AmbientContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.Ambient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 7:
                this.DirectionalContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 8:
                this.Directional = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 9:
                this.listBox = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 41
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 3:
                this.ringVisual = ((System.Windows.Media.Media3D.ModelUIElement3D)(target));

            #line 16 "..\..\HitTesting.xaml"
                this.ringVisual.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ringVisual_MouseDown);

            #line default
            #line hidden
                return;

            case 4:
                this.Scene = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 5:
                this.ringModel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 6:
                this.ringMesh = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 7:
                this.axisRotation = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 42
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.x_transition = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.y_transition = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.z_transition = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.move = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\MainWindow.xaml"
                this.move.Click += new System.Windows.RoutedEventHandler(this.move_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.cube = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 6:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 7:
                this.slider = ((System.Windows.Controls.Slider)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 2:
                this.Scene = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 3:
                this.ring = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 4:
                this.Torus01OR9GR10 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 44
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ImageBackGround = ((System.Windows.Controls.Image)(target));
                return;

            case 2:
                this.ImageFlyer = ((System.Windows.Controls.Image)(target));
                return;

            case 3:
                this.MarqueeImageBrush = ((System.Windows.Media.ImageBrush)(target));
                return;

            case 4:
                this.VideoModel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.VideoPLayer = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 6:
                this.ImageLeft = ((System.Windows.Controls.Image)(target));
                return;

            case 7:
                this.ImageCabinent = ((System.Windows.Controls.Image)(target));
                return;

            case 8:
                this.ImageManufactuer = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 45
0
        /// <summary>
        /// 初始化3D模型
        /// </summary>
        private void init3DModels(List <string> modelsNames)
        {
            //var modelsNames = System.IO.Directory.GetFiles(Utility.ConstValue.AppPath + @"3D_Models", "*.STL", SearchOption.TopDirectoryOnly).ToList();
            //var modelsNames = System.IO.Directory.GetFiles(Utility.ConstValue.AppPath + @"3D_Models/工件/1号工件", "*.STL", SearchOption.TopDirectoryOnly).ToList();

            HelixToolkit.Wpf.ModelImporter import = new HelixToolkit.Wpf.ModelImporter();
            //joints = new List<Joint>();
            Model3DGroup model3DGroup = new Model3DGroup();

            foreach (string modelName in modelsNames)
            {
                var              materialGroup = new MaterialGroup();
                Color            mainColor     = Colors.White;
                EmissiveMaterial emissMat      = new EmissiveMaterial(new SolidColorBrush(mainColor));
                System.Windows.Media.Media3D.DiffuseMaterial diffMat = new System.Windows.Media.Media3D.DiffuseMaterial(new SolidColorBrush(mainColor));
                SpecularMaterial specMat = new SpecularMaterial(new SolidColorBrush(mainColor), 200);
                materialGroup.Children.Add(emissMat);
                materialGroup.Children.Add(diffMat);
                materialGroup.Children.Add(specMat);

                var link = import.Load(modelName);
                System.Windows.Media.Media3D.GeometryModel3D model = link.Children[0] as System.Windows.Media.Media3D.GeometryModel3D;
                model.Material     = materialGroup;
                model.BackMaterial = materialGroup;
                //joints.Add(new Joint(link));
                model3DGroup.Children.Add(link);
            }

            ModelVisual3D modelVisual3D = new ModelVisual3D();

            modelVisual3D.Content = model3DGroup;

            mainContent.Children.Add(modelVisual3D);
            mainContent.InputBindings.Add(new MouseBinding(this.PointSelectionCommand, new MouseGesture(MouseAction.LeftClick)));
            mainContent.ZoomExtents();
        }
Ejemplo n.º 46
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((WPF三维图形.Window2)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.reset = ((System.Windows.Controls.Button)(target));

            #line 829 "..\..\Window2.xaml"
                this.reset.Click += new System.Windows.RoutedEventHandler(this.reset_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.textBlock2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.textBlock3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.textBlock4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.textBlock5 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.textBlock6 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.textBlock7 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.textBlock8 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.textBlock9 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 13:
                this.textBlock10 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 14:
                this.textBlock11 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.textBlock12 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.rotat = ((System.Windows.Controls.Button)(target));

            #line 842 "..\..\Window2.xaml"
                this.rotat.Click += new System.Windows.RoutedEventHandler(this.rotat_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.bta1 = ((System.Windows.Controls.Button)(target));

            #line 844 "..\..\Window2.xaml"
                this.bta1.Click += new System.Windows.RoutedEventHandler(this.bta1_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.bta2 = ((System.Windows.Controls.Button)(target));

            #line 845 "..\..\Window2.xaml"
                this.bta2.Click += new System.Windows.RoutedEventHandler(this.bta2_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.bta3 = ((System.Windows.Controls.Button)(target));

            #line 846 "..\..\Window2.xaml"
                this.bta3.Click += new System.Windows.RoutedEventHandler(this.bta3_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.bta4 = ((System.Windows.Controls.Button)(target));

            #line 847 "..\..\Window2.xaml"
                this.bta4.Click += new System.Windows.RoutedEventHandler(this.bta4_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.bta5 = ((System.Windows.Controls.Button)(target));

            #line 848 "..\..\Window2.xaml"
                this.bta5.Click += new System.Windows.RoutedEventHandler(this.bta5_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.bta6 = ((System.Windows.Controls.Button)(target));

            #line 849 "..\..\Window2.xaml"
                this.bta6.Click += new System.Windows.RoutedEventHandler(this.bta6_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.bta7 = ((System.Windows.Controls.Button)(target));

            #line 850 "..\..\Window2.xaml"
                this.bta7.Click += new System.Windows.RoutedEventHandler(this.bta7_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.bta8 = ((System.Windows.Controls.Button)(target));

            #line 851 "..\..\Window2.xaml"
                this.bta8.Click += new System.Windows.RoutedEventHandler(this.bta8_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.bta9 = ((System.Windows.Controls.Button)(target));

            #line 852 "..\..\Window2.xaml"
                this.bta9.Click += new System.Windows.RoutedEventHandler(this.bta9_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.bta10 = ((System.Windows.Controls.Button)(target));

            #line 853 "..\..\Window2.xaml"
                this.bta10.Click += new System.Windows.RoutedEventHandler(this.bta10_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.bta11 = ((System.Windows.Controls.Button)(target));

            #line 854 "..\..\Window2.xaml"
                this.bta11.Click += new System.Windows.RoutedEventHandler(this.bta11_Click);

            #line default
            #line hidden
                return;

            case 28:
                this.btb11 = ((System.Windows.Controls.Button)(target));

            #line 856 "..\..\Window2.xaml"
                this.btb11.Click += new System.Windows.RoutedEventHandler(this.btb11_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.btb10 = ((System.Windows.Controls.Button)(target));

            #line 857 "..\..\Window2.xaml"
                this.btb10.Click += new System.Windows.RoutedEventHandler(this.btb10_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.btb9 = ((System.Windows.Controls.Button)(target));

            #line 858 "..\..\Window2.xaml"
                this.btb9.Click += new System.Windows.RoutedEventHandler(this.btb9_Click);

            #line default
            #line hidden
                return;

            case 31:
                this.btb8 = ((System.Windows.Controls.Button)(target));

            #line 859 "..\..\Window2.xaml"
                this.btb8.Click += new System.Windows.RoutedEventHandler(this.btb8_Click);

            #line default
            #line hidden
                return;

            case 32:
                this.btb7 = ((System.Windows.Controls.Button)(target));

            #line 860 "..\..\Window2.xaml"
                this.btb7.Click += new System.Windows.RoutedEventHandler(this.btb7_Click);

            #line default
            #line hidden
                return;

            case 33:
                this.btb6 = ((System.Windows.Controls.Button)(target));

            #line 861 "..\..\Window2.xaml"
                this.btb6.Click += new System.Windows.RoutedEventHandler(this.btb6_Click);

            #line default
            #line hidden
                return;

            case 34:
                this.btb5 = ((System.Windows.Controls.Button)(target));

            #line 862 "..\..\Window2.xaml"
                this.btb5.Click += new System.Windows.RoutedEventHandler(this.btb5_Click);

            #line default
            #line hidden
                return;

            case 35:
                this.btb4 = ((System.Windows.Controls.Button)(target));

            #line 863 "..\..\Window2.xaml"
                this.btb4.Click += new System.Windows.RoutedEventHandler(this.btb4_Click);

            #line default
            #line hidden
                return;

            case 36:
                this.btb3 = ((System.Windows.Controls.Button)(target));

            #line 864 "..\..\Window2.xaml"
                this.btb3.Click += new System.Windows.RoutedEventHandler(this.btb3_Click);

            #line default
            #line hidden
                return;

            case 37:
                this.btb2 = ((System.Windows.Controls.Button)(target));

            #line 865 "..\..\Window2.xaml"
                this.btb2.Click += new System.Windows.RoutedEventHandler(this.btb2_Click);

            #line default
            #line hidden
                return;

            case 38:
                this.btb1 = ((System.Windows.Controls.Button)(target));

            #line 866 "..\..\Window2.xaml"
                this.btb1.Click += new System.Windows.RoutedEventHandler(this.btb1_Click);

            #line default
            #line hidden
                return;

            case 39:
                this.viewport3d = ((System.Windows.Controls.Viewport3D)(target));

            #line 867 "..\..\Window2.xaml"
                this.viewport3d.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 867 "..\..\Window2.xaml"
                this.viewport3d.MouseMove += new System.Windows.Input.MouseEventHandler(this.viewport3d_MouseMove);

            #line default
            #line hidden
                return;

            case 40:
                this.ppc = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 41:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 42:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 43:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 44:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 45:
                this.DirectionalLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 46:
                this.RootGeometryContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 47:
                this.Star01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 48:
                this.DefaultMaterial = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 49:
                this.Line01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 50:
                this.DefaultMaterial1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 51:
                this.Line02 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 52:
                this.DefaultMaterial2 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 53:
                this.Cylinder05 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 54:
                this.DefaultMaterial3 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 55:
                this.Cylinder01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 56:
                this.DefaultMaterial4 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 57:
                this.Cylinder06 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 58:
                this.DefaultMaterial5 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 59:
                this.Object01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 60:
                this.DefaultMaterial6 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 61:
                this.Cylinder08 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 62:
                this.DefaultMaterial7 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 63:
                this.ChamferBox02 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 64:
                this.DefaultMaterial8 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 65:
                this.Object07 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 66:
                this.DefaultMaterial9 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 67:
                this.Object10 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 68:
                this.DefaultMaterial10 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 69:
                this.Cylinder10 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 70:
                this.DefaultMaterial11 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 71:
                this.Circle03 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 72:
                this.DefaultMaterial12 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 73:
                this.Tube01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 74:
                this.DefaultMaterial13 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 47
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.viewport1 = ((System.Windows.Controls.Viewport3D)(target));

            #line 11 "..\..\MainWindow.xaml"
                this.viewport1.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.viewport1_MouseWheel);

            #line default
            #line hidden

            #line 12 "..\..\MainWindow.xaml"
                this.viewport1.MouseMove += new System.Windows.Input.MouseEventHandler(this.viewport1_MouseMove);

            #line default
            #line hidden

            #line 12 "..\..\MainWindow.xaml"
                this.viewport1.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport1_MouseDown);

            #line default
            #line hidden

            #line 13 "..\..\MainWindow.xaml"
                this.viewport1.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.viewport1_MouseUp);

            #line default
            #line hidden
                return;

            case 3:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 5:
                this.translacija = ((System.Windows.Media.Media3D.TranslateTransform3D)(target));
                return;

            case 6:
                this.skaliranje = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;

            case 7:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 8:
                this.Map = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 9:
                this.Center = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 48
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((WpfPhotoAlbum.MainWindow)(target));
                return;

            case 2:
                this.Storyboard1_BeginStoryboard = ((System.Windows.Media.Animation.BeginStoryboard)(target));
                return;

            case 3:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.image10 = ((System.Windows.Controls.Image)(target));
                return;

            case 5:
                this.image9 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 6:
                this.image9ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.image9Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 8:
                this.AmbientContainer5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.Ambient5 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 10:
                this.DirectionalContainer5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 11:
                this.Directional5 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 12:
                this.image8 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 13:
                this.image8ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.image8Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 15:
                this.AmbientContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.Ambient4 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 17:
                this.DirectionalContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 18:
                this.Directional4 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 19:
                this.image7 = ((System.Windows.Controls.Image)(target));
                return;

            case 20:
                this.image6 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 21:
                this.image6ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 22:
                this.image6Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 23:
                this.AmbientContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 24:
                this.Ambient3 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 25:
                this.DirectionalContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 26:
                this.Directional3 = ((System.Windows.Media.Media3D.PointLight)(target));
                return;

            case 27:
                this.image5 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 28:
                this.image5ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 29:
                this.image5Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 30:
                this.AmbientContainer2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 31:
                this.Ambient2 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 32:
                this.DirectionalContainer2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 33:
                this.Directional2 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 34:
                this.image4 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 35:
                this.image4ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 36:
                this.image4Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 37:
                this.AmbientContainer1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 38:
                this.Ambient1 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 39:
                this.DirectionalContainer1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 40:
                this.Directional1 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 41:
                this.image3 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 42:
                this.orthographicCamera = ((System.Windows.Media.Media3D.OrthographicCamera)(target));
                return;

            case 43:
                this.image3ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 44:
                this.image3Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 45:
                this.AmbientContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 46:
                this.Ambient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 47:
                this.DirectionalContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 48:
                this.Directional = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 49:
                this.image2 = ((System.Windows.Controls.Image)(target));
                return;

            case 50:
                this.image1 = ((System.Windows.Controls.Image)(target));
                return;

            case 51:
                this.rectangle1 = ((System.Windows.Shapes.Rectangle)(target));

            #line 732 "..\..\MainWindow.xaml"
                this.rectangle1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 52:
                this.rectangle2 = ((System.Windows.Shapes.Rectangle)(target));

            #line 745 "..\..\MainWindow.xaml"
                this.rectangle2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 53:
                this.rectangle3 = ((System.Windows.Shapes.Rectangle)(target));

            #line 758 "..\..\MainWindow.xaml"
                this.rectangle3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 54:
                this.textblock1 = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 49
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.my_viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 3:
                this.Wedge = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.geometry_model_3d = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 6:
                this.rotate_x = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 7:
                this.rotate_y = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 8:
                this.rotate_z = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 9:
                this.slider_x = ((System.Windows.Controls.Slider)(target));
                return;

            case 10:
                this.slider_y = ((System.Windows.Controls.Slider)(target));
                return;

            case 11:
                this.slider_z = ((System.Windows.Controls.Slider)(target));
                return;

            case 12:
                this.textbox_b = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.textbox_a = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.textbox_c = ((System.Windows.Controls.TextBox)(target));
                return;

            case 15:
                this.textbox_d = ((System.Windows.Controls.TextBox)(target));
                return;

            case 16:
                this.build_perspective = ((System.Windows.Controls.Button)(target));

            #line 90 "..\..\MainWindow.xaml"
                this.build_perspective.Click += new System.Windows.RoutedEventHandler(this.Build_perspective_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.Build_ortogonal = ((System.Windows.Controls.Button)(target));

            #line 91 "..\..\MainWindow.xaml"
                this.Build_ortogonal.Click += new System.Windows.RoutedEventHandler(this.Build_ortogonal_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 50
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\Window1.xaml"
                ((WaveSim.Window1)(target)).MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Window_MouseWheel);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.btnStart = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\Window1.xaml"
                this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 5:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 6:
                this.vis3DLighting = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.gmodMain = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 9:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 10:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 11:
                this.slidPeakHeight = ((System.Windows.Controls.Slider)(target));

            #line 53 "..\..\Window1.xaml"
                this.slidPeakHeight.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slidPeakHeight_ValueChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.lblDropDepth = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.slidNumDrops = ((System.Windows.Controls.Slider)(target));

            #line 55 "..\..\Window1.xaml"
                this.slidNumDrops.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slidNumDrops_ValueChanged);

            #line default
            #line hidden
                return;

            case 14:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 51
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((SJTU_BALANCE_PC_HOST.MainWindow)(target));

            #line 9 "..\..\MainWindow.xaml"
                this.Window.SizeChanged += new System.Windows.SizeChangedEventHandler(this.MainWindow_SizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.PortNameCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.OpenPortButton = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\MainWindow.xaml"
                this.OpenPortButton.Click += new System.Windows.RoutedEventHandler(this.OpenPortButton_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.BaudRateCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.CheckVersionButton = ((System.Windows.Controls.Button)(target));

            #line 61 "..\..\MainWindow.xaml"
                this.CheckVersionButton.Click += new System.Windows.RoutedEventHandler(this.CheckVersionButton_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.GetAccXButton = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\MainWindow.xaml"
                this.GetAccXButton.Click += new System.Windows.RoutedEventHandler(this.GetAccXButton_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.GetAccYButton = ((System.Windows.Controls.Button)(target));

            #line 63 "..\..\MainWindow.xaml"
                this.GetAccYButton.Click += new System.Windows.RoutedEventHandler(this.GetAccYButton_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.GetAccZButton = ((System.Windows.Controls.Button)(target));

            #line 64 "..\..\MainWindow.xaml"
                this.GetAccZButton.Click += new System.Windows.RoutedEventHandler(this.GetAccZButton_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.GetGyrXButton = ((System.Windows.Controls.Button)(target));

            #line 65 "..\..\MainWindow.xaml"
                this.GetGyrXButton.Click += new System.Windows.RoutedEventHandler(this.GetGyrXButton_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.GetGyrYButton = ((System.Windows.Controls.Button)(target));

            #line 66 "..\..\MainWindow.xaml"
                this.GetGyrYButton.Click += new System.Windows.RoutedEventHandler(this.GetGyrYButton_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.GetGyrZButton = ((System.Windows.Controls.Button)(target));

            #line 67 "..\..\MainWindow.xaml"
                this.GetGyrZButton.Click += new System.Windows.RoutedEventHandler(this.GetGyrZButton_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.GetAllMpuDataButton = ((System.Windows.Controls.Button)(target));

            #line 68 "..\..\MainWindow.xaml"
                this.GetAllMpuDataButton.Click += new System.Windows.RoutedEventHandler(this.GetAllMpuDataButton_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.AutoUpdateCheckBox = ((System.Windows.Controls.CheckBox)(target));

            #line 69 "..\..\MainWindow.xaml"
                this.AutoUpdateCheckBox.Checked += new System.Windows.RoutedEventHandler(this.AutoUpdateCheckBox_Checked);

            #line default
            #line hidden

            #line 69 "..\..\MainWindow.xaml"
                this.AutoUpdateCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.AutoUpdateCheckBox_Unchecked);

            #line default
            #line hidden
                return;

            case 14:
                this.AccXLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.AccYLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.AccZLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.GyrXLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.GyrYLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.GyrZLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.MpuCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 21:
                this.LegendCheckBox0 = ((System.Windows.Controls.CheckBox)(target));

            #line 117 "..\..\MainWindow.xaml"
                this.LegendCheckBox0.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox0_Checked);

            #line default
            #line hidden

            #line 117 "..\..\MainWindow.xaml"
                this.LegendCheckBox0.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox0_Unchecked);

            #line default
            #line hidden
                return;

            case 22:
                this.LegendCheckBox1 = ((System.Windows.Controls.CheckBox)(target));

            #line 118 "..\..\MainWindow.xaml"
                this.LegendCheckBox1.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox1_Checked);

            #line default
            #line hidden

            #line 118 "..\..\MainWindow.xaml"
                this.LegendCheckBox1.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox1_Unchecked);

            #line default
            #line hidden
                return;

            case 23:
                this.LegendCheckBox2 = ((System.Windows.Controls.CheckBox)(target));

            #line 119 "..\..\MainWindow.xaml"
                this.LegendCheckBox2.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox2_Checked);

            #line default
            #line hidden

            #line 119 "..\..\MainWindow.xaml"
                this.LegendCheckBox2.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox2_Unchecked);

            #line default
            #line hidden
                return;

            case 24:
                this.LegendCheckBox3 = ((System.Windows.Controls.CheckBox)(target));

            #line 120 "..\..\MainWindow.xaml"
                this.LegendCheckBox3.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox3_Checked);

            #line default
            #line hidden

            #line 120 "..\..\MainWindow.xaml"
                this.LegendCheckBox3.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox3_Unchecked);

            #line default
            #line hidden
                return;

            case 25:
                this.LegendCheckBox4 = ((System.Windows.Controls.CheckBox)(target));

            #line 121 "..\..\MainWindow.xaml"
                this.LegendCheckBox4.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox4_Checked);

            #line default
            #line hidden

            #line 121 "..\..\MainWindow.xaml"
                this.LegendCheckBox4.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox4_Unchecked);

            #line default
            #line hidden
                return;

            case 26:
                this.LegendCheckBox5 = ((System.Windows.Controls.CheckBox)(target));

            #line 122 "..\..\MainWindow.xaml"
                this.LegendCheckBox5.Checked += new System.Windows.RoutedEventHandler(this.LegendCheckBox5_Checked);

            #line default
            #line hidden

            #line 122 "..\..\MainWindow.xaml"
                this.LegendCheckBox5.Unchecked += new System.Windows.RoutedEventHandler(this.LegendCheckBox5_Unchecked);

            #line default
            #line hidden
                return;

            case 27:
                this.PostureViewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 28:
                this.Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 29:
                this.PostureResetButton = ((System.Windows.Controls.Button)(target));

            #line 177 "..\..\MainWindow.xaml"
                this.PostureResetButton.Click += new System.Windows.RoutedEventHandler(this.PostureResetButton_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.GetBalanceKpButton = ((System.Windows.Controls.Button)(target));

            #line 195 "..\..\MainWindow.xaml"
                this.GetBalanceKpButton.Click += new System.Windows.RoutedEventHandler(this.GetBalanceKpButton_Click);

            #line default
            #line hidden
                return;

            case 31:
                this.GetBalanceKiButton = ((System.Windows.Controls.Button)(target));

            #line 196 "..\..\MainWindow.xaml"
                this.GetBalanceKiButton.Click += new System.Windows.RoutedEventHandler(this.GetBalanceKiButton_Click);

            #line default
            #line hidden
                return;

            case 32:
                this.GetVelocityKpButton = ((System.Windows.Controls.Button)(target));

            #line 197 "..\..\MainWindow.xaml"
                this.GetVelocityKpButton.Click += new System.Windows.RoutedEventHandler(this.GetVelocityKpButton_Click);

            #line default
            #line hidden
                return;

            case 33:
                this.GetVelocityKiButton = ((System.Windows.Controls.Button)(target));

            #line 198 "..\..\MainWindow.xaml"
                this.GetVelocityKiButton.Click += new System.Windows.RoutedEventHandler(this.GetVelocityKiButton_Click);

            #line default
            #line hidden
                return;

            case 34:
                this.GetAngleButton = ((System.Windows.Controls.Button)(target));

            #line 199 "..\..\MainWindow.xaml"
                this.GetAngleButton.Click += new System.Windows.RoutedEventHandler(this.GetAngleButton_Click);

            #line default
            #line hidden
                return;

            case 35:
                this.BalanceKpTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 36:
                this.BalanceKiTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 37:
                this.VelocityKpTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 38:
                this.VelocityKiTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 39:
                this.AngleTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 40:
                this.SpeedTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 41:
                this.SetBalanceKpButton = ((System.Windows.Controls.Button)(target));

            #line 206 "..\..\MainWindow.xaml"
                this.SetBalanceKpButton.Click += new System.Windows.RoutedEventHandler(this.SetBalanceKpButton_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.SetBalanceKiButton = ((System.Windows.Controls.Button)(target));

            #line 207 "..\..\MainWindow.xaml"
                this.SetBalanceKiButton.Click += new System.Windows.RoutedEventHandler(this.SetBalanceKiButton_Click);

            #line default
            #line hidden
                return;

            case 43:
                this.SetVelocityKpButton = ((System.Windows.Controls.Button)(target));

            #line 208 "..\..\MainWindow.xaml"
                this.SetVelocityKpButton.Click += new System.Windows.RoutedEventHandler(this.SetVelocityKpButton_Click);

            #line default
            #line hidden
                return;

            case 44:
                this.SetVelocityKiButton = ((System.Windows.Controls.Button)(target));

            #line 209 "..\..\MainWindow.xaml"
                this.SetVelocityKiButton.Click += new System.Windows.RoutedEventHandler(this.SetVelocityKiButton_Click);

            #line default
            #line hidden
                return;

            case 45:
                this.SetAngleButton = ((System.Windows.Controls.Button)(target));

            #line 210 "..\..\MainWindow.xaml"
                this.SetAngleButton.Click += new System.Windows.RoutedEventHandler(this.SetAngleButton_Click);

            #line default
            #line hidden
                return;

            case 46:
                this.SetSpeedButton = ((System.Windows.Controls.Button)(target));

            #line 211 "..\..\MainWindow.xaml"
                this.SetSpeedButton.Click += new System.Windows.RoutedEventHandler(this.SetSpeedButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 52
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 12 "..\..\MainWindow.xaml"
                ((WSN_Forest_Project.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.buttonexit = ((System.Windows.Controls.Button)(target));

            #line 21 "..\..\MainWindow.xaml"
                this.buttonexit.Click += new System.Windows.RoutedEventHandler(this.Buttonexit_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.buttonMinimize = ((System.Windows.Controls.Button)(target));

            #line 22 "..\..\MainWindow.xaml"
                this.buttonMinimize.Click += new System.Windows.RoutedEventHandler(this.ButtonMinimize_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.comboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.comboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnSelectionChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.comboPicture = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.startButton = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\MainWindow.xaml"
                this.startButton.Click += new System.Windows.RoutedEventHandler(this.OnStartButtonClick);

            #line default
            #line hidden
                return;

            case 7:
                this.stopButton = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\MainWindow.xaml"
                this.stopButton.Click += new System.Windows.RoutedEventHandler(this.OnStopButtonClick);

            #line default
            #line hidden
                return;

            case 8:
                this.imageButton = ((System.Windows.Controls.Button)(target));

            #line 45 "..\..\MainWindow.xaml"
                this.imageButton.Click += new System.Windows.RoutedEventHandler(this.OnImageButtonClick);

            #line default
            #line hidden
                return;

            case 9:
                this.webCameraControl = ((WebEye.Controls.Wpf.WebCameraControl)(target));
                return;

            case 10:
                this.MyMap = ((Microsoft.Maps.MapControl.WPF.Map)(target));
                return;

            case 11:
                this.DefaultPin = ((Microsoft.Maps.MapControl.WPF.Pushpin)(target));
                return;

            case 12:
                this.MyPushPin = ((Microsoft.Maps.MapControl.WPF.Pushpin)(target));
                return;

            case 13:
                this.defaultlocbtn = ((System.Windows.Controls.Button)(target));

            #line 56 "..\..\MainWindow.xaml"
                this.defaultlocbtn.Click += new System.Windows.RoutedEventHandler(this.defaultlocbtn_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.GridGrafik = ((System.Windows.Controls.Grid)(target));
                return;

            case 15:
                this.grafikLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.TinggiPlot = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target));
                return;

            case 17:
                this.AccPlot = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target));
                return;

            case 18:
                this.GyroPlot = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target));
                return;

            case 19:
                this.yprButton = ((System.Windows.Controls.Button)(target));

            #line 98 "..\..\MainWindow.xaml"
                this.yprButton.Click += new System.Windows.RoutedEventHandler(this.yprButton_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.elevasiButton = ((System.Windows.Controls.Button)(target));

            #line 99 "..\..\MainWindow.xaml"
                this.elevasiButton.Click += new System.Windows.RoutedEventHandler(this.elevasiButton_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.ketinggianButton = ((System.Windows.Controls.Button)(target));

            #line 100 "..\..\MainWindow.xaml"
                this.ketinggianButton.Click += new System.Windows.RoutedEventHandler(this.ketinggianButton_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.GridTerminal = ((System.Windows.Controls.Grid)(target));
                return;

            case 23:
                this.terminalText = ((System.Windows.Controls.TextBox)(target));

            #line 106 "..\..\MainWindow.xaml"
                this.terminalText.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.terminalText_PreviewKeyDown);

            #line default
            #line hidden
                return;

            case 24:
                this.visualButton = ((System.Windows.Controls.Button)(target));

            #line 117 "..\..\MainWindow.xaml"
                this.visualButton.Click += new System.Windows.RoutedEventHandler(this.visualButton_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.logButton = ((System.Windows.Controls.Button)(target));

            #line 118 "..\..\MainWindow.xaml"
                this.logButton.Click += new System.Windows.RoutedEventHandler(this.logButton_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.tabVisual = ((System.Windows.Controls.Grid)(target));
                return;

            case 27:
                this.gridKoneksi = ((System.Windows.Controls.Grid)(target));
                return;

            case 28:
                this.portCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 29:
                this.baudCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 30:
                this.databitCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 31:
                this.stopbitCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 32:
                this.parityCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 33:
                this.handshakeCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 34:
                this.delayCombo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 35:
                this.portLauncher = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 36:
                this.konekButton = ((System.Windows.Controls.Button)(target));

            #line 155 "..\..\MainWindow.xaml"
                this.konekButton.Click += new System.Windows.RoutedEventHandler(this.konekButton_Click);

            #line default
            #line hidden
                return;

            case 37:
                this.gridUtama = ((System.Windows.Controls.Grid)(target));
                return;

            case 38:
                this.barKetinggian = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 39:
                this.barElevasi = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 40:
                this.barTemperatur = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 41:
                this.barTekanan = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 42:
                this.barYaw = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 43:
                this.barPitch = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 44:
                this.barRoll = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 45:
                this.lblLatitude = ((System.Windows.Controls.Label)(target));
                return;

            case 46:
                this.lblLongitude = ((System.Windows.Controls.Label)(target));
                return;

            case 47:
                this.lblKetinggian = ((System.Windows.Controls.Label)(target));
                return;

            case 48:
                this.lblElevasi = ((System.Windows.Controls.Label)(target));
                return;

            case 49:
                this.lblTemperatur = ((System.Windows.Controls.Label)(target));
                return;

            case 50:
                this.lblTekanan = ((System.Windows.Controls.Label)(target));
                return;

            case 51:
                this.lblYaw = ((System.Windows.Controls.Label)(target));
                return;

            case 52:
                this.lblPitch = ((System.Windows.Controls.Label)(target));
                return;

            case 53:
                this.lblRoll = ((System.Windows.Controls.Label)(target));
                return;

            case 54:
                this.lblTimer = ((System.Windows.Controls.Label)(target));
                return;

            case 55:
                this.btnRefresh = ((System.Windows.Controls.Button)(target));

            #line 225 "..\..\MainWindow.xaml"
                this.btnRefresh.Click += new System.Windows.RoutedEventHandler(this.btnRefresh_Click);

            #line default
            #line hidden
                return;

            case 56:
                this.tabLog = ((System.Windows.Controls.Grid)(target));
                return;

            case 57:
                this.datagridLog = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 58:
                this.Landasan3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 59:
                this.DefaultGroup = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 60:
                this.group = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 61:
                this.rocket3D = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 62:
                this.myQuaternionRotation3D = ((System.Windows.Media.Media3D.QuaternionRotation3D)(target));
                return;

            case 63:
                this.btnPutus = ((System.Windows.Controls.Button)(target));

            #line 2195 "..\..\MainWindow.xaml"
                this.btnPutus.Click += new System.Windows.RoutedEventHandler(this.btnPutus_Click);

            #line default
            #line hidden
                return;

            case 64:
                this.btnCapture = ((System.Windows.Controls.Button)(target));

            #line 2197 "..\..\MainWindow.xaml"
                this.btnCapture.Click += new System.Windows.RoutedEventHandler(this.btnCapture_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 53
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.slider1 = ((System.Windows.Controls.Slider)(target));
                return;

            case 2:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 3:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 4:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 6:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.DefaultGroup = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.stitch_result_stitch_allContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.stitch_result_stitch_all = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 11:
                this.Material__28Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 12:
                this.Material__28 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 13:
                this.Material__29Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.Material__29 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 54
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((WPF三维图形.Window1)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.viewport3d = ((System.Windows.Controls.Viewport3D)(target));

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseMove += new System.Windows.Input.MouseEventHandler(this.viewport3d_MouseMove);

            #line default
            #line hidden

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.viewport3d_MouseWheel);

            #line default
            #line hidden
                return;

            case 4:
                this.ppc = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 5:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 8:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 10:
                this.Box01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 11:
                this.DefaultMaterial = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 12:
                this.reset = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\Window1.xaml"
                this.reset.Click += new System.Windows.RoutedEventHandler(this.reset_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 55
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cm = ((System.Windows.Controls.ContextMenu)(target));
                return;

            case 2:

            #line 18 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_0);

            #line default
            #line hidden
                return;

            case 3:

            #line 19 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_1);

            #line default
            #line hidden
                return;

            case 4:

            #line 20 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_2);

            #line default
            #line hidden
                return;

            case 5:

            #line 21 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_3);

            #line default
            #line hidden
                return;

            case 6:

            #line 22 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_4);

            #line default
            #line hidden
                return;

            case 7:

            #line 23 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_5);

            #line default
            #line hidden
                return;

            case 8:
                this.ClockGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 9:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 10:
                this.DigitDropShadow = ((System.Windows.Media.Effects.DropShadowBitmapEffect)(target));
                return;

            case 11:
                this.PCamera_clock1 = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 12:
                this.ModelVisual3D_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 13:
                this.AmbientLightContainer_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.AmbLight_10h = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 15:
                this.DirectionalLightContainer_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.DirectionalLight_10h = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 17:
                this.ModelVisual3D_1m = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 18:
                this.DefaultGroup_1m = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 19:
                this.GeometryModel3DGeometry_1m = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 779 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_1m.Changed += new System.EventHandler(this.GeometryModel3D_1mChanged);

            #line default
            #line hidden
                return;

            case 20:
                this.ModelVisual3D_10s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 21:
                this.DefaultGroup_10s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 22:
                this.GeometryModel3DGeometry_10s = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 808 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_10s.Changed += new System.EventHandler(this.GeometryModel3D_10sChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.ModelVisual3D_1s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 24:
                this.DefaultGroup_1s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 25:
                this.GeometryModel3DGeometry_1s = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 837 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_1s.Changed += new System.EventHandler(this.GeometryModel3D_1sChanged);

            #line default
            #line hidden
                return;

            case 26:
                this.ModelVisual3D_div1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 27:
                this.DefaultGroup_div1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 28:
                this.GeometryModel3DGeometry_div1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 866 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_div1.Changed += new System.EventHandler(this.GeometryModel3D_10sChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 56
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\MainWindow.xaml"
                ((Processes_Manage.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Media.Animation.Storyboard)(target)).Completed += new System.EventHandler(this.zoomInStoryboardCompleted);

            #line default
            #line hidden
                return;

            case 3:

            #line 33 "..\..\MainWindow.xaml"
                ((System.Windows.Media.Animation.Storyboard)(target)).Completed += new System.EventHandler(this.zoomOutStoryboardCompleted);

            #line default
            #line hidden
                return;

            case 4:
                this.newTask_MenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 67 "..\..\MainWindow.xaml"
                this.newTask_MenuItem.Click += new System.Windows.RoutedEventHandler(this.newTask_MenuItem_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.quit_MenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 69 "..\..\MainWindow.xaml"
                this.quit_MenuItem.Click += new System.Windows.RoutedEventHandler(this.quit_MenuItem_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.topmost_MenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 73 "..\..\MainWindow.xaml"
                this.topmost_MenuItem.Click += new System.Windows.RoutedEventHandler(this.topmost_MenuItem_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.set_MenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 77 "..\..\MainWindow.xaml"
                this.set_MenuItem.Click += new System.Windows.RoutedEventHandler(this.set_MenuItem_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.about_MenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 80 "..\..\MainWindow.xaml"
                this.about_MenuItem.Click += new System.Windows.RoutedEventHandler(this.about_MenuItem_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.FirstPageRadioButton = ((System.Windows.Controls.RadioButton)(target));

            #line 88 "..\..\MainWindow.xaml"
                this.FirstPageRadioButton.Checked += new System.Windows.RoutedEventHandler(this.pageSelected);

            #line default
            #line hidden
                return;

            case 10:

            #line 89 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.pageSelected);

            #line default
            #line hidden
                return;

            case 11:

            #line 90 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.pageSelected);

            #line default
            #line hidden
                return;

            case 12:

            #line 91 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.pageSelected);

            #line default
            #line hidden
                return;

            case 13:

            #line 92 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.pageSelected);

            #line default
            #line hidden
                return;

            case 14:
                this.myViewport3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 15:
                this.myPlane = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 16:
                this.myGeometry = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 17:
                this.myHorizontalRotation = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 18:
                this.MyHorizontalAxisAngleRotation3D = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 19:
                this.MyScaleTransform3D = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;

            case 20:
                this.scrollViewerBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 21:
                this.myScrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 22:
                this.mainFrame = ((System.Windows.Controls.Frame)(target));

            #line 182 "..\..\MainWindow.xaml"
                this.mainFrame.ContentRendered += new System.EventHandler(this.frameContentRendered);

            #line default
            #line hidden
                return;

            case 23:
                this.processesNums_Now = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 24:
                this.cpu_Rate = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 25:
                this.memory_Rate = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 26:
                this.gpu_temperature = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 57
0
        private void button_Click_2(object sender, RoutedEventArgs e)
        {
            //ball的模型
            Model3DGroup ballGroup = new Model3DGroup();

            foreach (BallModel model in MainViewModel.ProjData.BallCollection)
            {
                System.Windows.Media.Media3D.MeshGeometry3D ballMesh = new System.Windows.Media.Media3D.MeshGeometry3D
                {
                    Positions       = new Point3DCollection(),
                    Normals         = new Vector3DCollection(),
                    TriangleIndices = new Int32Collection()
                };
                HelixToolkit.Wpf.SharpDX.MeshGeometry3D geometry = model.Geometry as HelixToolkit.Wpf.SharpDX.MeshGeometry3D;

                if (geometry == null)
                {
                    return;
                }

                foreach (Vector3 position in geometry.Positions)
                {
                    ballMesh.Positions.Add(new Point3D(position.X, position.Y, position.Z));
                }
                foreach (Vector3 normal in geometry.Normals)
                {
                    ballMesh.Normals.Add(new Vector3D(normal.X, normal.Y, normal.Z));
                }
                foreach (int triangleindice in geometry.TriangleIndices)
                {
                    ballMesh.TriangleIndices.Add(triangleindice);
                }
                System.Windows.Media.Media3D.GeometryModel3D ballModel = new System.Windows.Media.Media3D.GeometryModel3D
                {
                    Geometry = ballMesh,
                };

                ballGroup.Children.Add(ballModel);
            }

            StlExporter export1 = new StlExporter();
            string      name1   = "ball.stl";

            using (var fileStream = File.Create("D:\\Desktop\\test\\" + name1))
            {
                export1.Export(ballGroup, fileStream);
            }



            //存球資料
            FileStream   fs = new FileStream("D:\\Desktop\\test\\balldata.txt", FileMode.Create);
            StreamWriter sw = new StreamWriter(fs);

            foreach (BallModel model in MainViewModel.ProjData.BallCollection)
            {
                sw.Write(model.BallCenter.X + " " + model.BallCenter.Y + " " + model.BallCenter.Z + "\r\n");
            }
            //清空緩衝區
            sw.Flush();
            //關閉流
            sw.Close();
            fs.Close();
        }
Ejemplo n.º 58
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myVlcControl = ((Vlc.DotNet.Wpf.VlcControl)(target));
                return;

            case 2:
                this.textBlockOpen = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.Cube = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 4:
                this.Front = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.Right = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 6:
                this.Top = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 7:
                this.sliderVolume = ((System.Windows.Controls.Slider)(target));

            #line 82 "..\..\VlcPlayer.xaml"
                this.sliderVolume.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.SliderVolumeValueChanged);

            #line default
            #line hidden
                return;

            case 8:
                this.checkboxMute = ((System.Windows.Controls.CheckBox)(target));

            #line 83 "..\..\VlcPlayer.xaml"
                this.checkboxMute.Checked += new System.Windows.RoutedEventHandler(this.CheckboxMuteCheckedChanged);

            #line default
            #line hidden

            #line 83 "..\..\VlcPlayer.xaml"
                this.checkboxMute.Unchecked += new System.Windows.RoutedEventHandler(this.CheckboxMuteCheckedChanged);

            #line default
            #line hidden
                return;

            case 9:
                this.buttonPlay = ((System.Windows.Controls.Button)(target));

            #line 84 "..\..\VlcPlayer.xaml"
                this.buttonPlay.Click += new System.Windows.RoutedEventHandler(this.ButtonPlayClick);

            #line default
            #line hidden
                return;

            case 10:
                this.buttonPause = ((System.Windows.Controls.Button)(target));

            #line 85 "..\..\VlcPlayer.xaml"
                this.buttonPause.Click += new System.Windows.RoutedEventHandler(this.ButtonPauseClick);

            #line default
            #line hidden
                return;

            case 11:
                this.buttonStop = ((System.Windows.Controls.Button)(target));

            #line 86 "..\..\VlcPlayer.xaml"
                this.buttonStop.Click += new System.Windows.RoutedEventHandler(this.ButtonStopClick);

            #line default
            #line hidden
                return;

            case 12:
                this.buttonPrevious = ((System.Windows.Controls.Button)(target));

            #line 87 "..\..\VlcPlayer.xaml"
                this.buttonPrevious.Click += new System.Windows.RoutedEventHandler(this.ButtonPreviousClick);

            #line default
            #line hidden
                return;

            case 13:
                this.buttonNext = ((System.Windows.Controls.Button)(target));

            #line 88 "..\..\VlcPlayer.xaml"
                this.buttonNext.Click += new System.Windows.RoutedEventHandler(this.ButtonNextClick);

            #line default
            #line hidden
                return;

            case 14:
                this.buttonOpen = ((System.Windows.Controls.Button)(target));

            #line 89 "..\..\VlcPlayer.xaml"
                this.buttonOpen.Click += new System.Windows.RoutedEventHandler(this.ButtonOpenClick);

            #line default
            #line hidden
                return;

            case 15:
                this.buttonPlayYoutubeSample = ((System.Windows.Controls.Button)(target));

            #line 90 "..\..\VlcPlayer.xaml"
                this.buttonPlayYoutubeSample.Click += new System.Windows.RoutedEventHandler(this.ButtonPlayYoutubeSample);

            #line default
            #line hidden
                return;

            case 16:
                this.textBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 17:
                this.sliderPosition = ((System.Windows.Controls.Slider)(target));

            #line 94 "..\..\VlcPlayer.xaml"
                this.sliderPosition.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.SliderValueChanged);

            #line default
            #line hidden

            #line 94 "..\..\VlcPlayer.xaml"
                this.sliderPosition.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.SliderMouseLeftButtonDown);

            #line default
            #line hidden

            #line 94 "..\..\VlcPlayer.xaml"
                this.sliderPosition.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.SliderMouseLeftButtonUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 59
0
        //用來輸入文字文件,然後輸出球的模型檔案
        private void SaveBall()
        {
            string path = "D:\\Desktop\\新文字文件.txt";

            try
            {
                string   fileContent  = File.ReadAllText(path);
                string[] contentArray = fileContent.Split((string[])null, StringSplitOptions.RemoveEmptyEntries);
                float[]  pointInfo    = Array.ConvertAll(contentArray, float.Parse);
                if (pointInfo.Length % 3 != 0)
                {
                    throw new Exception();
                }

                var ballContainer = new HelixToolkit.Wpf.SharpDX.MeshBuilder();
                for (int i = 0; i < pointInfo.Length / 3; i++)
                {
                    ballContainer.AddSphere(new Vector3(pointInfo[i * 3], pointInfo[i * 3 + 1], pointInfo[i * 3 + 2]), 1.5);
                }

                System.Windows.Media.Media3D.MeshGeometry3D ballMesh = new System.Windows.Media.Media3D.MeshGeometry3D
                {
                    Positions       = new Point3DCollection(),
                    Normals         = new Vector3DCollection(),
                    TriangleIndices = new Int32Collection()
                };
                HelixToolkit.Wpf.SharpDX.MeshGeometry3D geometry = ballContainer.ToMeshGeometry3D();

                foreach (Vector3 position in geometry.Positions)
                {
                    ballMesh.Positions.Add(new Point3D(position.X, position.Y, position.Z));
                }
                foreach (Vector3 normal in geometry.Normals)
                {
                    ballMesh.Normals.Add(new Vector3D(normal.X, normal.Y, normal.Z));
                }
                foreach (int triangleindice in geometry.TriangleIndices)
                {
                    ballMesh.TriangleIndices.Add(triangleindice);
                }

                System.Windows.Media.Media3D.GeometryModel3D ballModel = new System.Windows.Media.Media3D.GeometryModel3D
                {
                    Geometry = ballMesh,
                };

                Model3DGroup ballGroup = new Model3DGroup();


                ballGroup.Children.Add(ballModel);

                StlExporter export1 = new StlExporter();
                string      name1   = "ball.stl";
                using (var fileStream = File.Create("D:\\Desktop\\" + name1))
                {
                    export1.Export(ballGroup, fileStream);
                }
            }
            catch
            {
                System.Windows.MessageBox.Show("點的讀取錯誤");
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\MainWindow.xaml"
                ((Wpf3D.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Viewport3D_MouseMove);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                ((Wpf3D.MainWindow)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Viewport3D_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((Wpf3D.MainWindow)(target)).MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Viewport3D_MouseWheel);

            #line default
            #line hidden
                return;

            case 2:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 3:
                this.light = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.magicCube = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.cube = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 6:
                this.F1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 7:
                this.F2 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 8:
                this.F3 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 9:
                this.F4 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 10:
                this.F5 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 11:
                this.F6 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }