Ejemplo n.º 1
1
        async void Handle_Clicked(object sender, System.EventArgs e)
        {
            var x = new CloudData();

            GraphUser y = await x.GetDisplayName();


            Task <string> access_id = x.GetAccessID();

            System.Diagnostics.Debug.WriteLine("Debug: get access ID " + access_id.Result);

            //await DisplayAlert("Alert", "Welcome, " + y, "OK");

            var displayName = new Item
            {
                Name    = "Logged in as: " + y.displayName,
                Company = "Company: " + y.Company,
                Stand   = "Stand number: " + y.StandID
            };

            App.Current.Properties["LoginName"]   = "Logged in as: " + y.displayName;
            App.Current.Properties["StandName"]   = "Stand ID: " + y.StandID;
            App.Current.Properties["CompanyName"] = "Company: " + y.Company;



            await App.Current.SavePropertiesAsync();

            var Scanner = new Scanner.Scanner();

            Scanner.BindingContext = displayName;


            Application.Current.MainPage = Scanner;
        }
Ejemplo n.º 2
0
        async protected override void OnAppearing()
        {
            base.OnAppearing();

            var ReloadProfile = new CloudData();

            await ReloadProfile.GetDisplayName();

            TextName.Text    = "Logged in as: " + App.Current.Properties["displayName"].ToString();
            TextStand.Text   = "Stand ID: " + App.Current.Properties["StandID"].ToString();
            TextCompany.Text = "Company: " + App.Current.Properties["Company"].ToString();

            System.Diagnostics.Debug.WriteLine("Debug: Scanner page is loaded again");
        }