public override void ViewWillAppear(bool animated)
        {
            CGRect frame = View.Frame;

            frame      = new CGRect(frame.X, frame.Y, frame.Size.Height + 20, frame.Size.Width);
            View.Frame = frame;

            frame = View.Frame;

            var backGround = new UIImageView(UIImage.FromBundle("background.png"));

            backGround.Alpha = 0.34f;
            View.AddSubview(backGround);

            var miniPadFrame = new CGRect(350, 50, 0, 0);

            miniPadView = new MiniPadView(miniPadFrame);
            View.AddSubview(miniPadView);

            var meterFrame = new CGRect(miniPadView.Frame.GetMaxX(), miniPadFrame.Y, 200, miniPadView.Frame.Size.Height);

            meterView = new ZombieMeter(meterFrame);
            View.AddSubview(meterView);

            var statusFrame = new CGRect(100, frame.Size.Height - 350, frame.Size.Width - 100, 100);

            statusView = new StatusView(statusFrame);
            View.AddSubview(statusView);
            statusView.Status = "Loading";

            var buttonsFrame = new CGRect(100, statusFrame.GetMaxY() + 20, frame.Size.Width - 100, 230);

            buttonsView = new ButtonCollectionView(buttonsFrame)
            {
                ShouldGroupAccessibilityChildren = true
            };
            buttonsView.ButtonSelectedEvent += ButtonSelected;
            buttonsView.ButtonDraggedEvent  += ButtonDragged;
            buttonsView.ButtonFinishedEvent += ButtonFinished;
            View.AddSubview(buttonsView);

            var questionFrame = new CGRect(10, statusFrame.GetMaxY() + 110, 80, 80);
            var questionView  = new SymbolMarkView(questionFrame)
            {
                AccessibilityLabel = "Help"
            };

            questionView.TouchUpInside += (s, e) => questionPressed();
            View.AddSubview(questionView);
            questionView.Symbol = "?";

            meterView.ZombieLevel = 0;
            goForthZombies();
            NSNotificationCenter.DefaultCenter.AddObserver(this, new Selector("voiceOverFinished:"), null, null);
        }
예제 #2
0
		public override void ViewWillAppear (bool animated)
		{
			CGRect frame = View.Frame;
			frame = new CGRect (frame.X, frame.Y, frame.Size.Height + 20, frame.Size.Width);
			View.Frame = frame;

			frame = View.Frame;

			var backGround = new UIImageView (UIImage.FromBundle ("background.png"));
			backGround.Alpha = 0.34f;
			View.AddSubview (backGround);

			var miniPadFrame = new CGRect (350, 50, 0, 0);
			miniPadView = new MiniPadView (miniPadFrame);
			View.AddSubview (miniPadView);

			var meterFrame = new CGRect (miniPadView.Frame.GetMaxX (), miniPadFrame.Y, 200, miniPadView.Frame.Size.Height);
			meterView = new ZombieMeter (meterFrame);
			View.AddSubview (meterView);

			var statusFrame = new CGRect (100, frame.Size.Height - 350, frame.Size.Width - 100, 100);
			statusView = new StatusView (statusFrame);
			View.AddSubview (statusView);
			statusView.Status = "Loading";

			var buttonsFrame = new CGRect (100, statusFrame.GetMaxY () + 20, frame.Size.Width - 100, 230);
			buttonsView = new ButtonCollectionView (buttonsFrame) {
				ShouldGroupAccessibilityChildren = true
			};
			buttonsView.ButtonSelectedEvent += ButtonSelected;
			buttonsView.ButtonDraggedEvent += ButtonDragged;
			buttonsView.ButtonFinishedEvent += ButtonFinished;
			View.AddSubview (buttonsView);

			var questionFrame = new CGRect (10, statusFrame.GetMaxY () + 110, 80, 80);
			var questionView = new SymbolMarkView (questionFrame) {
				AccessibilityLabel = "Help"
			};
			questionView.TouchUpInside += (s, e) => questionPressed ();
			View.AddSubview (questionView);
			questionView.Symbol = "?";

			meterView.ZombieLevel = 0;
			goForthZombies ();
			NSNotificationCenter.DefaultCenter.AddObserver (this, new Selector ("voiceOverFinished:"), null, null);
		}