public override void ViewDidLoad() { base.ViewDidLoad(); var dotComButton = new AccountButton("GitHub.com", Images.Logos.DotComMascot); var enterpriseButton = new AccountButton("Enterprise", Images.Logos.EnterpriseMascot); dotComButton.BackgroundColor = DotComBackgroundColor; dotComButton.Label.TextColor = EnterpriseBackgroundColor; dotComButton.ImageView.TintColor = EnterpriseBackgroundColor; enterpriseButton.BackgroundColor = EnterpriseBackgroundColor; enterpriseButton.Label.TextColor = dotComButton.BackgroundColor; enterpriseButton.ImageView.TintColor = dotComButton.BackgroundColor; Add(dotComButton); Add(enterpriseButton); View.ConstrainLayout(() => dotComButton.Frame.Top == View.Frame.Top && dotComButton.Frame.Left == View.Frame.Left && dotComButton.Frame.Right == View.Frame.Right && dotComButton.Frame.Bottom == View.Frame.GetMidY() && enterpriseButton.Frame.Top == dotComButton.Frame.Bottom && enterpriseButton.Frame.Left == View.Frame.Left && enterpriseButton.Frame.Right == View.Frame.Right && enterpriseButton.Frame.Bottom == View.Frame.Bottom); OnActivation(d => { d(dotComButton.GetClickedObservable().Subscribe(_ => DotComButtonTouch())); d(enterpriseButton.GetClickedObservable().Subscribe(_ => EnterpriseButtonTouch())); }); }
private void OnLoaded() { if (IsLoaded) { AccountButton.SetIconAndText(language.Accounts, ButtonIcon.Accounts); } }
public override void ViewDidLoad() { base.ViewDidLoad(); var dotComButton = new AccountButton("GitHub.com", Images.Logos.GitHub); var enterpriseButton = new AccountButton("Enterprise", Images.Logos.Enterprise); dotComButton.BackgroundColor = DotComBackgroundColor; dotComButton.Label.TextColor = EnterpriseBackgroundColor; dotComButton.ImageView.TintColor = EnterpriseBackgroundColor; enterpriseButton.BackgroundColor = EnterpriseBackgroundColor; enterpriseButton.Label.TextColor = dotComButton.BackgroundColor; enterpriseButton.ImageView.TintColor = dotComButton.BackgroundColor; Add(dotComButton); Add(enterpriseButton); View.ConstrainLayout(() => dotComButton.Frame.Top == View.Frame.Top && dotComButton.Frame.Left == View.Frame.Left && dotComButton.Frame.Right == View.Frame.Right && dotComButton.Frame.Bottom == View.Frame.GetMidY() && enterpriseButton.Frame.Top == dotComButton.Frame.Bottom && enterpriseButton.Frame.Left == View.Frame.Left && enterpriseButton.Frame.Right == View.Frame.Right && enterpriseButton.Frame.Bottom == View.Frame.Bottom); this.WhenActivated(d => { d(enterpriseButton.GetClickedObservable().InvokeCommand(ViewModel.GoToEnterpriseLoginCommand)); d(dotComButton.GetClickedObservable().InvokeCommand(ViewModel.GoToDotComLoginCommand)); }); }
public void ShowAcountPanel(bool e) { if (e) { AcountPanel.SetActive(true); AccountButton.SetActive(false); InfoButton.SetActive(false); SettingsButton.SetActive(false); LeaderButton.SetActive(false); PlayScreen.SetActive(false); ShopButton.SetActive(false); BtnAvatar.SetActive(false); Camera.GetComponent <CameraController>().enabled = false; } else { AcountPanel.SetActive(false); AccountButton.SetActive(true); InfoButton.SetActive(true); SettingsButton.SetActive(true); LeaderButton.SetActive(true); ShopButton.SetActive(true); BtnAvatar.SetActive(true); PlayScreen.SetActive(true); Camera.GetComponent <CameraController>().enabled = true; } }
public AccountButtonViewModel(AccountButton model, AccountScreen screen, ICommand actionCommand) { _isEnabled = true; _actionCommand = actionCommand; _screen = screen; Model = model; }
public void Logout() { AccountButton.Click(); SignOutButton.Click(); if (_driver.IsAlertPresent()) { _driver.SwitchTo().Alert().Accept(); } }
void DeleteAccount(string name, AccountButton button) { if (AccountManager.instance.GetAccounts().Length > 1) { AccountManager.instance.DeleteAccount(name); buttons.Remove(button); Destroy(button.gameObject); on_account_deleted?.Invoke(name); } }
public virtual void Awake() { if (_transitionPanel == null) { _transitionPanel = FindObjectOfType <TransitionPanel>(); } if (_accountButton == null) { _accountButton = FindObjectOfType <AccountButton>(); } }
private void OnEnable() { buttons = new List <AccountButton>(); foreach (string account in AccountManager.instance.GetAccounts()) { string current_account_name = account; AccountButton new_button = Instantiate(button_prefab, content); new_button.GetComponentInChildren <Text>().text = current_account_name; new_button.AddSelectListener(() => PickAccount(current_account_name)); new_button.AddDeleteListener(() => DeleteAccount(current_account_name, new_button)); buttons.Add(new_button); } }
public override void ViewDidLoad() { base.ViewDidLoad(); var dotComButton = new AccountButton("Bitbucket", Images.BitbucketLogo); dotComButton.BackgroundColor = DotComBackgroundColor; dotComButton.Label.TextColor = EnterpriseBackgroundColor; dotComButton.ImageView.TintColor = EnterpriseBackgroundColor; var enterpriseButton = new AccountButton("Stash", Images.StashLogo.ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)); enterpriseButton.BackgroundColor = EnterpriseBackgroundColor; enterpriseButton.Label.TextColor = dotComButton.BackgroundColor; enterpriseButton.ImageView.TintColor = dotComButton.BackgroundColor; Add(dotComButton); Add(enterpriseButton); View.ConstrainLayout(() => dotComButton.Frame.Top == View.Frame.Top && dotComButton.Frame.Left == View.Frame.Left && dotComButton.Frame.Right == View.Frame.Right && dotComButton.Frame.Bottom == View.Frame.GetMidY() && enterpriseButton.Frame.Top == dotComButton.Frame.Bottom && enterpriseButton.Frame.Left == View.Frame.Left && enterpriseButton.Frame.Right == View.Frame.Right && enterpriseButton.Frame.Bottom == View.Frame.Bottom); OnActivation(disposable => { dotComButton .GetClickedObservable() .Subscribe(_ => DotComButtonTouch()) .AddTo(disposable); enterpriseButton .GetClickedObservable() .Subscribe(_ => EnterpriseButtonTouch()) .AddTo(disposable); }); }
public MainPage ClickOnAccountField() { AccountButton.Click(); return(new MainPage(driver)); }
//Account Info public void UserProfile() { AccountButton.Click(); UserProfileButton.Click(); }
// Log out public void Logout() { AccountButton.Click(); LogoutButton.Click(); }
public AccountButtonViewModel(AccountButton model, AccountScreen screen) : this(model, screen, null) { }