public YTDAvgChartView()
        {
			this.hudService = DependencyService.Get<IHUDService> ();
            Title = "Charts";
            DailyAvgDataPoints = new ObservableCollection<ChartDataPoint>();
            GetData();
        }
		public AppraiserProfileController
				(
				IAppraiserUserService appraiserUserService,
				IAscGovLicenseService ascGovLicenseService,
				IUsersManagement usersManager,
				IReferenceManagement referenceManagement,
				IDVSUserManager dvsUsersManager,
				IAppraiserManagement appraiserManager,
				IAppraiserAccessManager appraiserAccessManager,
				IHUDService hudService,
				IUserAccessHelper userAccessHelper,
				IGeocodingValidation geocodingValidation,
				ITestOrderManager testOrderManager,
				ITaskManager taskManager
				)
		{
			_appraiserUserService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserService);
			_ascGovLicenseService = ValidationUtil.CheckOnNullAndThrowIfNull(ascGovLicenseService);
			_usersManager = ValidationUtil.CheckOnNullAndThrowIfNull(usersManager);
			_referenceManagement = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_appraiserManager = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserManager);
			_dvsUsersManager = ValidationUtil.CheckOnNullAndThrowIfNull(dvsUsersManager);
			_appraiserAccessManager = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserAccessManager);
			_hudService = ValidationUtil.CheckOnNullAndThrowIfNull(hudService);
			_userAccessHelper = ValidationUtil.CheckOnNullAndThrowIfNull(userAccessHelper);
			_geocodingValidation = geocodingValidation;
			_testOrderManager = ValidationUtil.CheckOnNullAndThrowIfNull(testOrderManager);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
		}
        public YTDTrapsChartView()
        {
			this.hudService = DependencyService.Get<IHUDService> ();
            Title = "Charts";
            Trap1DataPoints = new ObservableCollection<ChartDataPoint>();
            Trap2DataPoints = new ObservableCollection<ChartDataPoint>();
            Trap3DataPoints = new ObservableCollection<ChartDataPoint>();
            Trap4DataPoints = new ObservableCollection<ChartDataPoint>();
            Trap5DataPoints = new ObservableCollection<ChartDataPoint>();
            GetData();
        }
Beispiel #4
0
		public AppraiserWizardController(
			IAscGovLicenseService ascGovLicenseService,
			IAppraiserUserService appraiserUserService,
			IReferenceManagement referenceManagement,
			IDocumentService documentService,
			ITaskManager taskManager,
			IHUDService hudService,
			IGeocodingValidation geocodingValidation,
			ITestOrderManager testOrderManager)
		{
			_ascGovLicenseService = ascGovLicenseService;
			_appraiserUserService = appraiserUserService;
			_referenceManagement = referenceManagement;
			_documentService = documentService;
			_taskManager = taskManager;
			_hudService = hudService;
			_geocodingValidation = geocodingValidation;
			_testOrderManager = testOrderManager;
		}
Beispiel #5
0
        public Rendering(Game game)
            : base(game)
        {
            // game.Services.AddService(typeof(RenderingData), rendering_data);

            this.game = (Game1)game;
            this.pause();

            Game.Services.AddService(typeof(IRendering3DService), this);
            this.viewPortDimension = new Vector2(this.game.graphics.PreferredBackBufferWidth, this.game.graphics.PreferredBackBufferHeight);

            // camera posizione iniziale
            this.cameraDefaultPosition = new Vector3(BoxBoundingBox.Max.X + PuzzleBobble.BoxDimension.X / 2.0f, 2.7f, 4.9f);
            this.camera = new Camera(this.cameraDefaultPosition);
            this.camera.updateViewMatrix();

            game.Services.AddService(typeof(Camera), this.camera);
            this.hud = game.Services.GetService(typeof(IHUDService)) as IHUDService;
        }
Beispiel #6
0
        public void OnBackToMenu()
        {
            Game.Components.Remove(this.gameMenu);

            if (this.gameMenu != null)
            {
                this.gameMenu.Dispose();
            }

            this.gameMenu = null;
            this.Initialize();
            Menu menu = new Menu(this.game);

            Game.Components.Add(menu);
            Camera      cam = Game.Services.GetService(typeof(Camera)) as Camera;
            IHUDService hud = Game.Services.GetService(typeof(IHUDService)) as IHUDService;

            hud.clearMessage();
            cam.resetCamera();
            this.gameLogicInputController.pause();
        }
		public HUDAppraiserContactInfoTask(IHUDService hudService) 
		{
			_hudService = hudService;
		}
        public TrapCountCollectionViewModel(bool isHistorical)
        {
			this.hudService = DependencyService.Get<IHUDService> ();
            this.isHistorical = isHistorical;
			Records = new ObservableCollection<TrapCountYearGroup>();
        }
Beispiel #9
0
        public override void Update(GameTime gameTime)
        {
            //if (InputManager.getState().GamePaused)
            //    this.pause();
            // Console.WriteLine("GameLogic: Update");
            if (this.running)
            {
                var dt = (float)gameTime.ElapsedGameTime.TotalSeconds;
                switch (PuzzleBobble.game_state.LevelStatus.Status.Value)
                {
                case PuzzleBobble.GameStatus.Lost:
                {
                    //PuzzleBobble.update_state(dt);
                    //PuzzleBobble.update_script();

                    //Casanova.commit_variable_updates();
                    //FIXME: remove thread sleep with an idle cycle
                    System.Threading.Thread.Sleep(5000);
                    this.pause();
                    this.OnBackToMenu();
                    break;
                }

                case PuzzleBobble.GameStatus.Win:
                {
                    //System.Threading.Thread.Sleep(5000);
                    PuzzleBobble.update_state(dt);
                    PuzzleBobble.update_script();

                    Casanova.commit_variable_updates();
                    System.Threading.Thread.Sleep(5000);
                    this.pause();
                    this.OnBackToMenu();
                    break;
                }

                default:
                {
                    if (this.hud == null)
                    {
                        this.hud = game.Services.GetService(typeof(IHUDService)) as IHUDService;
                    }

                    if (this.hud != null)
                    {
                        this.hud.clearMessage();
                    }
                    //n    Console.WriteLine("GameLogic: update");
                    PuzzleBobble.update_state(dt);
                    PuzzleBobble.update_script();

                    Casanova.commit_variable_updates();

                    break;
                }
                }

                //    if (PuzzleBobble.game_state.LevelStatus.GameStatus.Value != PuzzleBobble.GameStatus.Win &&
                //        PuzzleBobble.game_state.LevelStatus.GameStatus.Value != PuzzleBobble.GameStatus.Lost)
                //    {
                //        var dt = (float)gameTime.ElapsedGameTime.TotalSeconds;

                //        //n    Console.WriteLine("GameLogic: update");
                //        PuzzleBobble.update_state(dt);
                //        PuzzleBobble.update_script();

                //        Casanova.commit_variable_updates();

                //    }
                //    else {

                //        System.Threading.Thread.Sleep(5000);
                //        this.OnBackToMenu();
                //    }
            }
            base.Update(gameTime);
#if FOO
            if (rendering_data == null)
            {
                rendering_data = (RenderingData)Game.Services.GetService(typeof(RenderingData));
            }

            if (gameWorld == null)
            {
                gameWorld = (WorldData2D)Game.Services.GetService(typeof(WorldData2D));
            }
            if (Keyboard.GetState().IsKeyDown(Keys.B))
            //if (GamePad.GetState(PlayerIndex.One).Buttons.B == ButtonState.Pressed)
            {
                while (Game.Components.Count > 0)
                {
                    ((GameComponent)Game.Components[0]).Dispose();
                }

                Game.Components.Clear();

                Game.Components.Add(new Menu(Game));
            }

            //rotate left arrow
            int delta = 2;
            if (Keyboard.GetState().IsKeyDown(Keys.Left))
            {
                if (arrow.angle - delta > Arrow.minAngle)
                {
                    arrow.angle -= delta;
                }
            }
            else if (Keyboard.GetState().IsKeyDown(Keys.Right))
            {
                if (arrow.angle + delta < Arrow.maxAngle)
                {
                    arrow.angle += delta;
                }
                //Console.WriteLine("arrow.anngle " + arrow.angle);
            }
            else if (Keyboard.GetState().IsKeyDown(Keys.Space))
            {
                this.fireActiveBall();
            }

            //    ball.position = ball.position + ball.velocity * dt;
            //    ball.velocity = ball.velocity + Ball.G * dt;

            var k1 = ball.Derivative();
            var k2 = (0.5f * ball + 0.5f * dt * k1).Derivative();
            var k3 = (0.75f * ball + 0.75f * dt * k1).Derivative();

            Ball ballNew;
            ballNew = ball + (2.0f / 9.0f) * dt * k1 +
                      (1.0f / 3.0f) * dt * k2 +
                      (4.0f / 9.0f) * dt * k3;
            ball.position = ballNew.position;
            ball.velocity = ballNew.velocity;

            if (ball.position.Y > rendering_data.MaxY)
            {
                ball.position.Y = rendering_data.MaxY;

                ball.velocity.Y *= -0.8f;
            }

            this.moveActiveBall(dt);
#endif
        }
Beispiel #10
0
		public AscGovLicenseService(IAscGovLicenseRepository ascGovLicenseRepository, IConfigurationHelper configurationHelper, IHUDService hudService)
		{
			_ascGovLicenseRepository = ascGovLicenseRepository;
			_configurationHelper = configurationHelper;
			_hudService = hudService;
		}
Beispiel #11
0
		public LicenseDailyUpdateByHUD(IHUDService hudService, ICommitProvider commitProvider)
		{
			_hudService = hudService;
			_commitProvider = commitProvider;
		}
Beispiel #12
0
		public HUDAppraiserLicensesTask(IHUDService hudService)
		{
			_hudService = hudService;
		}
Beispiel #13
0
        public override void Draw(GameTime gameTime)
        {
            if (!this.running)
            {
                return;
            }

            if ((PuzzleBobble.game_state.LevelStatus.ElapsedTime.Value > 0.0f) && (PuzzleBobble.game_state.LevelStatus.ElapsedTime.Value % PuzzleBobble.DefaultRoofStepTimeDelta) > PuzzleBobble.DefaultRoofStepTimeDelta - 5.0f)
            {
                if (!tickingPlaying)
                {
                    tickingPlaying = true;
                    PuzzleBobbleSoundManager.playSound(PuzzleBobbleSoundManager.SoundsEvent.ROOF_TICK);
                    //   this.clockTicking.Play(1.0f, 0.0f, 0.0f);
                }
                tremblingOffset = (float)(rnd.NextDouble() / 75.0f);
            }
            else
            {
                tickingPlaying  = false;
                tremblingOffset = 0.0f;
            }

            if (this.prevStep < PuzzleBobble.game_state.GridSteps.Value)
            {
                PuzzleBobbleSoundManager.playSound(PuzzleBobbleSoundManager.SoundsEvent.ROOF_DOWN);
                //this.doorSlam.Play(0.75f, 0.0f, 0.0f);
            }

            this.prevStep = PuzzleBobble.game_state.GridSteps.Value;

            int h = GraphicsDevice.Viewport.Bounds.Height;
            int w = GraphicsDevice.Viewport.Bounds.Width;

            this.DrawBackground(gameTime);

            int row    = PuzzleBobble.game_state.Grid.Value.GetLength(0);
            int column = PuzzleBobble.game_state.Grid.Value.GetLength(1);

            for (int i = 0; i < row; i++)
            {
                for (int j = 0; j < column; j++)
                {
                    // Microsoft.FSharp.Core.OptionModule.ToList<PuzzleBobble.Ball>( PuzzleBobble.game_state.Grid[row,column])
                    if (PuzzleBobble.game_state.Grid.Value[i, j] != null)
                    {
                        Vector3 pos   = PuzzleBobble.game_state.Grid.Value[i, j].Value.center.toXNAVector + new Vector3(0.0f, tremblingOffset, 0.0f);
                        float   scale = PuzzleBobble.game_state.Grid.Value[i, j].Value.radius;
                        Color   col   = PuzzleBobble.game_state.Grid.Value[i, j].Value.color;
                        this.DrawModel(this.ballMesh, new Vector3(scale, scale, scale), pos, Vector3.Zero, col);

                        //       Console.WriteLine("ball_docked " + i + " " + j + " pos " + pos);
                    }
                }
            }
            foreach (var climbingBall in PuzzleBobble.game_state.ClimbingBalls.Value)
            {
                Vector3 pos   = climbingBall.center.toXNAVector;
                float   scale = climbingBall.radius;
                Color   col   = climbingBall.color;
                this.DrawModel(this.ballMesh, new Vector3(scale, scale, scale), pos, Vector3.Zero, col);
            }
            foreach (var fallingBall in PuzzleBobble.game_state.FallingBalls.Value)
            {
                Vector3 pos   = fallingBall.center.toXNAVector;
                float   scale = fallingBall.radius;
                Color   col   = fallingBall.color;
                this.DrawModel(this.ballMesh, new Vector3(scale, scale, scale), pos, Vector3.Zero, col);
            }

            PuzzleBobble.Ball readyBall = PuzzleBobble.game_state.ReadyBall.Value;

            Vector3 p = readyBall.center.toXNAVector;
            float   s = readyBall.radius;
            Color   c = readyBall.color;

            this.DrawModel(this.ballMesh, new Vector3(s, s, s), p, Vector3.Zero, c);

            PuzzleBobble.Arrow arr = PuzzleBobble.game_state.Arrow;

            this.DrawArrow(arr.angle.Value);


            float XSIZE = BoxBoundingBox.Max.X - BoxBoundingBox.Min.X;
            float YSIZE = BoxBoundingBox.Max.Y - BoxBoundingBox.Min.Y;
            float ZSIZE = BoxBoundingBox.Max.Z - BoxBoundingBox.Min.Z;

            for (int i = -2; i < 3; i++)
            {
                this.DrawModel(Box, new Vector3(1.0f, 1.0f, 0.2f), new Vector3(-XSIZE / 2.0f - 0.2f, YSIZE + (YSIZE * i), 0.0f), Vector3.Zero, null);
                this.DrawModel(Box, new Vector3(1.0f, 1.0f, 0.2f), new Vector3(XSIZE / 2.0f + PuzzleBobble.BoxDimension.X + 0.2f, YSIZE + (YSIZE * i), 0.0f), Vector3.Zero, null);
            }
            float roofScaleX = PuzzleBobble.BoxDimension.X / (XSIZE + 0.2f);

            this.DrawModel(Box, new Vector3(roofScaleX, 1.0f, 0.2f), new Vector3(XSIZE * roofScaleX / 2.0f, PuzzleBobble.BoxDimension.Y - PuzzleBobble.game_state.GridSteps.Value * PuzzleBobble.BallDiameter, 0.0f) + new Vector3(0.2f, tremblingOffset, 0.0f), Vector3.Zero, null);
            this.DrawModel(Box, new Vector3(roofScaleX, 1.0f, 0.2f), new Vector3(XSIZE * roofScaleX / 2.0f, PuzzleBobble.BoxDimension.Y + YSIZE - PuzzleBobble.game_state.GridSteps.Value * PuzzleBobble.BallDiameter, 0.0f) + new Vector3(0.2f, tremblingOffset, 0.0f), Vector3.Zero, null);
            this.DrawModel(Box, new Vector3(roofScaleX, 1.0f, 0.2f), new Vector3(XSIZE * roofScaleX / 2.0f + 0.2f, 0.0f - YSIZE, 0.0f), Vector3.Zero, null);


            //pretty works
            //for (int i = 0; i < 8; i++)
            //{
            //    this.DrawModel(Box, 1.0f, new Vector3(-size + ce.X, +size - ce.Y + (size * 2 * i), -size), Vector3.Zero, null);
            //    this.DrawModel(Box, 1.0f, new Vector3(PuzzleBobble.BoxDimension.X + size - ce.X, +size - ce.Y + (size * 2 * i), -size), Vector3.Zero, null);
            //}

            if (this.hud == null)
            {
                this.hud = game.Services.GetService(typeof(IHUDService)) as IHUDService;
            }

            if (PuzzleBobble.game_state.LevelStatus.Status.Value == PuzzleBobble.GameStatus.Ready)
            {
                this.hud.printMessage("Press Enter or\nRaise your left hand\nto start");
            }
            else if (PuzzleBobble.game_state.LevelStatus.Status.Value == PuzzleBobble.GameStatus.Win)
            {
                this.hud.printMessage("You\nWin!");
            }
            else if (PuzzleBobble.game_state.LevelStatus.Status.Value == PuzzleBobble.GameStatus.Lost)
            {
                this.hud.printMessage("You\nLost!");
            }
            base.Draw(gameTime);
        }