void Update (){ if (Input.GetMouseButtonDown (0)) { float timeDelta = Time.time - lastClickTime; button = gameObject.GetComponent<ProfileButton> (); if (timeDelta < doubleClickTime) { lastClickTime = 0; profileModal.enabled = false; /* if (button != null) { button.button.onClick.AddListener (() => SetProfileName (button.profileName.text, button.button) ); } */ } else { lastClickTime = Time.time; if (button != null) { } } } }
void ReleaseDesignerOutlets() { if (AboutButton != null) { AboutButton.Dispose(); AboutButton = null; } if (DiaryButton != null) { DiaryButton.Dispose(); DiaryButton = null; } if (MainView != null) { MainView.Dispose(); MainView = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (TeamButton != null) { TeamButton.Dispose(); TeamButton = null; } }
void ReleaseDesignerOutlets() { if (CalendarButton != null) { CalendarButton.Dispose(); CalendarButton = null; } if (CommunityButton != null) { CommunityButton.Dispose(); CommunityButton = null; } if (NutritionButton != null) { NutritionButton.Dispose(); NutritionButton = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (WorkoutsButton != null) { WorkoutsButton.Dispose(); WorkoutsButton = null; } }
public void Initialize() { try { HomeButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llHome); NotificationButton = MainContext.FindViewById <FrameLayout>(Resource.Id.llNotification); ProfileButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llProfile); TrendButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llTrend); MessagesButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llMessages); HomeImage = MainContext.FindViewById <ImageView>(Resource.Id.ivHome); NotificationImage = MainContext.FindViewById <ImageView>(Resource.Id.ivNotification); ProfileImage = MainContext.FindViewById <ImageView>(Resource.Id.ivProfile); TrendImage = MainContext.FindViewById <ImageView>(Resource.Id.ivTrend); MessagesImage = MainContext.FindViewById <ImageView>(Resource.Id.ivMessages); HomeButton.SetOnClickListener(this); TrendButton.SetOnClickListener(this); NotificationButton.SetOnClickListener(this); ProfileButton.SetOnClickListener(this); MessagesButton.SetOnClickListener(this); } catch (Exception e) { Console.WriteLine(e); } }
void ReleaseDesignerOutlets() { if (CalendarButton != null) { CalendarButton.Dispose(); CalendarButton = null; } if (FavoritesButton != null) { FavoritesButton.Dispose(); FavoritesButton = null; } if (NavBar != null) { NavBar.Dispose(); NavBar = null; } if (NutritionButton != null) { NutritionButton.Dispose(); NutritionButton = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (WorkoutsButton != null) { WorkoutsButton.Dispose(); WorkoutsButton = null; } }
public void MoveBack() { BackButton.SetActive(false); ProfileButton.SetActive(false); QuickPlayButton.SetActive(false); FadeoutPaneltoMain.SetActive(true); }
void OnGUI(){ Event mouse = Event.current; int count = mouse.clickCount; if (count < 2) { Debug.Log(count + " clicks"); }else if (count == 2) { Debug.Log(count + " clicks"); Debug.Log(mouse.type); button = gameObject.GetComponent<ProfileButton> (); if (button != null) { //button.button.onClick.AddListener (() => // SetProfileName (button.profileName.text, button.button) //); string profileName = button.profileName.text; Debug.Log (profileName); SaveLoad.list.latestGame = profileName; Game.current = new Game (); Game.current = SaveLoad.list.savedGames.Find(x => x.currentProfile.profileName == profileName); SaveLoad.Save(); profileBtn.GetComponentInChildren<Text> ().text = profileName; Debug.Log (SaveLoad.list.latestGame ); } } }
private void ScanUIButtonsEnable() { ProfileButton.SetActive(true); SupportButton.SetActive(true); AboutUsButton.SetActive(true); SignoutButton.SetActive(true); CloseButton.SetActive(true); }
private void ScanUIButtonsDisable() { ProfileButton.SetActive(false); SupportButton.SetActive(false); AboutUsButton.SetActive(false); SignoutButton.SetActive(false); CloseButton.SetActive(false); }
public void StartMatchmaking() { QuickPlayButton.SetActive(false); ProfileButton.SetActive(false); BackButton.SetActive(false); HeadingText.GetComponent <TextMeshProUGUI>().text = "Finding Match"; FindingMatch = true; }
public void Initialize() { try { MainLayout = MainContext.FindViewById <LinearLayout>(Resource.Id.llMain); HomeButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llHome); ResponseHomeButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llResponseHome); TrendButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llTrend); BlogButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llBlog); NotificationButton = MainContext.FindViewById <FrameLayout>(Resource.Id.llNotification); ProfileButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llProfile); if (!UserDetails.IsLogin) { BlogButton.Visibility = ViewStates.Gone; NotificationButton.Visibility = ViewStates.Gone; ProfileButton.Visibility = ViewStates.Gone; MainLayout.WeightSum = 2; } else { if (!AppSettings.ShowArticle) { BlogButton.Visibility = ViewStates.Gone; MainLayout.WeightSum = 4; } } HomeImage = MainContext.FindViewById <ImageView>(Resource.Id.ivHome); ResponseHomeImage = MainContext.FindViewById <ImageView>(Resource.Id.ivResponseHome); NotificationImage = MainContext.FindViewById <ImageView>(Resource.Id.ivNotification); ProfileImage = MainContext.FindViewById <ImageView>(Resource.Id.ivProfile); TrendImage = MainContext.FindViewById <ImageView>(Resource.Id.ivTrend); BlogImage = MainContext.FindViewById <ImageView>(Resource.Id.ivBlog); txtUnSeenCount = MainContext.FindViewById <TextView>(Resource.Id.txtUnSeenCount); HomeButton.SetOnClickListener(this); ResponseHomeButton.SetOnClickListener(this); TrendButton.SetOnClickListener(this); if (UserDetails.IsLogin) { if (AppSettings.ShowArticle) { BlogButton.SetOnClickListener(this); } NotificationButton.SetOnClickListener(this); ProfileButton.SetOnClickListener(this); } } catch (Exception e) { Console.WriteLine(e); } }
public void CancelMatchmaking() { QuickPlayButton.SetActive(true); ProfileButton.SetActive(true); BackButton.SetActive(true); HeadingText.GetComponent <TextMeshProUGUI>().text = "Choose Operation"; FindingMatch = false; MusicObject.GetComponent <AudioSource>().volume = 1.0f; }
/// <summary> /// Закрыть меню загрузки /// </summary> public void CloseLoadMenu() { GetComponent <Canvas>().enabled = false; OpenWarningWindow(false); OpenCreateNewGameWindow(false); if (chosenButton != null) { chosenButton.SetImage(false); chosenButton = null; } }
public ProfileItem(KeyValuePair <string, MCProfile> profile, ProfileButton _selectorParent) { InitializeComponent(); this.SelectorParent = _selectorParent; this.Tag = profile.Value; this.ProfileName.Text = profile.Key; _ProfileName = profile.Key; if (Properties.LauncherSettings.Default.CurrentProfile == profile.Key) { SelectedMark.Visibility = Visibility.Visible; } }
public override void ViewDidLoad() { base.ViewDidLoad(); UIGraphics.BeginImageContext(this.View.Frame.Size); UIImage i = UIImage.FromFile(@"BackgroundImages/bg3.jpg"); i = i.Scale(this.View.Frame.Size); this.View.BackgroundColor = UIColor.FromPatternImage(i); ProfileButton.SetTitle(String.Format("{0}", UserDataManager.getDisplayName()), UIControlState.Normal); NavigationItem.SetHidesBackButton(true, false); }
void ReleaseDesignerOutlets() { if (AllUsersButton != null) { AllUsersButton.Dispose(); AllUsersButton = null; } if (FollowersButton != null) { FollowersButton.Dispose(); FollowersButton = null; } if (FollowingButton != null) { FollowingButton.Dispose(); FollowingButton = null; } if (HomeButton != null) { HomeButton.Dispose(); HomeButton = null; } if (FriendsButton != null) { FriendsButton.Dispose(); FriendsButton = null; } if (AddPostButton != null) { AddPostButton.Dispose(); AddPostButton = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (UsersCollectionView != null) { UsersCollectionView.Dispose(); UsersCollectionView = null; } }
void ReleaseDesignerOutlets() { if (CartButton != null) { CartButton.Dispose(); CartButton = null; } if (ChatButton != null) { ChatButton.Dispose(); ChatButton = null; } if (MyLibraryButton != null) { MyLibraryButton.Dispose(); MyLibraryButton = null; } if (NotificationsButton != null) { NotificationsButton.Dispose(); NotificationsButton = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (ProfileButton2 != null) { ProfileButton2.Dispose(); ProfileButton2 = null; } if (ProfilePic != null) { ProfilePic.Dispose(); ProfilePic = null; } if (ProfilePicButton != null) { ProfilePicButton.Dispose(); ProfilePicButton = null; } }
public void ProfileButtonClick(ProfileButton button) { if (removeModeActive) { profilesForRemoval.Add(button.GetID()); Destroy(button.gameObject); Debug.Log("button with ID " + button.GetID() + " Name: " + button.GetName() + " destroyed."); } else { profileManager.SetCurrentProfile(button.GetID()); Debug.Log("ProfileID: " + button.GetID() + " Name: " + button.GetName() + " is now set as profile"); gameManager.ResetGame(); } }
protected MenuBaseViewController() : base(style: UITableViewStyle.Plain) { _title = new UILabel(new RectangleF(0, 40, 320, 40)); _title.TextAlignment = UITextAlignment.Left; _title.BackgroundColor = UIColor.Clear; _title.Font = UIFont.SystemFontOfSize(16f); _title.TextColor = UIColor.FromRGB(246, 246, 246); // _title.ShadowColor = UIColor.FromRGB(21, 21, 21); // _title.ShadowOffset = new SizeF(0, 1); NavigationItem.TitleView = _title; _profileButton = new ProfileButton(); _profileButton.TouchUpInside += ProfileButtonClicked; }
void Start() { profileModal = gameObject.GetComponentInParent<Canvas> (); mainMenu = profileModal.GetComponentInParent<Camera> (); mainMenuOptions = mainMenu.transform.Find("Main Menu").GetComponent<Canvas>(); button = gameObject.GetComponent<ProfileButton> (); profileBtn = mainMenuOptions.transform.Find ("Profile Button").GetComponent<Button> (); if (profileBtn != null) { Debug.Log ("Found " + profileBtn.name); } if (button != null) { button.button.onClick.AddListener (() => ClickProfileName (button.profileName.text, button.button) ); } }
/// <summary> /// Инициализация окна сохранения /// </summary> public void Initialize() { savePath = (Application.dataPath) + "/StreamingAssets/Saves/"; savesInfoPath = (Application.dataPath) + "/StreamingAssets/SavesInfo.xml"; savesInfo = Serializator.DeXmlSavesInfo(savesInfoPath); FileInfo[] fInfos = new DirectoryInfo((Application.dataPath) + "/StreamingAssets/").GetFiles(); bool hasFile = false; for (int i = 0; i < fInfos.Length; i++) { if (fInfos[i].Name == "SavesInfo.xml") { hasFile = true; break; } } if (!hasFile) { Serializator.SaveXmlSavesInfo(new SavesInfo(3), savesInfoPath); for (int i = 0; i < 3; i++) { Serializator.SaveXml(null, savePath + "Profile" + i.ToString() + ".xml"); } } chosenButton = null; Transform mainPanel = transform.FindChild("MainPanel"); savesPanel = mainPanel.FindChild("Saves").FindChild("SavesPanel"); saveButtons = new ProfileButton[3]; for (int i = 0; i < 3; i++) { saveButtons[i] = savesPanel.FindChild("Profile" + (i + 1).ToString()).GetComponent <ProfileButton>(); saveButtons[i].Initialize(savesInfo.saves[i], this); } warningPanel = transform.FindChild("WarningPanel").gameObject; createNewFadePanel = transform.FindChild("CreateNewFadePanel").gameObject; saveNameInputPanel = createNewFadePanel.transform.FindChild("CreateNewPanel").GetComponentInChildren <InputField>(); }
/// <summary> /// Выбрать то или иное сохранение и произвести ним действие /// </summary> public void ChooseButton(ProfileButton pButton) { if (chosenButton != null? pButton != chosenButton: true) { if (chosenButton != null) { chosenButton.SetImage(false); } chosenButton = pButton; chosenButton.SetImage(true); } else { if (pButton.SInfo.hasData) { Load(savesInfo.saves.IndexOf(pButton.SInfo)); } } }
void Start() { profileModal = gameObject.GetComponentInParent <Canvas> (); mainMenu = profileModal.GetComponentInParent <Camera> (); mainMenuOptions = mainMenu.transform.Find("Main Menu").GetComponent <Canvas>(); button = gameObject.GetComponent <ProfileButton> (); profileBtn = mainMenuOptions.transform.Find("Profile Button").GetComponent <Button> (); if (profileBtn != null) { Debug.Log("Found " + profileBtn.name); } if (button != null) { button.button.onClick.AddListener(() => ClickProfileName(button.profileName.text, button.button) ); } }
protected override void InitializeObjects() { base.InitializeObjects(); var topView = new UIView(); var centerView = new UIView(); var bottomView = new UIView(); var socialNetworksView = new UIView(); var applicationLogo = new UIImageView(UIImage.FromBundle(@"Images/logo.png")); // Hide navigation bar NavigationController.SetNavigationBarHidden(true, false); View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(@"Images/main_background.png").Scale(View.Frame.Size)); applicationLogo.Frame = new CGRect(10, 10, applicationLogo.Image.CGImage.Width, applicationLogo.Image.CGImage.Height); topView.AddIfNotNull(applicationLogo); topView.AddConstraints( applicationLogo.WithRelativeWidth(topView, 0.5f), applicationLogo.WithRelativeHeight(topView, 0.25f), applicationLogo.WithSameCenterX(topView), applicationLogo.WithSameCenterY(topView) ); _loginTextField = TextFieldInitializer("Login"); _loginTextField.TextFieldWithValidator.TextField.KeyboardType = UIKeyboardType.EmailAddress; socialNetworkLabel = LabelInitializer("Login With:", UIColor.LightGray); registrationLabel = LabelInitializer("Don't have an account?", UIColor.LightGray); _passwordTextField = TextFieldInitializer("Password"); _loginButton = ButtonInitializer("Login", UIControlState.Normal, Theme.BlueDark.ToUIColor(), UIColor.White, UIControlState.Normal, null, UIControlState.Disabled); _googlePlusLoginButton = CreateGoogleButton(); var sloginView = new LoginButton(new CGRect(51, 0, 218, 46)) { LoginBehavior = LoginBehavior.Native, ReadPermissions = readPermissions.ToArray() }; _facebookLoginButton = ButtonInitializer(sloginView.CurrentTitle, UIControlState.Normal, null, sloginView.CurrentTitleColor, UIControlState.Normal, sloginView.CurrentImage, UIControlState.Normal); _facebookLoginButton.SetBackgroundImage(sloginView.CurrentBackgroundImage, UIControlState.Normal); _facebookLoginButton.Font = UIFont.FromName("Helvetica", 14f); _facebookLoginButton.ImageEdgeInsets = new UIEdgeInsets(0, 0, 0, 40); forgotPasswordButton = ButtonInitializer("Forgot your password?", UIControlState.Normal, null, UIColor.LightGray, UIControlState.Normal, null, UIControlState.Normal); forgotPasswordButton.TitleLabel.Font = UIFont.FromName("Helvetica", 12f); registrationButton = ButtonInitializer("Get Started!", UIControlState.Normal, null, UIColor.Cyan, UIControlState.Normal, null, UIControlState.Normal); registrationButton.TitleLabel.Font = UIFont.FromName("Helvetica", 12f); socialNetworksView.AddIfNotNull(socialNetworkLabel, _facebookLoginButton, _googlePlusLoginButton); socialNetworksView.AddConstraints( socialNetworkLabel.AtTopOf(socialNetworksView), socialNetworkLabel.AtLeftOf(socialNetworksView), socialNetworkLabel.WithSameWidth(socialNetworksView), socialNetworkLabel.WithRelativeHeight(socialNetworksView, 0.2f), socialNetworkLabel.AtBottomOf(socialNetworksView, 10), _facebookLoginButton.Below(socialNetworkLabel), _facebookLoginButton.AtLeftOf(socialNetworksView), _facebookLoginButton.WithRelativeWidth(socialNetworksView, 0.48f), _facebookLoginButton.WithRelativeHeight(socialNetworksView, 0.4f), _googlePlusLoginButton.Below(socialNetworkLabel), _googlePlusLoginButton.WithRelativeWidth(socialNetworksView, 0.48f), _googlePlusLoginButton.WithRelativeHeight(socialNetworksView, 0.4f), _googlePlusLoginButton.AtRightOf(socialNetworksView) ); // Central block with text fields and login buttons centerView.Layer.CornerRadius = 10; centerView.AddIfNotNull(_loginTextField, _passwordTextField, forgotPasswordButton, _loginButton, socialNetworksView, registrationLabel, registrationButton); centerView.BackgroundColor = UIColor.White; centerView.AddConstraints( _loginTextField.AtTopOf(centerView, 10), _loginTextField.WithSameCenterX(centerView), _loginTextField.WithSameWidth(centerView), _loginTextField.WithRelativeHeight(centerView, 0.2f), _passwordTextField.Below(_loginTextField), _passwordTextField.WithSameCenterX(centerView), _passwordTextField.WithSameWidth(centerView), _passwordTextField.WithRelativeHeight(centerView, 0.2f), forgotPasswordButton.Below(_passwordTextField, -10), forgotPasswordButton.AtLeftOf(centerView, 20), forgotPasswordButton.WithRelativeWidth(centerView, 0.5f), forgotPasswordButton.WithRelativeHeight(centerView, 0.07f), _loginButton.Below(forgotPasswordButton, 10), _loginButton.AtLeftOf(centerView, 20), _loginButton.AtRightOf(centerView, 20), // make a fat login button _loginButton.WithRelativeHeight(centerView, 0.15f), socialNetworksView.Below(_loginButton, 20), socialNetworksView.AtLeftOf(centerView, 20), socialNetworksView.AtRightOf(centerView, 20), socialNetworksView.WithRelativeHeight(centerView, 0.2f), registrationLabel.Below(socialNetworksView), registrationLabel.AtLeftOf(centerView, 25), registrationLabel.WithRelativeWidth(centerView, 0.5f), registrationLabel.WithRelativeHeight(centerView, 0.07f), registrationButton.Below(socialNetworksView), registrationButton.AtRightOf(centerView, 10), registrationButton.WithRelativeWidth(centerView, 0.5f), registrationButton.WithRelativeHeight(centerView, 0.07f) ); // Main view View.AddIfNotNull(topView, centerView, bottomView); View.AddConstraints( topView.AtTopOf(View, 10), topView.AtLeftOf(View), topView.AtRightOf(View), topView.WithRelativeHeight(View, 0.15f), centerView.AtLeftOf(View, 30), centerView.AtRightOf(View, 30), centerView.Below(topView), centerView.AtBottomOf(View, 70), bottomView.AtBottomOf(View), bottomView.AtLeftOf(View), bottomView.AtRightOf(View), bottomView.Below(centerView), bottomView.WithRelativeHeight(View, 0f) ); SignIn.SharedInstance.UIDelegate = this; EnableNextKeyForTextFields(_loginTextField.TextFieldWithValidator.TextField, _passwordTextField.TextFieldWithValidator.TextField); }
void ReleaseDesignerOutlets() { if (AddPostButton != null) { AddPostButton.Dispose(); AddPostButton = null; } if (EditUserButton != null) { EditUserButton.Dispose(); EditUserButton = null; } if (FriendsButton != null) { FriendsButton.Dispose(); FriendsButton = null; } if (HomeButton != null) { HomeButton.Dispose(); HomeButton = null; } if (ProfileButton != null) { ProfileButton.Dispose(); ProfileButton = null; } if (UserBioLabel != null) { UserBioLabel.Dispose(); UserBioLabel = null; } if (UserFollowersLabel != null) { UserFollowersLabel.Dispose(); UserFollowersLabel = null; } if (UserFollowingLabel != null) { UserFollowingLabel.Dispose(); UserFollowingLabel = null; } if (UserImageView != null) { UserImageView.Dispose(); UserImageView = null; } if (UsernameLabel != null) { UsernameLabel.Dispose(); UsernameLabel = null; } if (UserPostsCollectionView != null) { UserPostsCollectionView.Dispose(); UserPostsCollectionView = null; } if (UserPostsLabel != null) { UserPostsLabel.Dispose(); UserPostsLabel = null; } if (UserTagLabel != null) { UserTagLabel.Dispose(); UserTagLabel = null; } if (LogoutButton != null) { LogoutButton.Dispose(); LogoutButton = null; } }
protected override void InitializeObjects() { base.InitializeObjects(); var topView = new UIView(); var scrollView = new UIScrollView(); var topTextRowView = new UIView(); var centerTextRowView = new UIView(); var bottomTextRowView = new UIView(); var bottomView = new UIView(); var profileNavigationBarBackground = new UIImageView(UIImage.FromBundle(@"Images/navigation_bar_background.png")); backHomeView = UIButton.FromType(UIButtonType.Custom); backHomeView.SetImage(UIImage.FromFile(@"Images/ic_back.png"), UIControlState.Normal); nameOfPageLabel = LabelInformationAboutPage(UIColor.White, "Profile", UIFont.BoldSystemFontOfSize(16f)); informationAboutPageLabel = LabelInformationAboutPage(UIColor.FromRGB(29, 157, 189), "Please, Enter Your Personal Information.", UIFont.FromName("Helvetica", 14f)); // Hide navigation bar NavigationController.SetNavigationBarHidden(true, false); View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(@"Images/tab_background.png").Scale(View.Frame.Size)); profileNavigationBarBackground.Frame = new CGRect(10, 10, profileNavigationBarBackground.Image.CGImage.Width, profileNavigationBarBackground.Image.CGImage.Height); var labelView = new UIView(); labelView.AddIfNotNull(nameOfPageLabel, informationAboutPageLabel); labelView.AddConstraints( nameOfPageLabel.AtTopOf(labelView, 20), nameOfPageLabel.WithSameCenterX(labelView), nameOfPageLabel.WithSameCenterY(labelView), nameOfPageLabel.WithSameWidth(labelView), nameOfPageLabel.WithRelativeHeight(labelView, 0.3f), informationAboutPageLabel.Below(nameOfPageLabel, 5), informationAboutPageLabel.WithSameWidth(labelView), informationAboutPageLabel.WithSameCenterX(labelView), informationAboutPageLabel.WithRelativeHeight(labelView, 0.3f) ); topView.AddIfNotNull(profileNavigationBarBackground, backHomeView, labelView); topView.AddConstraints( profileNavigationBarBackground.WithSameWidth(topView), profileNavigationBarBackground.WithSameHeight(topView), profileNavigationBarBackground.AtTopOf(topView), backHomeView.WithSameCenterY(topView), backHomeView.AtLeftOf(topView, 20), backHomeView.WithRelativeWidth(topView, 0.1f), backHomeView.WithRelativeHeight(topView, 0.2f), labelView.WithSameCenterX(topView), labelView.WithSameCenterY(topView), labelView.WithRelativeWidth(topView, 0.8f), labelView.WithRelativeHeight(topView, 0.6f) ); firstNameTextField = TextFieldInitializer("First Name"); lastNameTextField = TextFieldInitializer("Last Name"); emailTextField = TextFieldInitializer("Email"); addressTextField = TextFieldInitializer("Address"); cityTextField = TextFieldInitializer("City"); zipCodeTextField = TextFieldInitializer("Zip Code"); stateTextField = TextFieldInitializer("State"); statesPicker = new UIPickerView(); statesPickerViewModel = new MvxPickerViewModel(statesPicker); statesPicker.Model = statesPickerViewModel; statesPicker.ShowSelectionIndicator = true; statesPicker.BackgroundColor = UIColor.White; addLicenseButton = ProfileButtonManager.ButtonInitiaziler("Add License Plate", UIImage.FromFile(@"Images/ProfileView/ic_license.png")); addCreditCardButton = ProfileButtonManager.ButtonInitiaziler("Add Credit Card", UIImage.FromFile(@"Images/ProfileView/ic_card.png")); topTextRowView.AddIfNotNull(firstNameTextField, lastNameTextField); topTextRowView.AddConstraints( firstNameTextField.AtTopOf(topTextRowView), firstNameTextField.AtLeftOf(topTextRowView), firstNameTextField.WithRelativeWidth(topTextRowView, 0.475f), firstNameTextField.WithSameHeight(topTextRowView), lastNameTextField.AtTopOf(topTextRowView), lastNameTextField.AtRightOf(topTextRowView), lastNameTextField.WithRelativeWidth(topTextRowView, 0.475f), lastNameTextField.WithSameHeight(topTextRowView) ); centerTextRowView.AddIfNotNull(emailTextField, addressTextField, cityTextField); centerTextRowView.AddConstraints( emailTextField.AtTopOf(centerTextRowView), emailTextField.WithSameCenterX(centerTextRowView), emailTextField.WithSameWidth(centerTextRowView), emailTextField.WithRelativeHeight(centerTextRowView, 0.3f), addressTextField.Below(emailTextField, 10), addressTextField.WithSameCenterX(centerTextRowView), addressTextField.WithSameWidth(centerTextRowView), addressTextField.WithRelativeHeight(centerTextRowView, 0.3f), cityTextField.Below(addressTextField, 10), cityTextField.WithSameCenterX(centerTextRowView), cityTextField.WithSameWidth(centerTextRowView), cityTextField.WithRelativeHeight(centerTextRowView, 0.3f) ); bottomTextRowView.AddIfNotNull(stateTextField, zipCodeTextField); bottomTextRowView.AddConstraints( stateTextField.AtTopOf(bottomTextRowView), stateTextField.AtLeftOf(bottomTextRowView), stateTextField.WithRelativeWidth(bottomTextRowView, 0.475f), stateTextField.WithSameHeight(bottomTextRowView), zipCodeTextField.AtTopOf(bottomTextRowView), zipCodeTextField.AtRightOf(bottomTextRowView), zipCodeTextField.WithRelativeWidth(bottomTextRowView, 0.475f), zipCodeTextField.WithSameHeight(bottomTextRowView) ); bottomView.AddIfNotNull(addLicenseButton, addCreditCardButton); bottomView.AddConstraints( addLicenseButton.AtTopOf(bottomView), addLicenseButton.WithSameCenterX(bottomView), addLicenseButton.WithSameWidth(bottomView), addLicenseButton.WithRelativeHeight(bottomView, 0.4f), addCreditCardButton.Below(addLicenseButton, 10), addCreditCardButton.WithSameCenterX(bottomView), addCreditCardButton.WithSameWidth(bottomView), addCreditCardButton.WithRelativeHeight(bottomView, 0.4f) ); scrollView.AddIfNotNull(topTextRowView, centerTextRowView, bottomTextRowView, bottomView); scrollView.AddConstraints( topTextRowView.AtTopOf(scrollView, 30), topTextRowView.WithSameWidth(scrollView), topTextRowView.WithSameCenterX(scrollView), topTextRowView.WithRelativeHeight(scrollView, 0.12f), centerTextRowView.Below(topTextRowView, 10), centerTextRowView.WithSameWidth(scrollView), centerTextRowView.AtLeftOf(scrollView), centerTextRowView.AtRightOf(scrollView), centerTextRowView.WithRelativeHeight(scrollView, 0.4f), bottomTextRowView.Below(centerTextRowView, 10), bottomTextRowView.WithSameWidth(scrollView), bottomTextRowView.WithSameCenterX(scrollView), bottomTextRowView.WithRelativeHeight(scrollView, 0.12f), bottomView.Below(bottomTextRowView, 10), bottomView.WithSameWidth(scrollView), bottomView.AtLeftOf(scrollView), bottomView.AtRightOf(scrollView), bottomView.AtBottomOf(scrollView, 100), bottomView.WithRelativeHeight(scrollView, 0.27f) ); View.AddIfNotNull(topView, scrollView); View.AddConstraints( topView.AtTopOf(View), topView.WithSameWidth(View), topView.WithRelativeHeight(View, 0.2f), scrollView.Below(topView, 30), scrollView.AtLeftOf(View, 30), scrollView.AtRightOf(View, 30), scrollView.WithRelativeHeight(View, 0.8f) ); EnableNextKeyForTextFields(firstNameTextField.TextFieldWithValidator.TextField, lastNameTextField.TextFieldWithValidator.TextField, emailTextField.TextFieldWithValidator.TextField, addressTextField.TextFieldWithValidator.TextField, cityTextField.TextFieldWithValidator.TextField, stateTextField.TextFieldWithValidator.TextField, zipCodeTextField.TextFieldWithValidator.TextField); }
public void ClickProfile() { ProfileButton.PerformClick(); }
public static ProfileButton ButtonInitiaziler(string text = null, UIImage icon = null) { profileButton = new ProfileButton(); return(SetParameters(text, icon)); }
public static ProfileButton ButtonInitiaziler(nfloat _distanceBetweenTextAndImage) { profileButton = new ProfileButton(_distanceBetweenTextAndImage); return(SetParameters()); }
public static ProfileButton ButtonInitiaziler(nfloat _distanceBetweenTextAndImage, nfloat iconMarginLeft, nfloat iconHeight, nfloat iconWidth, nfloat textHeight, string text = null, UIImage icon = null, UIColor textColor = null, UIColor backgroundColor = null, UIFont textFont = null) { profileButton = new ProfileButton(_distanceBetweenTextAndImage, iconMarginLeft, iconHeight, iconWidth, textHeight); return(SetParameters(text, icon, textColor, backgroundColor, textFont)); }
public void ClickTheProfile() { Thread.Sleep(3000); ProfileButton.Click(); }
protected override void InitializeObjects() { base.InitializeObjects(); var topView = new UIView(); var scrollView = new UIView(); var bottomView = new UIView(); informationLabel = new UILabel(); informationLabel.TextColor = UIColor.White; informationLabel.Text = "Payment History"; informationLabel.Font = UIFont.BoldSystemFontOfSize(16f); informationLabel.TextAlignment = UITextAlignment.Center; backHomeView = UIButton.FromType(UIButtonType.Custom); backHomeView.SetImage(UIImage.FromFile(@"Images/ic_back.png"), UIControlState.Normal); var profileNavigationBarBackground = new UIImageView(UIImage.FromBundle(@"Images/navigation_bar_background.png")); // Hide navigation bar NavigationController.SetNavigationBarHidden(true, false); View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(@"Images/tab_background.png").Scale(View.Frame.Size));//EnvironmentInfo.CheckDevice().Scale(View.Frame.Size)); profileNavigationBarBackground.Frame = new CoreGraphics.CGRect(10, 10, profileNavigationBarBackground.Image.CGImage.Width, profileNavigationBarBackground.Image.CGImage.Height); topView.AddIfNotNull(profileNavigationBarBackground, backHomeView, informationLabel); topView.AddConstraints( profileNavigationBarBackground.WithSameWidth(topView), profileNavigationBarBackground.WithSameHeight(topView), profileNavigationBarBackground.AtTopOf(topView), backHomeView.WithSameCenterY(topView), backHomeView.AtLeftOf(topView, 20), backHomeView.WithRelativeWidth(topView, 0.1f), backHomeView.WithRelativeHeight(topView, 0.2f), informationLabel.WithSameCenterY(topView), informationLabel.WithSameCenterX(topView), informationLabel.WithSameWidth(topView), informationLabel.WithRelativeHeight(topView, 0.3f) ); dowloadHistoryButton = ProfileButtonManager.ButtonInitiaziler("Download History", UIImage.FromFile(@"Images/ProfileView/ic_license.png")); tableView = new UITableView(); bottomView.AddIfNotNull(dowloadHistoryButton, tableView); bottomView.AddConstraints( dowloadHistoryButton.AtTopOf(bottomView), dowloadHistoryButton.WithSameCenterX(bottomView), dowloadHistoryButton.WithSameWidth(bottomView), dowloadHistoryButton.WithRelativeHeight(bottomView, 0.1f), tableView.Below(dowloadHistoryButton), tableView.WithSameCenterX(bottomView), tableView.WithSameWidth(bottomView), tableView.WithRelativeHeight(bottomView, 1) ); scrollView.AddIfNotNull(bottomView); scrollView.AddConstraints( bottomView.AtTopOf(scrollView), bottomView.WithSameWidth(scrollView), bottomView.AtLeftOf(scrollView), bottomView.AtRightOf(scrollView), bottomView.AtBottomOf(scrollView), bottomView.WithRelativeHeight(scrollView, 0.9f) ); View.AddIfNotNull(topView, scrollView); View.AddConstraints( topView.AtTopOf(View), topView.WithSameWidth(View), topView.WithRelativeHeight(View, 0.2f), scrollView.Below(topView, 1), scrollView.AtLeftOf(View, 30), scrollView.AtRightOf(View, 30), scrollView.WithRelativeHeight(View, 0.8f) ); }