예제 #1
0
 public State RunSelfTest()
 {
     if (reading.Equals(new Reading()))
     {
         return(State.Bad);
     }
     else
     {
         return(State.Good);
     }
 }
        private async Task ExecuteConfirmReadingCommand()
        {
            if (IsBusy)
            {
                return;
            }
            IsBusy = true;
            var res = App.Current.Resources;

            if (Reading == null || Reading.Equals(""))
            {
                await App.Current.MainPage.DisplayAlert((string)res["Errors.Title.Fail"], (string)res["Errors.Message.InputEmpty"], (string)res["Errors.Cancel.Okay"]);
            }
            else if (Reading.Contains("?"))
            {
                await App.Current.MainPage.DisplayAlert((string)res["Errors.Title.Fail"], (string)res["Errors.Message.OCR"], (string)res["Errors.Cancel.Okay"]);
            }
            else
            {
                await Navigation.PushAsync(new ReadingConfirmationPage(Reading));
            }
            IsBusy = false;
        }
예제 #3
0
 public State RunSelfTest() => reading.Equals(new Reading()) ? State.Bad : State.Good;