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();
        }
 public void StopNFC()
 {
     NFCController.StopAll();
 }