Пример #1
0
        public AccountPage(AccountCenter account)
        {
            Title   = "Account";
            Account = account;

            Account.LoggedIn  += Account_LoggedIn;
            Account.LoggedOut += Account_LoggedOut;

            Xamarin.Forms.PlatformConfiguration.iOSSpecific.Page.SetUseSafeArea(this, true);
            BackgroundColor = Color.Black;
            StackLayout.Children.Add(UsernameLabel);

#if DEBUG
            StackLayout.Children.Add(new Label()
            {
                Text = "Authorization Token", TextColor = Color.White
            });
            StackLayout.Children.Add(TokenLabel);

            StackLayout.Children.Add(new Label()
            {
                Text = "Notification Token", TextColor = Color.White
            });
            StackLayout.Children.Add(NotificationLabel);
            NotificationLabel.Text = Notification.FcmToken;
#endif

            ScrollView.Content = StackLayout;

            Content = ScrollView;
        }
Пример #2
0
        public DevicesPage(AccountCenter account)
        {
            NavigationPage.SetHasNavigationBar(this, true);
            NavigationPage.SetHasBackButton(this, false);
            InitializeComponent();

            ViewModel.Account = account;
            _ = ViewModel.GetDevicesAsync();

            ToolbarItems.Add(new ToolbarItem()
            {
                Text    = "Logout",
                Command = new Command(() => _ = LogoutAsync())
            });

            lv.ItemTapped += Lv_ItemTapped;
        }
 public void UpdateAccount(AccountCenter.Account account)
 {
     AccountDataProvider.UpdateAccount(account);
 }