Example #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listBox = ((System.Windows.Controls.ListBox)(target));

            #line 18 "..\..\..\3DControl.xaml"
                this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);

            #line default
            #line hidden
                return;

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

            case 3:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.SenceGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

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

            case 8:
                this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

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

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

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

            case 12:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\Carousel.xaml"
                ((Bornander.UI.TabCarousel.Carousel)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.HandleSizeChanged);

            #line default
            #line hidden
                return;

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

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

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

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

            case 6:
                this.CarouselContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #3
0
        private void CreateLights()
        {
            _lightsModel3DGroup = new Model3DGroup();

            var ambientLight = new System.Windows.Media.Media3D.AmbientLight(Color.FromRgb(25, 25, 25));

            _lightsModel3DGroup.Children.Add(ambientLight);


            _lightHorizontalAngle = 0;
            _lightVerticalAngle   = 30;

            _lightDistance = 500;
            _lightRange    = 2000;

            _directionalLight = new System.Windows.Media.Media3D.DirectionalLight();

            _shadowSpotLight = new System.Windows.Media.Media3D.SpotLight();
            _shadowSpotLight.InnerConeAngle = 40;
            _shadowSpotLight.OuterConeAngle = 50;


            var modelVisual3D = new ModelVisual3D();

            modelVisual3D.Content = _lightsModel3DGroup;

            MainDXViewportView.Viewport3D.Children.Add(modelVisual3D);

            UpdateLights();
            UpdateCastingShadowLight();
        }
Example #4
0
        public SceneViewModel()
        {
            scene = new Model3DGroup();

            ambientLight = new AmbientLight(Colors.DarkGray);
            directionalLight = new DirectionalLight(Colors.White, new Vector3D(-5, -5, -7));

            scene.Children.Add(ambientLight);
            scene.Children.Add(directionalLight);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.PerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 2:
                this.containerUIElement3D = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

            case 3:
                this.FrontViewport2DVisual3D = ((System.Windows.Media.Media3D.Viewport2DVisual3D)(target));
                return;

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

            #line 169 "..\..\..\Transform\Viewport3DTransform.xaml"
                this.newS.Click += new System.Windows.RoutedEventHandler(this.newS_Click);

            #line default
            #line hidden
                return;

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

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

            #line 215 "..\..\..\Transform\Viewport3DTransform.xaml"
                this.setS.Click += new System.Windows.RoutedEventHandler(this.setS_Click);

            #line default
            #line hidden
                return;

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

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

            case 9:
                this.DisPlayControl = ((System.Windows.Controls.UserControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #6
0
		public void AddLight(Color directColor, Vector3D direction, Color ambientColor)
		{
			AmbientLight al = new AmbientLight(ambientColor);
			DirectionalLight dl = new DirectionalLight(directColor, direction);
			ModelVisual3D ma = new ModelVisual3D();
			ModelVisual3D md = new ModelVisual3D();
			ma.Content = al;
			md.Content = dl;
			Children.Add(ma);
			Children.Add(md);
		}
 /// <summary>
 /// Updates the positions
 /// </summary>
 /// <param name="x">The X direction acceleration</param>
 /// <param name="y">The Y direction acceleration</param>
 /// <param name="z">The Z direction acceleration</param>
 public void UpdateDisplay(double x, double y, double z)
 {
     mainViewport.Children.Clear();
     CubeBuilder cubeBuilder = new CubeBuilder(Color.FromRgb(0, 0, 255));
     mainViewport.Children.Add(cubeBuilder.Create(CubeBuilder.Direction.X, x * 3));
     cubeBuilder.CubeColor = Color.FromRgb(0, 255, 0);
     mainViewport.Children.Add(cubeBuilder.Create(CubeBuilder.Direction.Y, y * 3));
     cubeBuilder.CubeColor = Color.FromRgb(255, 0, 0);
     mainViewport.Children.Add(cubeBuilder.Create(CubeBuilder.Direction.Z, z * 3));
     ModelVisual3D lightSource = new ModelVisual3D();
     AmbientLight light = new AmbientLight(Color.FromRgb(255,255,255));
     lightSource.Content = light;
     mainViewport.Children.Add(lightSource);
 }
Example #8
0
        public MainWindow()
        {
            InitializeComponent();
            Calculate();
            // Declare scene objects.

            Model3DGroup myModel3DGroup = new Model3DGroup();

            ModelVisual3D myModelVisual3D = new ModelVisual3D();
            // Defines the camera used to view the 3D object. In order to view the 3D object,
            // the camera must be positioned and pointed such that the object is within view
            // of the camera.
            PerspectiveCamera myPCamera = new PerspectiveCamera();

            // Specify where in the 3D scene the camera is.
            myPCamera.Position = new Point3D(0, 0, -80);

            // Specify the direction that the camera is pointing.
            myPCamera.LookDirection = new Vector3D(0, 0, 1);

            // Define camera's horizontal field of view in degrees.
            myPCamera.FieldOfView = 80;

            // Asign the camera to the viewport
            myViewport3D.Camera = myPCamera;
            // Define the lights cast in the scene. Without light, the 3D object cannot
            // be seen. Note: to illuminate an object from additional directions, create
            // additional lights.
            AmbientLight _ambLight = new AmbientLight(System.Windows.Media.Brushes.White.Color);
            myModel3DGroup.Children.Add(_ambLight);

            // Add the geometry model to the model group.
            myModel3DGroup.Children.Add(myGeometryModel);

            // Add the group of models to the ModelVisual3d.
            myModelVisual3D.Content = myModel3DGroup;

            //
            myViewport3D.Children.Add(myModelVisual3D);

            // Apply the viewport to the page so it will be rendered.
            this.Content = myViewport3D;

            System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 30);
            dispatcherTimer.Start();
        }
        private void CreateLights()
        {
            var lightsVisual3D = new ModelVisual3D();

            MainViewport.Children.Add(lightsVisual3D);

            var lightsGroup = new Model3DGroup();

            lightsVisual3D.Content = lightsGroup;

            _wpfSpotLight       = new System.Windows.Media.Media3D.SpotLight();
            _wpfSpotLight.Color = System.Windows.Media.Color.FromRgb(200, 200, 200);

            // Attenuation describes how the distance from the light affects the intensity
            // When ConstantAttenuation == 1 and LinearAttenuation == 0 and QuadraticAttenuation == 0 this means that distance does not affect the light intensity
            // The attenuation factor is calculated as:
            // attFactor = ConstantAttenuation + LinearAttenuation * d + QuadraticAttenuation * d * d;  // d is distance from the light
            // The final light color is get by divided the light color by attFactor.
            _wpfSpotLight.ConstantAttenuation  = 1.0;
            _wpfSpotLight.LinearAttenuation    = 0.0;
            _wpfSpotLight.QuadraticAttenuation = 0;
            _wpfSpotLight.OuterConeAngle       = 40;
            _wpfSpotLight.InnerConeAngle       = 35;
            _wpfSpotLight.Range = 4000;


            lightsGroup.Children.Add(_wpfSpotLight);

            _wpfPointLight1       = new PointLight();
            _wpfPointLight1.Range = 100;
            _wpfPointLight1.ConstantAttenuation  = 0.0;
            _wpfPointLight1.LinearAttenuation    = 1.0 / 50.0; // the light intensity decreased by distance from light
            _wpfPointLight1.QuadraticAttenuation = 0;
            lightsGroup.Children.Add(_wpfPointLight1);

            UpdateLightPositions(time: 0);


            //var directionalLight = new DirectionalLight();
            //directionalLight.Direction = new Vector3D(0, -0.1, -1);
            //lightsGroup.Children.Add(directionalLight);


            var wpfAmbientLight = new System.Windows.Media.Media3D.AmbientLight(System.Windows.Media.Color.FromRgb(10, 10, 10));

            lightsGroup.Children.Add(wpfAmbientLight);
        }
        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;
        }
Example #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 21 "..\..\Trackport3D.xaml"
                ((_3DTools.Trackport3D)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);

            #line default
            #line hidden
                return;

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

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

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

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

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

            case 7:
                this.CaptureBorder = ((System.Windows.Controls.Border)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #12
0
        private void InitializeLight()
        {
            _hoverLight = new PointLight(Colors.White, new Point3D(0, 0, 0));
            UtilityWPF.SetAttenuation(_hoverLight, _camera.Position.ToVector().Length * 2d, .95d);

            _selectedLight = new AmbientLight(UtilityWPF.ColorFromHex("808080"));
        }
Example #13
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 5 "..\..\..\GameWindow.xaml"
     ((Menu.GameWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 5 "..\..\..\GameWindow.xaml"
     ((Menu.GameWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 55 "..\..\..\GameWindow.xaml"
     ((System.Windows.Shapes.Rectangle)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.RectMouseDown);
     
     #line default
     #line hidden
     return;
     case 3:
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
     
     #line 63 "..\..\..\GameWindow.xaml"
     this.textBlock1.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.TBMouseDown);
     
     #line default
     #line hidden
     return;
     case 4:
     this.wrapPanel1 = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 68 "..\..\..\GameWindow.xaml"
     this.wrapPanel1.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.wrapPanel1_MouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 5:
     this.newcam = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 6:
     this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 7:
     this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 8:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 9:
     this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 11:
     this.DefaultGroup = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 12:
     this.Torus_064Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.Torus_064 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 14:
     this.Torus_063Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 15:
     this.Torus_063 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 16:
     this.Torus_062Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 17:
     this.Torus_062 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 18:
     this.Torus_061Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 19:
     this.Torus_061 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 20:
     this.Torus_060Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 21:
     this.Torus_060 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 22:
     this.Torus_059Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 23:
     this.Torus_059 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 24:
     this.Torus_058Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 25:
     this.Torus_058 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 26:
     this.Torus_057Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 27:
     this.Torus_057 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 28:
     this.Torus_056Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 29:
     this.Torus_056 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 30:
     this.Torus_055Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 31:
     this.Torus_055 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 32:
     this.Torus_054Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 33:
     this.Torus_054 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 34:
     this.Torus_053Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 35:
     this.Torus_053 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 36:
     this.Torus_052Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 37:
     this.Torus_052 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 38:
     this.Torus_051Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 39:
     this.Torus_051 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 40:
     this.Torus_050Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 41:
     this.Torus_050 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 42:
     this.Torus_049Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 43:
     this.Torus_049 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 44:
     this.Torus_048Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 45:
     this.Torus_048 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 46:
     this.Torus_047Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 47:
     this.Torus_047 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 48:
     this.Torus_046Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 49:
     this.Torus_046 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 50:
     this.Torus_045Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 51:
     this.Torus_045 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 52:
     this.Torus_044Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 53:
     this.Torus_044 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 54:
     this.Torus_043Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 55:
     this.Torus_043 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 56:
     this.Torus_042Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 57:
     this.Torus_042 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 58:
     this.Torus_041Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 59:
     this.Torus_041 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 60:
     this.Torus_040Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 61:
     this.Torus_040 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 62:
     this.Torus_039Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 63:
     this.Torus_039 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 64:
     this.Torus_038Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 65:
     this.Torus_038 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 66:
     this.Torus_037Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 67:
     this.Torus_037 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 68:
     this.Torus_036Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 69:
     this.Torus_036 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 70:
     this.Torus_035Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 71:
     this.Torus_035 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 72:
     this.Torus_034Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 73:
     this.Torus_034 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 74:
     this.Torus_033Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 75:
     this.Torus_033 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 76:
     this.Torus_032Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 77:
     this.Torus_032 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 78:
     this.Torus_031Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 79:
     this.Torus_031 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 80:
     this.Torus_030Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 81:
     this.Torus_030 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 82:
     this.Torus_029Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 83:
     this.Torus_029 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 84:
     this.Torus_028Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 85:
     this.Torus_028 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 86:
     this.Torus_027Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 87:
     this.Torus_027 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 88:
     this.Torus_026Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 89:
     this.Torus_026 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 90:
     this.Torus_025Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 91:
     this.Torus_025 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 92:
     this.Torus_024Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 93:
     this.Torus_024 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 94:
     this.Torus_023Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 95:
     this.Torus_023 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 96:
     this.Torus_022Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 97:
     this.Torus_022 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 98:
     this.Torus_021Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 99:
     this.Torus_021 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 100:
     this.Torus_020Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 101:
     this.Torus_020 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 102:
     this.Torus_019Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 103:
     this.Torus_019 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 104:
     this.Torus_018Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 105:
     this.Torus_018 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 106:
     this.Torus_017Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 107:
     this.Torus_017 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 108:
     this.Torus_016Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 109:
     this.Torus_016 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 110:
     this.Torus_015Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 111:
     this.Torus_015 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 112:
     this.Torus_014Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 113:
     this.Torus_014 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 114:
     this.Torus_013Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 115:
     this.Torus_013 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 116:
     this.Torus_012Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 117:
     this.Torus_012 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 118:
     this.Torus_011Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 119:
     this.Torus_011 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 120:
     this.Torus_010Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 121:
     this.Torus_010 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 122:
     this.Torus_009Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 123:
     this.Torus_009 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 124:
     this.Torus_008Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 125:
     this.Torus_008 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 126:
     this.Torus_007Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 127:
     this.Torus_007 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 128:
     this.Torus_006Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 129:
     this.Torus_006 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 130:
     this.Torus_005Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 131:
     this.Torus_005 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 132:
     this.Torus_004Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 133:
     this.Torus_004 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 134:
     this.Torus_003Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 135:
     this.Torus_003 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 136:
     this.Torus_002Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 137:
     this.Torus_002 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 138:
     this.Torus_001Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 139:
     this.Torus_001 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 140:
     this.Cube_015Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 141:
     this.Cube_015 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 142:
     this.Cube_014Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 143:
     this.Cube_014 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 144:
     this.Cube_013Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 145:
     this.Cube_013 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 146:
     this.Cube_012Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 147:
     this.Cube_012 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 148:
     this.Cube_011Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 149:
     this.Cube_011 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 150:
     this.Cube_010Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 151:
     this.Cube_010 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 152:
     this.Cube_009Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 153:
     this.Cube_009 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 154:
     this.Cube_008Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 155:
     this.Cube_008 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 156:
     this.Cube_007Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 157:
     this.Cube_007 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 158:
     this.Cube_006Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 159:
     this.Cube_006 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 160:
     this.Cube_005Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 161:
     this.Cube_005 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 162:
     this.Cube_004Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 163:
     this.Cube_004 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 164:
     this.Cube_003Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 165:
     this.Cube_003 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 166:
     this.Cube_002Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 167:
     this.Cube_002 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 168:
     this.Cube_001Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 169:
     this.Cube_001 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 170:
     this.CubeContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 171:
     this.Cube = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 172:
     this.MaterialContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 173:
     this.Material = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 174:
     this.groupBox1 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 175:
     this.wrapPanel2 = ((System.Windows.Controls.WrapPanel)(target));
     return;
     case 176:
     this.Slider1 = ((System.Windows.Controls.Slider)(target));
     
     #line 5809 "..\..\..\GameWindow.xaml"
     this.Slider1.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.Slider1_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 177:
     this.button1 = ((System.Windows.Controls.Button)(target));
     
     #line 5810 "..\..\..\GameWindow.xaml"
     this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);
     
     #line default
     #line hidden
     return;
     case 178:
     this.stackPanel1 = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 179:
     this.button2 = ((System.Windows.Controls.Button)(target));
     
     #line 5822 "..\..\..\GameWindow.xaml"
     this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);
     
     #line default
     #line hidden
     return;
     case 180:
     this.button3 = ((System.Windows.Controls.Button)(target));
     
     #line 5835 "..\..\..\GameWindow.xaml"
     this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);
     
     #line default
     #line hidden
     return;
     case 181:
     this.button4 = ((System.Windows.Controls.Button)(target));
     
     #line 5848 "..\..\..\GameWindow.xaml"
     this.button4.Click += new System.Windows.RoutedEventHandler(this.button4_Click);
     
     #line default
     #line hidden
     return;
     case 182:
     this.button5 = ((System.Windows.Controls.Button)(target));
     
     #line 5861 "..\..\..\GameWindow.xaml"
     this.button5.Click += new System.Windows.RoutedEventHandler(this.button5_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #14
0
        private void InitializeGraphics()
        {
            // Declare scene objects.
             m_Model3DGroup = new Model3DGroup();

             // Set up camera
             var camera = new PerspectiveCamera
             {
            Position = new Point3D(1, 5, -40),
            LookDirection = new Vector3D(-1, -5, 20),
            FieldOfView = 120
             };
             XViewport.Camera = camera;

             // Set up lights
             var ambientLight = new AmbientLight
             {
            Color = AMBIENT_LIGHT
             };
             m_Model3DGroup.Children.Add(ambientLight);

             var pointLight = new PointLight
             {
            Color = POINT_LIGHT,
            Position = new Point3D(10, 20, -10)
             };
             m_Model3DGroup.Children.Add(pointLight);

             // Add the geometry model to the viewport
             m_ModelVisual3D = new ModelVisual3D { Content = m_Model3DGroup };
             XViewport.Children.Add(m_ModelVisual3D);
             m_Lorenz = new LorenzVisual(new Point3D(75, 75, 100));
             XViewport.Children.Add(m_Lorenz);
        }
Example #15
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 2:
     this.textBox2 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 3:
     this.textBox3 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.viewport2 = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 5:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 6:
     this.FurnitureContainer3 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 7:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 8:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 9:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 10:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     case 11:
     this.canvas = ((System.Windows.Controls.Canvas)(target));
     return;
     case 12:
     this.label2 = ((System.Windows.Controls.Label)(target));
     
     #line 54 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.upclick);
     
     #line default
     #line hidden
     return;
     case 13:
     this.label3 = ((System.Windows.Controls.Label)(target));
     
     #line 59 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.downclick);
     
     #line default
     #line hidden
     return;
     case 14:
     this.button2 = ((System.Windows.Controls.Button)(target));
     
     #line 67 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #16
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.addusetrol = ((GloryView.RFID.DeviceMigrations.OldEquipment)(target));
                return;

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

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

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

            case 5:
                this.roomName = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.label3 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.comboBox1 = ((System.Windows.Controls.ComboBox)(target));

            #line 40 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox1_SelectionChanged);

            #line default
            #line hidden
                return;

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

            #line 49 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);

            #line default
            #line hidden
                return;

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

            #line 50 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.dataGrid1 = ((System.Windows.Controls.Grid)(target));
                return;

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

            #line 60 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.viewport1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rightleftdown);

            #line default
            #line hidden
                return;

            case 14:
                this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 15:
                this.FurnitureContainer2 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

            case 16:
                this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

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

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

            case 19:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

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

            #line default
            #line hidden

            #line 7 "..\..\..\MainWindow.xaml"
                ((ThreeDFaces.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged);

            #line default
            #line hidden
                return;

            case 2:

            #line 12 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.miEdit_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 14 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.miDelete_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 17 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.m_iMapping_Click);

            #line default
            #line hidden
                return;

            case 5:

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

            #line default
            #line hidden
                return;

            case 6:

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

            #line default
            #line hidden
                return;

            case 7:
                this.layoutGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.RefImage = ((System.Windows.Controls.Image)(target));

            #line 52 "..\..\..\MainWindow.xaml"
                this.RefImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.RefImage_MouseLeftButtonDown1);

            #line default
            #line hidden
                return;

            case 9:
                this.checkNoStretch = ((System.Windows.Controls.CheckBox)(target));

            #line 54 "..\..\..\MainWindow.xaml"
                this.checkNoStretch.Checked += new System.Windows.RoutedEventHandler(this.checkNoStretch_Checked);

            #line default
            #line hidden

            #line 54 "..\..\..\MainWindow.xaml"
                this.checkNoStretch.Unchecked += new System.Windows.RoutedEventHandler(this.checkNoStretch_Unchecked);

            #line default
            #line hidden
                return;

            case 10:
                this.internallayout = ((System.Windows.Controls.Grid)(target));
                return;

            case 11:
                this.Text1 = ((System.Windows.Controls.TextBox)(target));
                return;

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

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

            #line 89 "..\..\..\MainWindow.xaml"
                this.Button1.Click += new System.Windows.RoutedEventHandler(this.Button1_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.sliderx = ((System.Windows.Controls.Slider)(target));

            #line 96 "..\..\..\MainWindow.xaml"
                this.sliderx.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 15:
                this.slidery = ((System.Windows.Controls.Slider)(target));

            #line 104 "..\..\..\MainWindow.xaml"
                this.slidery.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 16:
                this.sliderz = ((System.Windows.Controls.Slider)(target));

            #line 113 "..\..\..\MainWindow.xaml"
                this.sliderz.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

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

            #line 115 "..\..\..\MainWindow.xaml"
                this.Button3.Click += new System.Windows.RoutedEventHandler(this.Button3_Click);

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden

            #line 118 "..\..\..\MainWindow.xaml"
                this.Button5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Button5_MouseRightButtonDown);

            #line default
            #line hidden
                return;

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

            #line 119 "..\..\..\MainWindow.xaml"
                this.Button6.Click += new System.Windows.RoutedEventHandler(this.Button6_Click);

            #line default
            #line hidden

            #line 119 "..\..\..\MainWindow.xaml"
                this.Button6.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Button6_MouseRightButtonDown);

            #line default
            #line hidden
                return;

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

            #line 120 "..\..\..\MainWindow.xaml"
                this.Button7.Click += new System.Windows.RoutedEventHandler(this.Button7_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.sliderBrightness = ((System.Windows.Controls.Slider)(target));

            #line 121 "..\..\..\MainWindow.xaml"
                this.sliderBrightness.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.sliderContrast = ((System.Windows.Controls.Slider)(target));

            #line 129 "..\..\..\MainWindow.xaml"
                this.sliderContrast.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 24:
                this.ImageMesh = ((System.Windows.Controls.Image)(target));

            #line 147 "..\..\..\MainWindow.xaml"
                this.ImageMesh.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ImageMesh_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

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

            #line 150 "..\..\..\MainWindow.xaml"
                this.chkImageMesh.Checked += new System.Windows.RoutedEventHandler(this.chkImageMesh_Checked);

            #line default
            #line hidden

            #line 150 "..\..\..\MainWindow.xaml"
                this.chkImageMesh.Unchecked += new System.Windows.RoutedEventHandler(this.chkImageMesh_Unchecked);

            #line default
            #line hidden
                return;

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

            #line 151 "..\..\..\MainWindow.xaml"
                this.chkGrid.Checked += new System.Windows.RoutedEventHandler(this.chkGrid_Checked);

            #line default
            #line hidden

            #line 151 "..\..\..\MainWindow.xaml"
                this.chkGrid.Unchecked += new System.Windows.RoutedEventHandler(this.chkGrid_Unchecked);

            #line default
            #line hidden
                return;

            case 27:
                this.sliderRed = ((System.Windows.Controls.Slider)(target));

            #line 163 "..\..\..\MainWindow.xaml"
                this.sliderRed.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 28:
                this.sliderGreen = ((System.Windows.Controls.Slider)(target));

            #line 166 "..\..\..\MainWindow.xaml"
                this.sliderGreen.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 29:
                this.sliderBlue = ((System.Windows.Controls.Slider)(target));

            #line 169 "..\..\..\MainWindow.xaml"
                this.sliderBlue.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 30:
                this.labelColor = ((System.Windows.Controls.Label)(target));
                return;

            case 31:
                this.sliderAmb = ((System.Windows.Controls.Slider)(target));

            #line 173 "..\..\..\MainWindow.xaml"
                this.sliderAmb.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 32:
                this.vscrollz = ((System.Windows.Controls.Slider)(target));

            #line 189 "..\..\..\MainWindow.xaml"
                this.vscrollz.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 33:
                this.vscroll = ((System.Windows.Controls.Slider)(target));

            #line 198 "..\..\..\MainWindow.xaml"
                this.vscroll.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 34:
                this.GridVSnap = ((System.Windows.Controls.Grid)(target));

            #line 200 "..\..\..\MainWindow.xaml"
                this.GridVSnap.PreviewMouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.GridVSnap_PreviewMouseWheel);

            #line default
            #line hidden
                return;

            case 35:
                this.VSnap0 = ((System.Windows.Controls.Image)(target));

            #line 209 "..\..\..\MainWindow.xaml"
                this.VSnap0.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 209 "..\..\..\MainWindow.xaml"
                this.VSnap0.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 36:
                this.VSnap1 = ((System.Windows.Controls.Image)(target));

            #line 210 "..\..\..\MainWindow.xaml"
                this.VSnap1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 210 "..\..\..\MainWindow.xaml"
                this.VSnap1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 37:
                this.VSnap2 = ((System.Windows.Controls.Image)(target));

            #line 211 "..\..\..\MainWindow.xaml"
                this.VSnap2.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 211 "..\..\..\MainWindow.xaml"
                this.VSnap2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 38:
                this.VSnap3 = ((System.Windows.Controls.Image)(target));

            #line 212 "..\..\..\MainWindow.xaml"
                this.VSnap3.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 212 "..\..\..\MainWindow.xaml"
                this.VSnap3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 39:
                this.VSnap4 = ((System.Windows.Controls.Image)(target));

            #line 213 "..\..\..\MainWindow.xaml"
                this.VSnap4.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 213 "..\..\..\MainWindow.xaml"
                this.VSnap4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 40:
                this.VSnap5 = ((System.Windows.Controls.Image)(target));

            #line 214 "..\..\..\MainWindow.xaml"
                this.VSnap5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 214 "..\..\..\MainWindow.xaml"
                this.VSnap5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 41:
                this.GridFModel = ((System.Windows.Controls.Grid)(target));

            #line 217 "..\..\..\MainWindow.xaml"
                this.GridFModel.PreviewMouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.GridFModel_PreviewMouseWheel);

            #line default
            #line hidden
                return;

            case 42:
                this.FModel0 = ((System.Windows.Controls.Image)(target));

            #line 226 "..\..\..\MainWindow.xaml"
                this.FModel0.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 227 "..\..\..\MainWindow.xaml"
                this.FModel0.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 43:
                this.FModel1 = ((System.Windows.Controls.Image)(target));

            #line 228 "..\..\..\MainWindow.xaml"
                this.FModel1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 229 "..\..\..\MainWindow.xaml"
                this.FModel1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 44:
                this.FModel2 = ((System.Windows.Controls.Image)(target));

            #line 230 "..\..\..\MainWindow.xaml"
                this.FModel2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 231 "..\..\..\MainWindow.xaml"
                this.FModel2.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 45:
                this.FModel3 = ((System.Windows.Controls.Image)(target));

            #line 232 "..\..\..\MainWindow.xaml"
                this.FModel3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 233 "..\..\..\MainWindow.xaml"
                this.FModel3.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 46:
                this.FModel4 = ((System.Windows.Controls.Image)(target));

            #line 234 "..\..\..\MainWindow.xaml"
                this.FModel4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 235 "..\..\..\MainWindow.xaml"
                this.FModel4.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 47:
                this.FModel5 = ((System.Windows.Controls.Image)(target));

            #line 236 "..\..\..\MainWindow.xaml"
                this.FModel5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 237 "..\..\..\MainWindow.xaml"
                this.FModel5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 48:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

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

            #line 240 "..\..\..\MainWindow.xaml"
                this.ColorImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ColorImage_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 50:
                this.MeshGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 51:
                this.MeshImage = ((System.Windows.Controls.Image)(target));

            #line 242 "..\..\..\MainWindow.xaml"
                this.MeshImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MeshImage_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 242 "..\..\..\MainWindow.xaml"
                this.MeshImage.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MeshImage_MouseRightButtonDown);

            #line default
            #line hidden
                return;

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

            #line 244 "..\..\..\MainWindow.xaml"
                this.viewport3d.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseDown);

            #line default
            #line hidden

            #line 244 "..\..\..\MainWindow.xaml"
                this.viewport3d.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseRightButtonDown);

            #line default
            #line hidden
                return;

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

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

            case 55:
                this.theGeometry = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 56:
                this.theMaterial = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 57:
                this.hscroll = ((System.Windows.Controls.Slider)(target));

            #line 373 "..\..\..\MainWindow.xaml"
                this.hscroll.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        private void GenertateView(double a, double b, double c, double rx, double ry, double rz, double x1, double x2, double y1, double y2, double z1, double z2)
        {
            MyViewport.Camera = _perspectiveCamera1;
            //_perspectiveCamera1 = MakeCamera();
            Viewport3D2.Camera = _perspectiveCamera1;
            Eclip.Children.Add(Viewport3D2);

            ModelVisual3D modelVisual3D = new ModelVisual3D();
            Viewport3D2.Children.Add(modelVisual3D);

            Model3DGroup model3DGroup = new Model3DGroup();
            modelVisual3D.Content = model3DGroup;

            AmbientLight ambientLight = new AmbientLight();
            ambientLight.Color = Colors.Gray;
            model3DGroup.Children.Add(ambientLight);

            DirectionalLight directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("-1,-3,-2"));
            model3DGroup.Children.Add(directionalLight);

            directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("1,-2,3"));
            model3DGroup.Children.Add(directionalLight);

            AddEllipsoid(model3DGroup, Colors.Orange, a, b, c, rx, ry, rz);
            ConstructCube(x1, x2, y1, y2, z1, z2, model3DGroup);
        }
Example #19
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;
        }
Example #20
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listBox = ((System.Windows.Controls.ListBox)(target));

            #line 18 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);

            #line default
            #line hidden
                return;

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

            #line 28 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.button5.Click += new System.Windows.RoutedEventHandler(this.button5_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));
                return;

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

            #line 31 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click_1);

            #line default
            #line hidden
                return;

            case 6:
                this.label8 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.SenceGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

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

            case 10:
                this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

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

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

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

            case 14:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;

            case 15:
                this.canvas1 = ((System.Windows.Controls.Canvas)(target));
                return;

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

            #line 58 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowupclick);

            #line default
            #line hidden
                return;

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

            #line 63 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdownclick);

            #line default
            #line hidden
                return;

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

            #line 68 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowleftclick);

            #line default
            #line hidden
                return;

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

            #line 73 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowrightclick);

            #line default
            #line hidden
                return;

            case 20:
                this.label6 = ((System.Windows.Controls.Label)(target));

            #line 78 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label6.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowaddclick);

            #line default
            #line hidden
                return;

            case 21:
                this.label7 = ((System.Windows.Controls.Label)(target));

            #line 83 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label7.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdelclick);

            #line default
            #line hidden
                return;

            case 22:
                this.label9 = ((System.Windows.Controls.Label)(target));

            #line 88 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label9.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rebackclick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #21
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.listBox = ((System.Windows.Controls.ListBox)(target));
     
     #line 18 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.button5 = ((System.Windows.Controls.Button)(target));
     
     #line 28 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.button5.Click += new System.Windows.RoutedEventHandler(this.button5_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.button1 = ((System.Windows.Controls.Button)(target));
     
     #line 31 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click_1);
     
     #line default
     #line hidden
     return;
     case 6:
     this.label8 = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.SenceGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 8:
     this.viewport = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 9:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 10:
     this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 11:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 12:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 13:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 14:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     case 15:
     this.canvas1 = ((System.Windows.Controls.Canvas)(target));
     return;
     case 16:
     this.label2 = ((System.Windows.Controls.Label)(target));
     
     #line 58 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowupclick);
     
     #line default
     #line hidden
     return;
     case 17:
     this.label3 = ((System.Windows.Controls.Label)(target));
     
     #line 63 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdownclick);
     
     #line default
     #line hidden
     return;
     case 18:
     this.label4 = ((System.Windows.Controls.Label)(target));
     
     #line 68 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowleftclick);
     
     #line default
     #line hidden
     return;
     case 19:
     this.label5 = ((System.Windows.Controls.Label)(target));
     
     #line 73 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowrightclick);
     
     #line default
     #line hidden
     return;
     case 20:
     this.label6 = ((System.Windows.Controls.Label)(target));
     
     #line 78 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label6.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowaddclick);
     
     #line default
     #line hidden
     return;
     case 21:
     this.label7 = ((System.Windows.Controls.Label)(target));
     
     #line 83 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label7.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdelclick);
     
     #line default
     #line hidden
     return;
     case 22:
     this.label9 = ((System.Windows.Controls.Label)(target));
     
     #line 88 "..\..\..\..\DeviceMigrations\motor.xaml"
     this.label9.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rebackclick);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #22
0
        private void btnOpenSandbox_Click(object sender, RoutedEventArgs e)
        {
            var ofd = new OpenFileDialog();
            if ((bool)ofd.ShowDialog())
            {
                var h3 = new Halo3(ofd.FileName);
                lblSandboxPath.Text = ofd.FileName;

                var container = new Model3DCollection();
                foreach (var placedObject in h3.SandboxObjects.Where(placedObject => placedObject.TagIndex != -1))
                {
                    // Try to load Model
                    if (placedObject.TagEntry.Tag.TagPath.Contains("spawning"))
                    {

                    }

                    string gameAssetPath;
                    try
                    {
                        gameAssetPath = VariousFunctions.GetGameAsset(Halo3.GameId, placedObject.TagEntry.Tag.TagPath);
                    }
                    catch (FileNotFoundException)
                    {
                        ActionLog.AddEntry("Missing Game Asset");
                        continue;
                    }

                    var model = (Model3D)ModelImporter.Load(gameAssetPath);
                    model.Transform = CreateTransformGroup(placedObject);
                    container.Add(model);
                }

                ModelViewport.Children.Clear();
                ModelViewport.Children.Add(new GridLines());
                foreach (var model in container)
                {
                    ModelViewport.Children.Add(new ModelVisual3D
                                                   {
                                                       Content = model
                                                   });
                }
                var light = new LightVisual3D();
                var ambientLight = new AmbientLight(Colors.WhiteSmoke)
                                       {
                                           Transform = new MatrixTransform3D(new Matrix3D
                                                                                 {
                                                                                     OffsetX = 0,
                                                                                     OffsetY = 0,
                                                                                     OffsetZ = 100
                                                                                 })
                                       };
                light.Content = ambientLight;
                ModelViewport.Children.Add(light);

                ModelViewport.ShowCameraInfo = true;
                ModelViewport.ZoomExtents();
                ModelViewport.IsHeadLightEnabled = true;
            }
        }
Example #23
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((taken6.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.Window.Loaded += new System.Windows.RoutedEventHandler(this.winload);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                this.Window.KeyDown += new System.Windows.Input.KeyEventHandler(this.nhanphim);

            #line default
            #line hidden
                return;

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

            case 3:
                this.background = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.tenmaygame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 5:
                this.canvasgamename = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.timecanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.ellipse1_Copy = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 8:
                this.lbltime = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.lblcountdown = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.ticketcanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 11:
                this.ellipse1 = ((System.Windows.Shapes.Ellipse)(target));
                return;

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

            case 13:
                this.lblscore_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.coincanvas = ((System.Windows.Controls.Canvas)(target));
                return;

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

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

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

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

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

            case 20:
                this.OMG_WHO_THE_HELL_CARES_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 21:
                this.SUPER_HOT_FIRE_OOOHHH_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 22:
                this.lblready = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.lblready1 = ((System.Windows.Controls.Label)(target));
                return;

            case 24:
                this.myhand = ((System.Windows.Controls.Canvas)(target));
                return;

            case 25:
                this.button = ((System.Windows.Controls.Canvas)(target));
                return;

            case 26:
                this.ellipse2 = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 27:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 28:
                this.image = ((System.Windows.Controls.Image)(target));
                return;

            case 29:
                this.odiem = ((System.Windows.Controls.Canvas)(target));
                return;

            case 30:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 31:
                this.amthanhtradiem_mp1 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 32:
                this.tblerr = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.demo_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 34:
                this.tblcountplay = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 35:
                this.lazer_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 36:
                this.amthanhtradiem_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 37:
                this.insertcoin_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 38:
                this.hinhtron = ((System.Windows.Controls.Canvas)(target));
                return;

            case 39:
                this.hinhgame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 40:
                this.vongtron = ((System.Windows.Controls.Image)(target));
                return;

            case 41:
                this.tblgroup11 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 42:
                this.tblgroup12 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 43:
                this.tblgroup13 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 44:
                this.tblgroup14 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 45:
                this.tblgroup31 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 46:
                this.tblgroup32 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 47:
                this.tblgroup6 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 48:
                this.tblgroup23 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 49:
                this.tblgroup22 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 50:
                this.tblgroup21 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 51:
                this.tblgroup4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 52:
                this.tblgroup5 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 53:
                this.tapthe = ((System.Windows.Controls.Canvas)(target));
                return;

            case 54:
                this.nfctap = ((System.Windows.Controls.Canvas)(target));
                return;

            case 55:
                this._6000 = ((System.Windows.Controls.Label)(target));
                return;

            case 56:
                this.checkicon = ((System.Windows.Controls.Canvas)(target));
                return;

            case 57:
                this.card = ((System.Windows.Controls.Canvas)(target));
                return;

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

            case 59:
                this.perspectiveCamera1 = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 60:
                this.ModelContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

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

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

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

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

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

            case 66:
                this.tam = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 67:
                this.Dao = ((System.Windows.Controls.Canvas)(target));
                return;

            case 68:
                this.canvas_dao = ((System.Windows.Controls.Canvas)(target));
                return;

            case 69:
                this.tamten = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 70:
                this.phitieu = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 71:
                this.perspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 72:
                this.phitieuModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 73:
                this.phitieuModel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

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

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

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

            case 78:
                this.INTRO_SOUND_EFFECT_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 79:
                this.Pollo_Loko_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 80:
                this.huongdangame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 81:
                this.huongdangame1 = ((System.Windows.Controls.Image)(target));
                return;

            case 82:
                this.tbldemo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 83:
                this.bonusbong = ((System.Windows.Controls.Canvas)(target));
                return;

            case 84:
                this.lblbonus_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 85:
                this.lblbonus = ((System.Windows.Controls.Label)(target));
                return;

            case 86:
                this.lblbonus_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 87:
                this.YAY_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 88:
                this.counting = ((System.Windows.Controls.Canvas)(target));
                return;

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

            case 90:
                this.canvashopqua = ((System.Windows.Controls.Canvas)(target));
                return;

            case 91:
                this.tblhopqua = ((System.Windows.Controls.TextBlock)(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;
 }
Example #25
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 21 "..\..\Trackport3D.xaml"
                ((Ajubaa.XamlModelViewer._3DTools.Trackport3D)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);

            #line default
            #line hidden
                return;

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

            case 3:
                this.BorderWithBackgrndColor = ((System.Windows.Controls.Border)(target));
                return;

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

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

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

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

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

            case 9:
                this.CaptureBorder = ((System.Windows.Controls.Border)(target));
                return;

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

            #line 83 "..\..\Trackport3D.xaml"
                this.WireFrameOrSolidButton.Click += new System.Windows.RoutedEventHandler(this.WireFrameOrSolid);

            #line default
            #line hidden
                return;

            case 11:

            #line 126 "..\..\Trackport3D.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MovingView);

            #line default
            #line hidden
                return;

            case 12:

            #line 135 "..\..\Trackport3D.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Disappear);

            #line default
            #line hidden
                return;

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

            #line 144 "..\..\Trackport3D.xaml"
                this.CreateButton.Click += new System.Windows.RoutedEventHandler(this.SlowGeneration);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #26
0
        public Window2(CModel cmodel, bool bDebugging)
        {
            InitializeComponent();

              if (cmodel != null)
              {
              Model3DGroup gr = new Model3DGroup();
              //gr.Children.Add(new AmbientLight());

              // Default color
              SolidColorBrush brushDefault = new SolidColorBrush(Color.FromRgb(255, 0, 0));

              EGCS eGCS = EGCS.eGCSLeftHanded;
              //EGCS eGCS = EGCS.eGCSRightHanded;

              // Global coordinate system - axis
              ScreenSpaceLines3D sAxisX_3D = new ScreenSpaceLines3D();
              ScreenSpaceLines3D sAxisY_3D = new ScreenSpaceLines3D();
              ScreenSpaceLines3D sAxisZ_3D = new ScreenSpaceLines3D();
              Point3D pGCS_centre = new Point3D(0,0,0);
              Point3D pAxisX = new Point3D(1, 0, 0);
              Point3D pAxisY = new Point3D(0, 1, 0);
              Point3D pAxisZ = new Point3D(0, 0, 1);

              sAxisX_3D.Points.Add(pGCS_centre);
              sAxisX_3D.Points.Add(pAxisX);
              sAxisX_3D.Color = Colors.Red;
              sAxisX_3D.Thickness = 2;

              sAxisY_3D.Points.Add(pGCS_centre);
              sAxisY_3D.Points.Add(pAxisY);
              sAxisY_3D.Color = Colors.Green;
              sAxisY_3D.Thickness = 2;

              sAxisZ_3D.Points.Add(pGCS_centre);
              sAxisZ_3D.Points.Add(pAxisZ);
              sAxisZ_3D.Color = Colors.Blue;
              sAxisZ_3D.Thickness = 2;

              //I made ViewPort public property to Access ViewPort object inside TrackPort3D
              //to ViewPort add 3 children (3 axis)
              _trackport.ViewPort.Children.Add(sAxisX_3D);
              _trackport.ViewPort.Children.Add(sAxisY_3D);
              _trackport.ViewPort.Children.Add(sAxisZ_3D);

              // Check that real model exists and create model geometry
              if (cmodel != null)
              {
              if (cmodel.m_arrMembers != null) // Some members exist
              {
                  // Auxialiary for generation of colors numbers
                  float j = 0;

                  // Model Group of Members
                  // Prepare member model
                  for (int i = 0; i < cmodel.m_arrMembers.Length; i++) // !!! BUG pocet prvkov sa nacitava z xls aj z prazdnych riadkov pokial su nejako formatovane / nie default
                  {
                      if (cmodel.m_arrMembers[i] != null &&
                          cmodel.m_arrMembers[i].NodeStart != null &&
                          cmodel.m_arrMembers[i].NodeEnd != null &&
                          cmodel.m_arrMembers[i].CrScStart != null) // Member object is valid (not empty)
                      {
                          if (bDebugging)
                          {
                              System.Console.Write("\n" + "Member ID:" + (i + 1).ToString() + "\n"); // Write Member ID in console window
                              System.Console.Write("Start Node ID:" + cmodel.m_arrMembers[i].NodeStart.ID.ToString() + "\n"); // Write Start Node ID and coordinates in console window
                              System.Console.Write(cmodel.m_arrMembers[i].NodeStart.X.ToString() + "\t" + cmodel.m_arrMembers[i].NodeStart.Y.ToString() + "\t" + cmodel.m_arrMembers[i].NodeStart.Z.ToString() + "\n");
                              System.Console.Write("End Node ID:" + cmodel.m_arrMembers[i].NodeEnd.ID.ToString() + "\n");     // Write   End Node ID and coordinates in console window
                              System.Console.Write(cmodel.m_arrMembers[i].NodeEnd.X.ToString() + "\t" + cmodel.m_arrMembers[i].NodeEnd.Y.ToString() + "\t" + cmodel.m_arrMembers[i].NodeEnd.Z.ToString() + "\n\n");

                              cmodel.m_arrMembers[i].BIsDebugging = bDebugging;
                          }

                          if (cmodel.m_arrMembers[i].CrScStart.CrScPointsOut != null) // CCrSc is abstract without geometrical properties (dimensions), only centroid line could be displayed
                          {
                              // Member material color
                              byte R = (byte)(250);
                              byte G = (byte)(240);
                              byte B = (byte)(230);

                              SolidColorBrush br = new SolidColorBrush(Color.FromRgb(R, G, B)); // Material color
                              br.Opacity = 0.8;

                              // Set different color for each member
                              bool bDiffMemberColors = false;

                              if (bDiffMemberColors)
                              {
                                  if (j < 20) // 20*10 = 200, 200 + 55 - 255 (maxium number of color)
                                  {
                                      br.Color = Color.FromRgb((byte)(55 + j * 10), (byte)(55 + j * 7), (byte)(55 + j * 5));
                                      j++;
                                  }
                                  else
                                  {
                                      j = 0;
                                  }
                              }

                              bool bFastRendering = false;

                              if (bFastRendering ||
                                  (cmodel.m_arrMembers[i].CrScStart.TriangleIndicesFrontSide == null ||
                                      cmodel.m_arrMembers[i].CrScStart.TriangleIndicesShell == null ||
                                      cmodel.m_arrMembers[i].CrScStart.TriangleIndicesBackSide == null)
                                   ) // Check if are particular surfaces defined
                              {
                                  // Create Member model - one geometry model
                                  // GeometryModel3D memberModel3D;
                                  // Add current member model to the model group
                                  gr.Children.Add((Model3D)cmodel.m_arrMembers[i].getG_M_3D_Member(eGCS, br));
                              }
                              else
                              {
                                  // Create Member model - consist of 3 geometry models (member is one model group)
                                  // Model3DGroup memberModel3D;
                                  // Add current member model to the model group

                                  SolidColorBrush br1 = new SolidColorBrush(Color.FromRgb(255, 64, 64)); // Material color - Front Side (red)
                                  SolidColorBrush br2 = new SolidColorBrush(Color.FromRgb(141, 238, 238)); // Material color - Shell (red)
                                  SolidColorBrush br3 = new SolidColorBrush(Color.FromRgb(238, 154, 73)); // Material color - Back Side (orange)
                                  br1.Opacity = br3.Opacity = 0.8;
                                  br2.Opacity = 0.4;
                                  gr.Children.Add(cmodel.m_arrMembers[i].getM_3D_G_Member(eGCS, br1, br2, br3));
                              }
                          }
                          else
                          {
                          // Display axis line, member is not valid to display in 3D
                          }
                      }
                  }
              }

              if (cmodel.m_arrGOAreas != null) // Some areas exist
              {
                  // Model Groups of Areas

              }

              if (cmodel.m_arrGOVolumes != null) // Some volumes exist
              {
                  // Model Groups of Volumes
                  for (int i = 0; i < cmodel.m_arrGOVolumes.Length; i++)
                  {
                      if (cmodel.m_arrGOVolumes[i] != null &&
                          cmodel.m_arrGOVolumes[i].m_pControlPoint != null &&
                          cmodel.m_arrGOVolumes[i].BIsDisplayed == true) // Volume object is valid (not empty) and should be displayed
                      {
                          // Get shape - prism , sphere, ...
                          gr.Children.Add(cmodel.m_arrGOVolumes[i].CreateM_3D_G_Volume_8Edges()); // Add solid to model group
                      }
                  }
              }

              if (cmodel.m_arrGOStrWindows != null) // Some windows exist
              {
                  // Model Groups of Windows
                  for (int i = 0; i < cmodel.m_arrGOStrWindows.Length; i++)
                  {
                      if (cmodel.m_arrGOStrWindows[i] != null &&
                          cmodel.m_arrGOStrWindows[i].m_pControlPoint != null &&
                          cmodel.m_arrGOStrWindows[i].BIsDisplayed == true) // Volume object is valid (not empty) and should be displayed
                      {
                          if (cmodel.m_arrGOStrWindows[i].EShapeType == EWindowShapeType.eClassic)
                              gr.Children.Add(cmodel.m_arrGOStrWindows[i].CreateM_3D_G_Window()); // Add solid to model group
                          else
                          {
                              //Exception - not implemented
                          }
                      }
                  }
              }

              if (cmodel.m_arrNSupports != null) // Some nodal supports exist
              {
                  // Model Groups of Nodal Suports
                  for (int i = 0; i < cmodel.m_arrNSupports.Length; i++)
                  {
                      if (cmodel.m_arrNSupports[i] != null && cmodel.m_arrNSupports[i].BIsDisplayed == true) // Support object is valid (not empty) and should be displayed
                      {
                          gr.Children.Add(cmodel.m_arrNSupports[i].CreateM_3D_G_NSupport()); // Add solid to model group

                          // Set support for all assigned nodes

                      }
                  }
              }

              if (cmodel.m_arrNReleases != null) // Some member release exist
              {
                  // Model Groups of Member Releases
                  for (int i = 0; i < cmodel.m_arrNReleases.Length; i++)
                  {
                      if (cmodel.m_arrNReleases[i] != null && cmodel.m_arrNReleases[i].BIsDisplayed == true) // Support object is valid (not empty) and should be displayed
                      {
                          /*
                          for (int j = 0; j < cmodel.m_arrNReleases[i].m_iMembCollection.Length; j++) // Set release for all assigned members (member nodes)
                          {
                              Model3DGroup model_gr = new Model3DGroup();
                              model_gr = cmodel.m_arrNReleases[i].CreateM_3D_G_MNRelease();
                              // Transform modelgroup from LCS to GCS
                              model_gr = cmodel.m_arrNReleases[i].Transform3D_OnMemberEntity_fromLCStoGCS(model_gr, cmodel.m_arrMembers[cmodel.m_arrNReleases[i].m_iMembCollection[j]]);

                              gr.Children.Add(model_gr); // Add Release to model group
                          }*/

                          Model3DGroup model_gr = new Model3DGroup();
                          model_gr = cmodel.m_arrNReleases[i].CreateM_3D_G_MNRelease();
                          // Transform modelgroup from LCS to GCS
                          model_gr = cmodel.m_arrNReleases[i].Transform3D_OnMemberEntity_fromLCStoGCS(model_gr, cmodel.m_arrNReleases[i].Member);

                          gr.Children.Add(model_gr); // Add Release to model group

                      }
                  }
              }

              if (cmodel.m_arrNLoads != null) // Some nodal loads exist
              {
                  // Model Groups of Nodal Loads
                  for (int i = 0; i < cmodel.m_arrNLoads.Length; i++)
                  {
                      if (cmodel.m_arrNLoads[i] != null && cmodel.m_arrNLoads[i].BIsDisplayed == true) // Load object is valid (not empty) and should be displayed
                      {
                          gr.Children.Add(cmodel.m_arrNLoads[i].CreateM_3D_G_Load()); // Add to model group

                          // Set load for all assigned nodes

                      }
                  }
              }

              if (cmodel.m_arrMLoads != null) // Some member loads exist
              {
                  // Model Groups of Member Loads
                  for (int i = 0; i < cmodel.m_arrMLoads.Length; i++)
                  {
                      if (cmodel.m_arrMLoads[i] != null && cmodel.m_arrMLoads[i].BIsDisplayed == true) // Load object is valid (not empty) and should be displayed
                      {
                          Model3DGroup model_gr = new Model3DGroup();
                          model_gr = cmodel.m_arrMLoads[i].CreateM_3D_G_Load();
                          // Transform modelgroup from LCS to GCS
                          model_gr = cmodel.m_arrMLoads[i].Transform3D_OnMemberEntity_fromLCStoGCS(model_gr, cmodel.m_arrMLoads[i].Member);

                          gr.Children.Add(model_gr); // Add Release to model group

                          // Set load for all assigned member

                      }
                  }
              }

              /*
                The following lights derive from the base class Light:
                AmbientLight : Provides ambient lighting that illuminates all objects uniformly regardless of their location or orientation.
                DirectionalLight : Illuminates like a distant light source. Directional lights have a Direction specified as a Vector3D, but no specified location.
                PointLight : Illuminates like a nearby light source. PointLights have a position and cast light from that position. Objects in the scene are illuminated depending on their position and distance with respect to the light. PointLightBase exposes a Range property, which determines a distance beyond which models will not be illuminated by the light. PointLight also exposes attenuation properties which determine how the light's intensity diminishes over distance. You can specify constant, linear, or quadratic interpolations for the light's attenuation.
                SpotLight : Inherits from PointLight. Spotlights illuminate like PointLight and have both position and direction. They project light in a cone-shaped area set by InnerConeAngle and OuterConeAngle properties, specified in degrees.
              */

              // Directional Light
              DirectionalLight Dir_Light = new DirectionalLight();
              Dir_Light.Color = Colors.White;
              Dir_Light.Direction = new Vector3D(0, 0, -1);
              gr.Children.Add(Dir_Light);

              // Point light values
              PointLight Point_Light = new PointLight();
              Point_Light.Position = new Point3D(0, 0, 30);
              Point_Light.Color = System.Windows.Media.Brushes.White.Color;
              Point_Light.Range = 30.0;
              Point_Light.ConstantAttenuation=0;
              Point_Light.LinearAttenuation=0;
              Point_Light.QuadraticAttenuation = 0.2f;
              Point_Light.ConstantAttenuation = 5.0;
              gr.Children.Add(Point_Light);

              SpotLight Spot_Light = new SpotLight();
              Spot_Light.InnerConeAngle = 30;
              Spot_Light.OuterConeAngle = 30;
              Spot_Light.Color = System.Windows.Media.Brushes.White.Color;
              Spot_Light.Direction = new Vector3D(0, 0, -1);
              Spot_Light.Position = new Point3D(8.5, 8.5, 20);
              Spot_Light.Range = 30;
              gr.Children.Add(Spot_Light);

              //Set Ambient Light
              AmbientLight Ambient_Light = new AmbientLight();
              Ambient_Light.Color = Color.FromRgb(250, 250, 230);
              gr.Children.Add(new AmbientLight());

              if (cmodel.m_arrGOLines != null) // Some lines exist
              {
                  Point3D solidCenter = new Point3D(-5, 0, 0);

                  float fa = 0.5f;

                  Point3D p0 = new Point3D(-fa, -fa, -fa);
                  Point3D p1 = new Point3D(fa, -fa, -fa);
                  Point3D p2 = new Point3D(fa, fa, -fa);
                  Point3D p3 = new Point3D(-fa, fa, -fa);
                  Point3D p4 = new Point3D(-fa, -fa, fa);
                  Point3D p5 = new Point3D(fa, -fa, fa);
                  Point3D p6 = new Point3D(fa, fa, fa);
                  Point3D p7 = new Point3D(-fa, fa, fa);

                  // Lines

                  ScreenSpaceLines3D line1 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line2 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line3 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line4 = new ScreenSpaceLines3D();

                  Color lineColor = Color.FromRgb(250, 30, 30);
                  line1.Color = lineColor;
                  line1.Points.Add(p0);
                  line1.Points.Add(p1);

                  line2.Color = lineColor;
                  line2.Points.Add(p1);
                  line2.Points.Add(p2);

                  line3.Color = lineColor;
                  line3.Points.Add(p2);
                  line3.Points.Add(p3);

                  line4.Color = lineColor;
                  line4.Points.Add(p3);
                  line4.Points.Add(p0);

                  _trackport.ViewPort.Children.Add(line1);
                  _trackport.ViewPort.Children.Add(line2);
                  _trackport.ViewPort.Children.Add(line3);
                  _trackport.ViewPort.Children.Add(line4);

                  ScreenSpaceLines3D line5 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line6 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line7 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line8 = new ScreenSpaceLines3D();

                  line5.Color = lineColor;
                  line5.Points.Add(p4);
                  line5.Points.Add(p5);

                  line6.Color = lineColor;
                  line6.Points.Add(p5);
                  line6.Points.Add(p6);

                  line7.Color = lineColor;
                  line7.Points.Add(p6);
                  line7.Points.Add(p7);

                  line8.Color = lineColor;
                  line8.Points.Add(p7);
                  line8.Points.Add(p4);

                  _trackport.ViewPort.Children.Add(line5);
                  _trackport.ViewPort.Children.Add(line6);
                  _trackport.ViewPort.Children.Add(line7);
                  _trackport.ViewPort.Children.Add(line8);

                  ScreenSpaceLines3D line09 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line10 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line11 = new ScreenSpaceLines3D();
                  ScreenSpaceLines3D line12 = new ScreenSpaceLines3D();

                  line09.Color = lineColor;
                  line09.Points.Add(p0);
                  line09.Points.Add(p4);

                  line10.Color = lineColor;
                  line10.Points.Add(p1);
                  line10.Points.Add(p5);

                  line11.Color = lineColor;
                  line11.Points.Add(p2);
                  line11.Points.Add(p6);

                  line12.Color = lineColor;
                  line12.Points.Add(p3);
                  line12.Points.Add(p7);

                  _trackport.ViewPort.Children.Add(line09);
                  _trackport.ViewPort.Children.Add(line10);
                  _trackport.ViewPort.Children.Add(line11);
                  _trackport.ViewPort.Children.Add(line12);
              }
              }

              // Get model centre
              float fTempMax_X;
              float fTempMin_X;
              float fTempMax_Y;
              float fTempMin_Y;
              float fTempMax_Z;
              float fTempMin_Z;

              CalculateModelLimits(cmodel, out fTempMax_X, out fTempMin_X, out fTempMax_Y, out fTempMin_Y, out fTempMax_Z, out fTempMin_Z);

              float fModel_Length_X = fTempMax_X - fTempMin_X;
              float fModel_Length_Y = fTempMax_Y - fTempMin_Y;
              float fModel_Length_Z = fTempMax_Z - fTempMin_Z;

              Point3D pModelGeomCentre = new Point3D(fModel_Length_X / 2.0f, fModel_Length_Y / 2.0f, fModel_Length_Z / 2.0f);

              Point3D cameraPosition = new Point3D(pModelGeomCentre.X, pModelGeomCentre.Y + 300, pModelGeomCentre.Z + 100);

              //SolidColorBrush brush = new SolidColorBrush(Color.FromRgb(255, 255, 0));
              //GeometryModel3D model = getGeometryModel3D(brush, obj_CrSc, new Point3D(10, 10, 10), new Point3D(500, 300, 200));
              //gr.Children.Add(model);

              ////Point3D cameraPosition = ((MeshGeometry3D)model.Geometry).Positions[0];
              ////cameraPosition.Z -= 1000;

              //brush = new SolidColorBrush(Color.FromRgb(0, 255, 0));
              //model = getGeometryModel3D(brush, obj_CrSc, new Point3D(110, 110, 10), new Point3D(600, 400, 200));
              //gr.Children.Add(model);

              //IMPORTANT: this is the best way to do it, but we can't use it because of trackball
              //because camera is set by trackball Transform this.Camera.Transform = _trackball.Transform;
              //and headlite too:  this.Headlight.Transform = _trackball.Transform;

              _trackport.PerspectiveCamera.Position = cameraPosition;
              //_trackport.PerspectiveCamera.LookDirection = new Vector3D(cameraPosition.X, cameraPosition.Y, cameraPosition.Z - 100);

              _trackport.PerspectiveCamera.LookDirection = new Vector3D(0, -1, -0.2);

              _trackport.Model = (Model3D)gr;

              _trackport.SetupScene();
              }
        }
 private static Model3DGroup GetUnitLitText(string text)
 {
     GeometryModel3D textModel = GetUnitText(text);
     var lightModel = new AmbientLight(Colors.White);
     return new Model3DGroup
     {
         Children = new Model3DCollection(new Model3D[] { textModel, lightModel })
     };
 }
        private void InitiateGroup()
        {
            AmbientLight ambientLight = new AmbientLight();
            ambientLight.Color = Colors.Gray;
            model3DGroup1.Children.Add(ambientLight);
            model3DGroup2.Children.Add(ambientLight);
            model3DGroup3.Children.Add(ambientLight);

            DirectionalLight directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("-1,-3,-2"));
            model3DGroup1.Children.Add(directionalLight);
            model3DGroup2.Children.Add(directionalLight);
            model3DGroup3.Children.Add(directionalLight);

            directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("1,-2,3"));
            model3DGroup1.Children.Add(directionalLight);
            model3DGroup2.Children.Add(directionalLight);
            model3DGroup3.Children.Add(directionalLight);
        }
Example #29
0
        public void ResetLights()
        {
            //<AmbientLight Color="White" />
            //<DirectionalLight Color="White" Direction="-1,-1,-1" />
            //<PointLight Color="White" ConstantAttenuation="1" LinearAttenuation="1" Position="0,0,0" QuadraticAttenuation="1" Range="0" />
            //<SpotLight Color="White" ConstantAttenuation="1" Direction="-1,-1,-1" InnerConeAngle="10" LinearAttenuation="1" OuterConeAngle="10" Position="0,0,0" QuadraticAttenuation="1" Range="0" />
            lights.Children.Clear () ;

            MItDag dagIterator =new MItDag (MItDag.TraversalType.kDepthFirst, MFn.Type.kLight) ;
            for ( ; !dagIterator.isDone ; dagIterator.next () ) {
                MDagPath lightPath =new MDagPath () ;
                dagIterator.getPath (lightPath) ;

                MFnLight light =new MFnLight (lightPath) ;
                bool isAmbient =light.lightAmbient ;
                MColor mcolor =light.color ;
                Color color =Color.FromScRgb (1.0f, mcolor.r, mcolor.g, mcolor.b) ;
                if ( isAmbient ) {
                    AmbientLight ambient =new AmbientLight (color) ;
                    lights.Children.Add (ambient) ;
                    continue ;
                }

                MFloatVector lightDirection =light.lightDirection (0, MSpace.Space.kWorld) ;
                Vector3D direction =new Vector3D (lightDirection.x, lightDirection.y, lightDirection.z) ;
                bool isDiffuse =light.lightDiffuse ;
                try {
                    MFnDirectionalLight dirLight =new MFnDirectionalLight (lightPath) ;
                    DirectionalLight directional =new DirectionalLight (color, direction) ;
                    lights.Children.Add (directional) ;
                    continue ;
                } catch {
                }

                MObject transformNode =lightPath.transform ;
                MFnDagNode transform =new MFnDagNode (transformNode) ;
                MTransformationMatrix matrix =new MTransformationMatrix (transform.transformationMatrix) ;
                double [] threeDoubles =new double [3] ;
                int rOrder =0 ; //MTransformationMatrix.RotationOrder rOrder ;
                matrix.getRotation (threeDoubles, out rOrder, MSpace.Space.kWorld) ;
                matrix.getScale (threeDoubles, MSpace.Space.kWorld) ;
                MVector pos =matrix.getTranslation (MSpace.Space.kWorld) ;
                Point3D position =new Point3D (pos.x, pos.y, pos.z) ;
                try {
                    MFnPointLight pointLight =new MFnPointLight (lightPath) ;
                    PointLight point =new PointLight (color, position) ;
                    //point.ConstantAttenuation =pointLight. ; // LinearAttenuation / QuadraticAttenuation
                    //point.Range =pointLight.rayDepthLimit ;
                    lights.Children.Add (point) ;
                    continue ;
                } catch {
                }

                try {
                    MFnSpotLight spotLight =new MFnSpotLight (lightPath) ;
                    MAngle InnerConeAngle =new MAngle (spotLight.coneAngle) ;
                    MAngle OuterConeAngle =new MAngle (spotLight.penumbraAngle) ;
                    SpotLight spot =new SpotLight (color, position, direction, OuterConeAngle.asDegrees, InnerConeAngle.asDegrees) ;
                    spot.ConstantAttenuation =spotLight.dropOff ; // LinearAttenuation / QuadraticAttenuation
                    //spot.Range =spotLight.rayDepthLimit ;
                    lights.Children.Add (spot) ;
                    continue ;
                } catch {
                }
            }
        }
Example #30
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;
        }
Example #31
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.listBox = ((System.Windows.Controls.ListBox)(target));
     
     #line 18 "..\..\..\3DControl.xaml"
     this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.button5 = ((System.Windows.Controls.Button)(target));
     return;
     case 3:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.SenceGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 6:
     this.viewport = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 7:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 8:
     this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 9:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 11:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 12:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #32
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;
        }
Example #33
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((View.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.MainWindow_KeyDown);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((View.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.MainWindow_Closing);

            #line default
            #line hidden
                return;

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

            #line 15 "..\..\MainWindow.xaml"
                this.viewport.MouseMove += new System.Windows.Input.MouseEventHandler(this.Viewport_MouseMove);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.viewport.LostFocus += new System.Windows.RoutedEventHandler(this.viewport_LostFocus);

            #line default
            #line hidden
                return;

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

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

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

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

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

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

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

            case 10:
                this.modelPlayCursor = ((System.Windows.Media.Media3D.ModelUIElement3D)(target));
                return;

            case 11:
                this.rotatorPointer = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 12:
                this.translatorPointer = ((System.Windows.Media.Media3D.TranslateTransform3D)(target));
                return;

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

            case 14:
                this.groupFood3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 15:

            #line 152 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.DockPanel)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Loaded);

            #line default
            #line hidden
                return;

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

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

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

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

            case 20:
                this.lblPlayerPosition = ((System.Windows.Controls.Label)(target));
                return;

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

            #line 188 "..\..\MainWindow.xaml"
                this.bttnDisconnect.Click += new System.Windows.RoutedEventHandler(this.DisconnectButton_Clicked);

            #line default
            #line hidden
                return;

            case 22:
                this.txtbxMessages = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #34
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.addserver = ((GloryView.RFID.DeviceMigrations.Addserver)(target));
                return;

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

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

            case 4:
                this.FurnitureContainer3 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

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

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

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

            case 8:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;

            case 9:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 10:
                this.label2 = ((System.Windows.Controls.Label)(target));

            #line 61 "..\..\..\..\DeviceMigrations\Addserver.xaml"
                this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.upclick);

            #line default
            #line hidden
                return;

            case 11:
                this.label3 = ((System.Windows.Controls.Label)(target));

            #line 66 "..\..\..\..\DeviceMigrations\Addserver.xaml"
                this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.downclick);

            #line default
            #line hidden
                return;

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

            #line 74 "..\..\..\..\DeviceMigrations\Addserver.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click_1);

            #line default
            #line hidden
                return;

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

            #line 75 "..\..\..\..\DeviceMigrations\Addserver.xaml"
                this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);

            #line default
            #line hidden
                return;

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

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

            case 16:
                this.textBox3 = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #35
0
        /// <summary>
        /// Add an ambient light source.
        /// </summary>
        /// <param name="shapeName">The 3DView object.</param>
        /// <param name="colour">The light colour.</param>
        /// <returns>The 3DView Light name.</returns>
        public static Primitive AddAmbientLight(Primitive shapeName, Primitive colour)
        {
            UIElement obj;

            try
            {
                if (_objectsMap.TryGetValue((string)shapeName, out obj))
                {
                    InvokeHelperWithReturn ret = new InvokeHelperWithReturn(delegate
                    {
                        try
                        {
                            if (obj.GetType() == typeof(Viewport3D))
                            {
                                Viewport3D viewport3D = (Viewport3D)obj;
                                ModelVisual3D modelVisual3D = (ModelVisual3D)viewport3D.Children[0];
                                Model3DGroup model3DGroup = (Model3DGroup)modelVisual3D.Content;

                                AmbientLight ambientLight = new AmbientLight();
                                ambientLight.Color = (Color)ColorConverter.ConvertFromString(colour);

                                string name = getLightingName();
                                Lightings.Add(new Lighting(name, ambientLight));
                                model3DGroup.Children.Add(ambientLight);
                                return name;
                            }
                        }
                        catch (Exception ex)
                        {
                            Utilities.OnError(Utilities.GetCurrentMethod(), ex);
                        }
                        return "";
                    });
                    return FastThread.InvokeWithReturn(ret).ToString();
                }
                else
                {
                    Utilities.OnShapeError(Utilities.GetCurrentMethod(), shapeName);
                }
            }
            catch (Exception ex)
            {
                Utilities.OnError(Utilities.GetCurrentMethod(), ex);
            }
            return "";
        }
Example #36
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;
        }
Example #37
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Window = ((freelqnce.MainWindow)(target));
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     
     #line 13 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_left);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 14 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_right);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 15 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_up);
     
     #line default
     #line hidden
     return;
     case 6:
     this.down = ((System.Windows.Controls.Button)(target));
     
     #line 16 "..\..\MainWindow.xaml"
     this.down.Click += new System.Windows.RoutedEventHandler(this.move_down);
     
     #line default
     #line hidden
     return;
     case 7:
     this.viewport = ((System.Windows.Controls.Viewport3D)(target));
     
     #line 19 "..\..\MainWindow.xaml"
     this.viewport.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.MouseHitTest);
     
     #line default
     #line hidden
     return;
     case 8:
     this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 9:
     this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 11:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 12:
     this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 14:
     this.ear_int_pCylinder5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 15:
     this.ear_fullmodel_initialShadingGroup1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 16:
     this.model = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 17:
     this.group = ((System.Windows.Media.Media3D.Model3DGroup)(target));
     return;
     case 18:
     
     #line 1737 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     case 19:
     
     #line 1738 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Zoom_plus);
     
     #line default
     #line hidden
     return;
     case 20:
     
     #line 1740 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_right);
     
     #line default
     #line hidden
     return;
     case 21:
     
     #line 1741 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_left);
     
     #line default
     #line hidden
     return;
     case 22:
     
     #line 1742 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_down);
     
     #line default
     #line hidden
     return;
     case 23:
     
     #line 1743 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_up);
     
     #line default
     #line hidden
     return;
     case 24:
     
     #line 1745 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);
     
     #line default
     #line hidden
     return;
     case 25:
     
     #line 1746 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);
     
     #line default
     #line hidden
     return;
     case 26:
     this.checkcolor1 = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 27:
     this.labelrouge = ((System.Windows.Controls.Label)(target));
     return;
     case 28:
     this.checkcolor2 = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 29:
     this.labelbleu = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #38
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.oldgrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.roomName = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.label2 = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.comboBox1 = ((System.Windows.Controls.ComboBox)(target));
     
     #line 27 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox1_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.label3 = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.button3 = ((System.Windows.Controls.Button)(target));
     
     #line 38 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.viewport1 = ((System.Windows.Controls.Viewport3D)(target));
     
     #line 41 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.viewport1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rightleftdown);
     
     #line default
     #line hidden
     return;
     case 10:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 11:
     this.FurnitureContainer2 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 12:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 14:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 15:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).ManipulationDelta += new System.EventHandler <System.Windows.Input.ManipulationDeltaEventArgs>(this.OnDeltaChange);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).TouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OnTouch);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Grid_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Grid_MouseMove);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.Grid_MouseLeftButtonUp);

            #line default
            #line hidden

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

            #line default
            #line hidden
                return;

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

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

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

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

            case 6:
                this.Earth = ((EarthViewerWPF.Sphere)(target));
                return;

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

            case 8:
                this.scaleTransform = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;

            case 9:
                this.sphereRec = ((System.Windows.Shapes.Rectangle)(target));
                return;

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

            case 11:
                this.InfoScale = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 12:
                this.TouchLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 13:
                this.detailsContainer = ((System.Windows.Controls.Label)(target));
                return;

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

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

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

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

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

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

            case 20:
                this.populationLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 21:
                this.populationText = ((System.Windows.Controls.Label)(target));
                return;

            case 22:
                this.areaLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.areaText = ((System.Windows.Controls.Label)(target));
                return;

            case 24:
                this.anthemLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 25:
                this.currencyLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 26:
                this.currencyText = ((System.Windows.Controls.Label)(target));
                return;

            case 27:
                this.gdpLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 28:
                this.gdpText = ((System.Windows.Controls.Label)(target));
                return;

            case 29:
                this.religionLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 30:
                this.religionText = ((System.Windows.Controls.Label)(target));
                return;

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

            #line 72 "..\..\MainWindow.xaml"
                this.anthemButton.Click += new System.Windows.RoutedEventHandler(this.anthemButton_Click);

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

            case 33:
                this.bottomBarContainer = ((System.Windows.Controls.Label)(target));
                return;

            case 34:
                this.gamesBg = ((System.Windows.Controls.Label)(target));
                return;

            case 35:
                this.gamesIcon = ((System.Windows.Controls.Image)(target));

            #line 78 "..\..\MainWindow.xaml"
                this.gamesIcon.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.gamesIcon_MouseDown);

            #line default
            #line hidden

            #line 78 "..\..\MainWindow.xaml"
                this.gamesIcon.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.gamesIcon_MouseUp);

            #line default
            #line hidden
                return;

            case 36:
                this.settingsBg = ((System.Windows.Controls.Label)(target));
                return;

            case 37:
                this.settingsIcon = ((System.Windows.Controls.Image)(target));

            #line 80 "..\..\MainWindow.xaml"
                this.settingsIcon.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.settingsIcon_MouseDown);

            #line default
            #line hidden

            #line 80 "..\..\MainWindow.xaml"
                this.settingsIcon.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.settingsIcon_MouseUp);

            #line default
            #line hidden
                return;

            case 38:
                this.highScoresBg = ((System.Windows.Controls.Label)(target));
                return;

            case 39:
                this.highScoresIcon = ((System.Windows.Controls.Image)(target));

            #line 82 "..\..\MainWindow.xaml"
                this.highScoresIcon.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.highScoresIcon_MouseDown);

            #line default
            #line hidden

            #line 82 "..\..\MainWindow.xaml"
                this.highScoresIcon.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.highScoresIcon_MouseUp);

            #line default
            #line hidden
                return;

            case 40:
                this.powerBttn = ((System.Windows.Controls.Image)(target));

            #line 83 "..\..\MainWindow.xaml"
                this.powerBttn.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.powerBttn_MouseDown);

            #line default
            #line hidden

            #line 83 "..\..\MainWindow.xaml"
                this.powerBttn.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.powerBttn_MouseUp);

            #line default
            #line hidden
                return;

            case 41:
                this.usernameLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 42:
                this.settingsReset = ((System.Windows.Controls.Image)(target));

            #line 85 "..\..\MainWindow.xaml"
                this.settingsReset.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.settingsReset_MouseDown);

            #line default
            #line hidden

            #line 85 "..\..\MainWindow.xaml"
                this.settingsReset.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.settingsReset_MouseUp);

            #line default
            #line hidden
                return;

            case 43:
                this.ControlCheckBox = ((System.Windows.Controls.CheckBox)(target));
                return;

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

            #line 89 "..\..\MainWindow.xaml"
                this.RotationResetButton.Click += new System.Windows.RoutedEventHandler(this.RotationResetButton_Click);

            #line default
            #line hidden
                return;

            case 45:
                this.textureComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 90 "..\..\MainWindow.xaml"
                this.textureComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_SelectionChanged);

            #line default
            #line hidden
                return;

            case 46:
                this.sensitivitySlider = ((System.Windows.Controls.Slider)(target));
                return;

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

            case 48:
                this.gameButton = ((System.Windows.Controls.Button)(target));

            #line 104 "..\..\MainWindow.xaml"
                this.gameButton.Click += new System.Windows.RoutedEventHandler(this.gameButton_Click);

            #line default
            #line hidden
                return;

            case 49:
                this.countryGText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 50:
                this.timerText = ((System.Windows.Controls.TextBlock)(target));
                return;

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

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

            case 53:
                this.game2Button = ((System.Windows.Controls.Button)(target));

            #line 109 "..\..\MainWindow.xaml"
                this.game2Button.Click += new System.Windows.RoutedEventHandler(this.game2Button_Click);

            #line default
            #line hidden
                return;

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

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

            #line 111 "..\..\MainWindow.xaml"
                this.game3Button.Click += new System.Windows.RoutedEventHandler(this.game3Button_Click);

            #line default
            #line hidden
                return;

            case 56:
                this.game3RecentScore = ((System.Windows.Controls.Label)(target));
                return;

            case 57:
                this.placeNameImage = ((System.Windows.Controls.Image)(target));

            #line 113 "..\..\MainWindow.xaml"
                this.placeNameImage.MouseEnter += new System.Windows.Input.MouseEventHandler(this.placeNameImage_MouseEnter);

            #line default
            #line hidden

            #line 113 "..\..\MainWindow.xaml"
                this.placeNameImage.MouseLeave += new System.Windows.Input.MouseEventHandler(this.placeNameImage_MouseLeave);

            #line default
            #line hidden
                return;

            case 58:
                this.skipImage = ((System.Windows.Controls.Image)(target));

            #line 114 "..\..\MainWindow.xaml"
                this.skipImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.skipImage_MouseDown);

            #line default
            #line hidden

            #line 114 "..\..\MainWindow.xaml"
                this.skipImage.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.skipImage_MouseUp);

            #line default
            #line hidden
                return;

            case 59:
                this.leftSideDivider = ((System.Windows.Controls.Label)(target));
                return;

            case 60:
                this.rightSideDivider = ((System.Windows.Controls.Label)(target));
                return;

            case 61:
                this.gameModeLabelHs = ((System.Windows.Controls.Label)(target));
                return;

            case 62:
                this.usernameLabelHs = ((System.Windows.Controls.Label)(target));
                return;

            case 63:
                this.scoreLabelHs = ((System.Windows.Controls.Label)(target));
                return;

            case 64:
                this.gameMode1 = ((System.Windows.Controls.Label)(target));
                return;

            case 65:
                this.gamemode2 = ((System.Windows.Controls.Label)(target));
                return;

            case 66:
                this.gameMode3 = ((System.Windows.Controls.Label)(target));
                return;

            case 67:
                this.player1 = ((System.Windows.Controls.Label)(target));
                return;

            case 68:
                this.player2 = ((System.Windows.Controls.Label)(target));
                return;

            case 69:
                this.player3 = ((System.Windows.Controls.Label)(target));
                return;

            case 70:
                this.score1 = ((System.Windows.Controls.Label)(target));
                return;

            case 71:
                this.score2 = ((System.Windows.Controls.Label)(target));
                return;

            case 72:
                this.score3 = ((System.Windows.Controls.Label)(target));
                return;

            case 73:
                this.settingsReset_Copy = ((System.Windows.Controls.Image)(target));

            #line 131 "..\..\MainWindow.xaml"
                this.settingsReset_Copy.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.settingsReset_MouseDown);

            #line default
            #line hidden

            #line 131 "..\..\MainWindow.xaml"
                this.settingsReset_Copy.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.settingsReset_MouseUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StructureControl"/> class and sets up visual elements for rendering.
        /// </summary>
        /// <param name="pdbViewer">The PDB viewer.</param>
        internal StructureControl(PdbViewer pdbViewer)
        {
            this.pdbViewer = pdbViewer;

            NameScope.SetNameScope(this, new NameScope());

            this.viewport = new Viewport3D();
            this.viewport.ClipToBounds = true;
            this.Children.Add(this.viewport);

            this.camera = new PerspectiveCamera();
            this.camera.Position = new Point3D(0, 0, cameraOffset);
            this.viewport.Camera = this.camera;

            ModelVisual3D lightingVisual = new ModelVisual3D();
            this.viewport.Children.Add(lightingVisual);

            Model3DGroup lightingModel = new Model3DGroup();
            lightingVisual.Content = lightingModel;

            PointLight pointLight = new PointLight(Colors.White, new Point3D(-4, 4, 8));
            lightingModel.Children.Add(pointLight);

            AmbientLight ambientLight = new AmbientLight(Color.FromRgb(32, 32, 32));
            lightingModel.Children.Add(ambientLight);

            this.moleculeVisual = new ModelVisual3D();
            viewport.Children.Add(this.moleculeVisual);

            Transform3DGroup transformGroup = new Transform3DGroup();
            this.moleculeVisual.Transform = transformGroup;

            this.translateTransform = new TranslateTransform3D();
            transformGroup.Children.Add(this.translateTransform);

            this.scaleTransform = new ScaleTransform3D();
            transformGroup.Children.Add(this.scaleTransform);

            this.rotateTransform = new RotateTransform3D();
            this.rotateTransform.Rotation = new QuaternionRotation3D();
            transformGroup.Children.Add(this.rotateTransform);

            this.selectionRectangle = new Rectangle();
            this.selectionRectangle.Stroke = Brushes.White;
            this.selectionRectangle.Fill = new SolidColorBrush(Color.FromArgb(32, 255, 255, 255));
            this.selectionRectangle.Visibility = Visibility.Hidden;
            this.Children.Add(this.selectionRectangle);

            this.testLabel = new Label();
            this.testLabel.Foreground = Brushes.White;
            this.testLabel.FontSize = 20;
            this.testLabel.HorizontalAlignment = HorizontalAlignment.Left;
            this.testLabel.VerticalAlignment = VerticalAlignment.Center;
            this.Children.Add(this.testLabel);

            this.clip = 1;
            this.slab = 0;
            this.UpdateClipping();
        }
Example #41
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.RobotSubscription = ((ConverterSystems.Workstation.Services.UaSubscription)(target));
                return;

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

            case 3:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(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.Base = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

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

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

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

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

            case 13:
                this.LowerArmMotorGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

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

            case 16:
                this.LowerArm = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 17:
                this.LowerArmGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

            case 19:
                this.UpperArm2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 20:
                this.UpperArm2Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 21:
                this.Logo3Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

            case 23:
                this.UpperArmMotorGeometry = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

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

            case 26:
                this.UpperArmGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 27:
                this.Logo1Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

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

            case 29:
                this.WristBendAssembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

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

            case 31:
                this.WristGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 32:
                this.ToolFlangeGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #42
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 24 "..\..\..\Model3DViewer\Model3DView.xaml"
     ((RageLib.Models.Model3DViewer.Model3DView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.MainViewport = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 3:
     this.Camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 4:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 5:
     this.Headlight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 6:
     this.Root = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 7:
     this.CaptureBorder = ((System.Windows.Controls.Border)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #43
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;
        }
        Model3DGroup GetNewGroup()
        {
            Model3DGroup myModel3DGroup = new Model3DGroup();
            // Define the lights cast in the scene. Without light, the 3D object cannot
            // be seen. Note: to illuminate an object from additional directions, create
            // additional lights.
            AmbientLight _ambLight = new AmbientLight(System.Windows.Media.Brushes.Gray.Color);
            DirectionalLight _dirLight = new DirectionalLight();
            _dirLight.Color = System.Windows.Media.Brushes.White.Color;
            _dirLight.Direction = new System.Windows.Media.Media3D.Vector3D(1, -0.2, -1);

            myModel3DGroup.Children.Add(_ambLight);
            myModel3DGroup.Children.Add(_dirLight);

            _dirLight = new DirectionalLight();
            _dirLight.Color = System.Windows.Media.Brushes.White.Color;
            _dirLight.Direction = new System.Windows.Media.Media3D.Vector3D(-1, 0.2, 1);
            myModel3DGroup.Children.Add(_dirLight);
            return myModel3DGroup;
        }
Example #45
0
 public virtual void Load(Loader l, Instruction i)
 {
     switch (i.Type)
     {
         case "name":
             Name = i.String();
             break;
         case "dim":
             int width = i.Int(), height = i.Int(), length = i.Int();
             Dimension = new Dimension3D(width, height, length);
             models = new Model[width, height, length];
             break;
         case "m": // Model
             {
                 Position3D pos = i.Position3D();
                 ModelTemplate mt = Game.Get<ModelTemplate>(i.String());
                 Model m = new Model(mt);
                 AddModel(m, pos);
                 ProcessModelArgs(i, m);
             }
             break;
         case "r": // Range (multiple models)
             {
                 Position3D origin = i.Position3D();
                 Dimension3D dim = i.Dimension3D();
                 ModelTemplate mt = Game.Get<ModelTemplate>(i.String());
                 origin.ForEachInRange(dim, (loc) =>
                 {
                     Model m = new Model(mt);
                     AddModel(m, loc);
                 });
             }
             break;
         case "a": // Actor
             {
                 Position3D pos = i.Position3D();
                 ActorTemplate at = Game.Get<ActorTemplate>(i.String());
                 Actor actor = new Actor(at);
                 AddActor(actor);
                 ProcessModelArgs(i, actor);
             }
             break;
         case "dl": // Directional light
             {
                 Light light = new DirectionalLight(i.Color(), i.Vector3D());
                 Lamp ls = new Lamp(light);
                 AddLamp(ls);
                 if (i.HasNext)
                     namedElements[i.String()] = ls;
             }
             break;
         case "pl": // Point light
             {
                 Light light = new PointLight(i.Color(), i.Point3D());
                 Lamp ls = new Lamp(light);
                 AddLamp(ls);
                 if (i.HasNext)
                     namedElements[i.String()] = ls;
             }
             break;
         case "al": // Ambient light
             {
                 Light light = new AmbientLight(i.Color());
                 Lamp ls = new Lamp(light);
                 AddLamp(ls);
                 if (i.HasNext)
                     namedElements[i.String()] = ls;
             }
             break;
     }
 }