コード例 #1
0
 private void OnMessagePublished(NFCTag tag)
 {
     ImageWait.IsVisible = false;
     ImageOk.IsVisible   = true;
     //TagId_Label.Text = tag.TagId;
     //EventId_Label.Text = tag.MeetingCode;
     NFCController.StopAll();
     SendRequest(tag.TagId);
     //Application.Current.MainPage.DisplayAlert("Success", "Succesfully assigned tag " + tag.TagId + " to " + currentPosition.RoomName + "/" + currentPosition.PositionNumber, "Ok");
     currentPosition = null;
     GeneratePickerElements();
     NFCController.StartListening();
 }
コード例 #2
0
        private async void OnLogoutButtonClicked(object sender, EventArgs args)
        {
            Tuple <APIController.Response, string> logout_response = await APIController.Logout();

            if (logout_response.Item1 != APIController.Response.Success)
            {
                LabelErrorAlert.Text      = FeedbackMessages.RequestFail;
                LabelErrorAlert.IsVisible = true;
                Console.WriteLine("[REQUEST ERROR] " + logout_response.Item2);
                return;
            }

            Preferences.Set("UserName", string.Empty);
            Preferences.Set("UserSurname", string.Empty);
            Preferences.Set("UserEmail", string.Empty);
            SessionController.ClearUserData();

            PasswordInput.Text = "";

            await Shell.Current.GoToAsync(AppShell.Routes.StartPage);

            NFCController.StopAll();
        }
コード例 #3
0
 public void StopNFC()
 {
     NFCController.StopAll();
 }