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); }
void ApplyCurrentTheme() { NavBarBlendView.BackgroundColor = Theme.Current.MainColor; ThemeUtils.ApplyCurrentFont(Input); ThemeUtils.ApplyCurrentFont(NickName); SausageButtons.ApplyCurrentTheme(ContinueBtn); SausageButtons.UpdateBackgoundColor(ContinueBtn); SwitchSignUpType.SetTitleColor(Theme.Current.MainSaturatedColor, UIControlState.Normal); SwitchSignUpType.Font = Theme.Current.SausageSwitchIdentityButtonFont; SwitchSignUpType.Layer.BorderColor = Theme.Current.MainSaturatedColor.CGColor; BubbleImg.Image = Theme.Current.ApplyEffects(Theme.Current.SignUpIcon); }
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("Red", UIControlState.Normal); GirlButton.SetTitle("Blue", UIControlState.Normal); BoyButton.TouchUpInside += RedThemeSelected; GirlButton.TouchUpInside += BlueThemeSelected; ThemeSelectorContainerView.BackgroundColor = Theme.Current.BackgroundColor; SausageButtons.SetUp(BoyButton); SausageButtons.ApplyTheme(AppDelegate.RedTheme, BoyButton); SausageButtons.UpdateBackgoundColor(AppDelegate.RedTheme, BoyButton); SausageButtons.SetUp(GirlButton); SausageButtons.ApplyTheme(AppDelegate.BlueTheme, GirlButton); SausageButtons.UpdateBackgoundColor(AppDelegate.BlueTheme, GirlButton); #endregion UpdateText(); }
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.MainGradientStartColor.CGColor, Theme.Current.MainGradientEndColor.CGColor, SwitchSignUpType.Bounds.Size)); SwitchSignUpType.SetTitleColor(switchSignUpTypeColor, UIControlState.Normal); SwitchSignUpType.Layer.BorderColor = switchSignUpTypeColor.CGColor; BubbleImg.Image = Theme.Current.SignUpIcon.ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate); BubbleImg.TintColor = UIColor.FromPatternImage(ImageUtils.GetGradientImage( Theme.Current.MainGradientStartColor.CGColor, Theme.Current.MainGradientEndColor.CGColor, BubbleImg.Image.Size)); }
public override void ViewDidLoad() { base.ViewDidLoad(); viewModel = App.SignUpViewModel; resigner = new FirstResponderResigner(View, Input); 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 ThemeSelectorContainerView.BackgroundColor = Theme.Current.BackgroundColor; #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; } }); }