void OnViewModelPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { InvokeOnMainThread(() => { switch (e.PropertyName) { case SignUpViewModel.ValidatePinEnabledPropertyName: ContinueBtn.Enabled = ViewModel.ValidatePinEnabled; SausageButtons.UpdateBackgoundColor(ContinueBtn); break; case BaseViewModel.IsBusyPropertyName: if (ViewModel.IsBusy) { BTProgressHUD.Show(null, -1, ProgressHUD.MaskType.Black); } else { BTProgressHUD.Dismiss(); } break; case SignUpViewModel.CanProgressPropertyName: if (ViewModel.CanProgress) { GoToMainScreen(); } break; } }); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); ContinueBtn.Enabled = ViewModel.ValidatePinEnabled; SausageButtons.UpdateBackgoundColor(ContinueBtn); ViewModel.PropertyChanged += OnViewModelPropertyChanged; ApplyTheme(); Theme.ThemeChanged += OnThemeChanged; }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); SubscribeKeyboardEvents(); ContinueBtn.Enabled = viewModel.RegisterEnabled; SausageButtons.UpdateBackgoundColor(ContinueBtn); viewModel.PropertyChanged += OnViewModelPropertyChanged; ApplyCurrentTheme(); Theme.ThemeChanged += OnThemeChanged; }
void ApplyTheme() { View.BackgroundColor = Theme.Current.BackgroundColor; ThemeUtils.ApplyCurrentFont(Input); DescriptionTopLbl.Font = Theme.Current.MessageFont; DescriptionTopLbl.TextColor = Theme.Current.DescriptionDimmedColor; DescriptionBottomlbl.Font = Theme.Current.MessageFont; DescriptionBottomlbl.TextColor = Theme.Current.TitleTextColor; SausageButtons.ApplyCurrentTheme(ContinueBtn); SausageButtons.UpdateBackgoundColor(ContinueBtn); }
public override void ViewDidLoad() { base.ViewDidLoad(); #if DEBUG // debugGesture = new TapGestureAttacher (View, 3, ChangeThemeProps); debugGesture = new TapGestureAttacher(View, 3, Theme.SetNextTheme); #endif resigner = new FirstResponderResigner(View, Input); SausageButtons.SetUp(ContinueBtn); Input.EditingChanged += InputChangedHandler; ContinueBtn.TouchUpInside += OnContinueClicked; UpdateUserInterface(); }
public override void ViewDidLoad() { base.ViewDidLoad(); viewModel = App.SignUpViewModel; resigner = new FirstResponderResigner(View, Input); #if DEBUG // debugGesture = new TapGestureAttacher (View, 3, ChangeThemeProps); debugGesture = new TapGestureAttacher(View, 3, Theme.SetNextTheme); #endif ContinueBtn.TouchUpInside += ContinueHandler; SwitchSignUpType.TouchUpInside += SwitchSignUpTypeHandler; Input.EditingChanged += InputChangedHandler; NickName.EditingChanged += NickNameInputHandler; SausageButtons.SetUp(ContinueBtn); SausageButtons.SetUp(SwitchSignUpType); SwitchSignUpType.Layer.BorderWidth = 1.5f; #region Theme switcher BoyButton.SetTitle("Blue", UIControlState.Normal); GirlButton.SetTitle("Red", UIControlState.Normal); BoyButton.TouchUpInside += BlueThemeSelected; GirlButton.TouchUpInside += RedThemeSelected; ThemeSelectorContainerView.BackgroundColor = Theme.Current.BackgroundColor; SausageButtons.SetUp(BoyButton); SausageButtons.ApplyTheme(AppDelegate.BlueTheme, BoyButton); SausageButtons.UpdateBackgoundColor(AppDelegate.BlueTheme, BoyButton); SausageButtons.SetUp(GirlButton); SausageButtons.ApplyTheme(AppDelegate.RedTheme, GirlButton); SausageButtons.UpdateBackgoundColor(AppDelegate.RedTheme, GirlButton); #endregion UpdateText(); }
void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e) { InvokeOnMainThread(() => { switch (e.PropertyName) { case SignUpViewModel.RegisterEnabledPropertyName: ContinueBtn.Enabled = viewModel.RegisterEnabled; SausageButtons.UpdateBackgoundColor(ContinueBtn); break; case BaseViewModel.IsBusyPropertyName: if (viewModel.IsBusy) { BTProgressHUD.Show(null, -1, ProgressHUD.MaskType.Black); } else { BTProgressHUD.Dismiss(); } break; } }); }
void ApplyCurrentTheme() { NavBarBlendView.BackgroundColor = Theme.Current.BackgroundColor; ThemeUtils.ApplyCurrentFont(Input); ThemeUtils.ApplyCurrentFont(NickName); SausageButtons.ApplyCurrentTheme(ContinueBtn); SausageButtons.UpdateBackgoundColor(ContinueBtn); SwitchSignUpType.Font = Theme.Current.SausageSwitchIdentityButtonFont; UIColor switchSignUpTypeColor = UIColor.FromPatternImage(ImageUtils.GetGradientImage( Theme.Current.MainGradientEndColor.CGColor, Theme.Current.MainGradientStartColor.CGColor, SwitchSignUpType.Bounds.Size)); SwitchSignUpType.SetTitleColor(switchSignUpTypeColor, UIControlState.Normal); SwitchSignUpType.Layer.BorderColor = switchSignUpTypeColor.CGColor; GetStartedLabel.Font = Theme.Current.BadgeValueFont; CGSize getStartedLabelSize = GetStartedLabel.Text.StringSize(GetStartedLabel.Font); GetStartedLabel.TextColor = UIColor.FromPatternImage(ImageUtils.GetGradientImage( Theme.Current.MainGradientStartColor.CGColor, Theme.Current.MainGradientEndColor.CGColor, getStartedLabelSize)); }