private void ShowNotFoundReceiptFields()

in Kiosk/Views/FormRecognizer/ReceiptView.xaml.cs [197:224]


        private void ShowNotFoundReceiptFields()
        {
            var notFoundFields = new List<string>()
            {
                string.IsNullOrEmpty(this.nameFieldControl.FieldValue) ?     "Merchant" : string.Empty,
                string.IsNullOrEmpty(this.addressFieldControl.FieldValue) ?  "Address" : string.Empty,
                string.IsNullOrEmpty(this.phoneFieldControl.FieldValue) ?    "Phone Number" : string.Empty,
                string.IsNullOrEmpty(this.dateFieldControl.FieldValue) ?     "Date" : string.Empty,
                string.IsNullOrEmpty(this.timeFieldControl.FieldValue) ?     "Time" : string.Empty,
                string.IsNullOrEmpty(this.totalFieldControl.FieldValue) ?    "Total" : string.Empty,
                string.IsNullOrEmpty(this.subtotalFieldControl.FieldValue) ? "Subtotal" : string.Empty,
                string.IsNullOrEmpty(this.taxFieldControl.FieldValue) ?      "Tax" : string.Empty,
                string.IsNullOrEmpty(this.tipFieldControl.FieldValue) ?      "Tip" : string.Empty,
                this.receiptItems.Items.Count == 0 ?                         "Receipt Items" : string.Empty
            };

            if (notFoundFields.Any(x => x.Length > 0))
            {
                this.notFoundFieldsTextBlock.Text = string.Join(", ", notFoundFields.Where(x => x.Length > 0).ToArray());
                this.notFoundPanel.Visibility = Visibility.Visible;
            }
            else
            {
                this.notFoundPanel.Visibility = Visibility.Collapsed;
            }

            this.fieldsPanel.Visibility = notFoundFields.All(x => x.Length > 0) ? Visibility.Collapsed : Visibility.Visible;
        }