private void SetupUserInterface ()
		{
			BackgroundColor = UIColor.Clear.FromHexString ("#094074", 1.0f);

			partNameLabel = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 32f),
				Frame = new CGRect (0, 0, this.Bounds.Width, 40),
				Text = "Choose a part.",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			partNameButton = new PickerButton {
				Frame = new CGRect (40, Frame.Height*1/8 + 10, this.Bounds.Width - 80, 30)
			};
			partNameButton.SetTitleColor (UIColor.Clear.FromHexString("#9B9B9B", 1.0f), UIControlState.Normal);

			searchButton = new SearchButton {
				Frame = new CGRect (40, Frame.Height*1/5 + 40, this.Bounds.Width - 80, 30)
			};
			searchButton.SetTitle ("Search", UIControlState.Normal);
			searchButton.SetTitleColor (UIColor.White, UIControlState.Normal);

			partNamePicker = new UIPickerView {
				Frame = new CGRect (0, Frame.Height*1/8, this.Bounds.Width, 40),
				Hidden = true,
			};

			buttonClickable = false;

			Add (partNameLabel);
			Add (partNameButton);
			Add (partNamePicker);
			Add (searchButton);
		}
示例#2
0
		private void SetupUserInterface ()
		{
			BackgroundColor = UIColor.Clear.FromHexString ("#094074", 1.0f);

			makeLabel = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 32f),
				Frame = new CGRect (0, 0, Frame.Width, 40),
				Text = "Choose a make.",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			makeButton = new PickerButton {
				Frame = new CGRect (40, Frame.Height*1/8 + 10, Frame.Width - 80, 30)
			};
			makeButton.SetTitleColor (UIColor.Clear.FromHexString("#9B9B9B", 1.0f), UIControlState.Normal);

			makePicker = new UIPickerView {
				Frame = new CGRect (0, Frame.Height*1/8, Frame.Width, 40),
				Hidden = true,
				Model = new MakePickerViewModel (makeButton)
			};

			Add (makeLabel);
			Add (makeButton);
			Add (makePicker);
		}
示例#3
0
		private void SetupUserInterface ()
		{
			BackgroundColor = UIColor.Clear.FromHexString ("#094074", 1.0f);

			yearLabel = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 30f),
				Frame = new CGRect (0, 0, this.Bounds.Width, 40),
				Text = "Choose a range of years.",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			yearButton = new PickerButton {
				Frame = new CGRect (20, Frame.Height*1/8 + 10, this.Bounds.Width/2 - 40, 30)
			};

			yearButton2 = new PickerButton {
				Frame = new CGRect (this.Bounds.Width/2 + 20, Frame.Height*1/8 + 10, this.Bounds.Width/2 - 40, 30)
			};

			yearButton.SetTitleColor (UIColor.Clear.FromHexString("#9B9B9B", 1.0f), UIControlState.Normal);
			yearButton2.SetTitleColor (UIColor.Clear.FromHexString("#9B9B9B", 1.0f), UIControlState.Normal);

			yearPicker = new UIPickerView {
				Frame = new CGRect (20, Frame.Height*1/8, this.Bounds.Width/2 - 40, 50),
				Hidden = true,
				Model = new YearPickerViewModel (new List<string> { "Loading Years..." }, yearButton)
			};


			// This is the second picker that denotes the highest year in the range of years
			yearPicker2 = new UIPickerView {
				Frame = new CGRect (this.Bounds.Width/2 + 20, Frame.Height*1/8, this.Bounds.Width/2 - 40, 50),
				Hidden = true,
				Model = new Year2PickerViewModel (new List<string> { "Loading Years..." }, yearButton2)
			};

			buttonClickable = false;
			button2Clickable = false;

			Add (yearLabel);
			Add (yearButton);
			Add (yearButton2);
			Add (yearPicker);
			Add (yearPicker2);
		}