Update() public method

public Update ( ) : void
return void
示例#1
0
        private void btnBuy_Click(object sender, EventArgs e)
        {
            var car = (CarListViewModel)dgvCars.CurrentRow.DataBoundItem;

            car.IsDeleted = true;
            if (_carController.Update(Maper.MapingCarViewModel(car)))
            {
                MessageBox.Show("Successfully completed.");
            }
            else
            {
                MessageBox.Show("Is not completed please repeat.");
            }
            Search();
        }
示例#2
0
        public override void Render()
        {
            Render2D.DrawQuad(new Vector2(0, -120), new Vector2(320, 480), textures["sky"]);
            GL.Clear(ClearBufferMask.DepthBufferBit);
            foreach (Material m in materials)
            {
                m.SetVariable("AmbientLightStrength", sceneProperties.AmbientLightStrength);
            }

            //reflectionTexture.Bind();
            standardMat.SetVariables(new Dictionary <string, Any>()
            {
                { "ReflectionTexture", 2 },
                { "LightPositions", new Any(lights) },
                { "LightTints", new Any(lightTints) },
                { "LightCount", lights.Length },
                { "AmbientLightTint", sceneProperties.AmbientLightTint },
                { "MainLightPos", sceneProperties.MainLightPos },
                { "MainLightTint", sceneProperties.MainLightTint },
                { "MainLightConstant", sceneProperties.MainLightConstant },
                { "MainLightLinear", sceneProperties.MainLightLinear },
                { "MainLightQuadratic", sceneProperties.MainLightQuadratic }
            });
            carController.Update(sceneProperties);

            foreach (var obj in sceneObjects)
            {
                Render3D.DrawMesh(obj.mesh, obj.position, obj.scale, obj.rotation, Quaternion.Identity, obj.texture, obj.material);
            }
            //Render3D.DrawMesh(skyMesh, carController.position * -1.0f, new Vector3(50, 50, 50), Quaternion.Identity, Quaternion.Identity, skyTexture, unlitMat,
            //new Dictionary<string, Whirlpool.Core.Type.Any>()
            //{
            //    { "Model", Matrix4.Identity },
            //    { "MVP", Render3D.sceneCamera.view * Render3D.sceneCamera.projection }
            //});
            carController.Render(sceneProperties);
        }
示例#3
0
        static void Main(string[] args)
        {
            var carController    = new CarController();
            var detailController = new DetailController();


            var allDetailsController = detailController.GetAll();

            detailController.Add(null);
            detailController.Delete(24);
            var fifthDetail = detailController.GetById(9);

            detailController.Update(null);

            var allCarViewModels = carController.GetAll();

            carController.Add(null);
            carController.Delete(6);
            var secondCar = carController.GetCarById(1);

            carController.Update(null);

            Console.ReadKey();
        }