Exemplo n.º 1
0
 public MainView()
 {
     BackgroundColor          = UIColor.White;
     AddSubview(firstCard     = new CardView());
     AddSubview(operatorLabel = new UILabel {
         AdjustsFontSizeToFitWidth = true,
         Font          = UIFont.BoldSystemFontOfSize(100),
         TextAlignment = UITextAlignment.Center,
         Text          = "+",
     });
     AddSubview(secondCard = new CardView());
     AddSubview(equalLabel = new UILabel {
         AdjustsFontSizeToFitWidth = true,
         Font          = UIFont.BoldSystemFontOfSize(100),
         TextAlignment = UITextAlignment.Center,
         Text          = "=",
     });
     AddSubview(totalView = new TotalView());
 }
Exemplo n.º 2
0
			public MainView()
			{
				BackgroundColor = UIColor.White;
				AddSubview(firstCard = new CardView());
				AddSubview(operatorLabel = new UILabel{
					AdjustsFontSizeToFitWidth = true,
					Font = UIFont.BoldSystemFontOfSize(100),
					TextAlignment = UITextAlignment.Center,
					Text = "+",
				});
				AddSubview(secondCard = new CardView());
				AddSubview(equalLabel = new UILabel{
					AdjustsFontSizeToFitWidth = true,
					Font = UIFont.BoldSystemFontOfSize(100),
					TextAlignment = UITextAlignment.Center,
					Text = "=",
				});
				AddSubview(totalView = new TotalView());
			}
Exemplo n.º 3
0
			public MainView()
			{
				BackgroundColor = UIColor.White;
				AddSubview(firstCard = new CardView());
				AddSubview(operatorLabel = new UILabel{
					AdjustsFontSizeToFitWidth = true,
					Font = UIFont.BoldSystemFontOfSize(100),
					TextAlignment = UITextAlignment.Center,
					Text = "+",
				});
				AddSubview(secondCard = new CardView());
				AddSubview(equalLabel = new SimpleButton{
					//AdjustsFontSizeToFitWidth = true,
					Font = UIFont.BoldSystemFontOfSize(100),
					//TextAlignment = UITextAlignment.Center,
					TitleColor = UIColor.Black,
					Title = "=",
					Tapped = s => model.TappedEquals ()
				});
				equalLabel.TitleLabel.AdjustsFontSizeToFitWidth = true;
				AddSubview(totalView = new TotalView{
					Tapped = () => model.TappedTotal ()
				});
				AddSubview(settingsButton = new LongPressButton{
					Tapped = () => Parent.PresentViewControllerAsync (new UINavigationController (new SettingsViewController ()), true),
				});

				topNumbers = new NumberBar{
					Tapped = (i) =>{model.GuessedValue = i;}
				};
				topNumbers.SetRange(1,5);
				bottomNumbers = new NumberBar{
					Tapped = (i) =>{model.GuessedValue = i;}
				};;
				bottomNumbers.SetRange(6,10);
				fireworks = new FireworksView();
				fireworks.Start();
			}