void OnPickerSelectedIndexChanged(object sender, EventArgs e)
        {
            var picker        = (Picker)sender;
            int selectedIndex = picker.SelectedIndex;

            if (selectedIndex != -1)
            {
                AppConstants.SetOcrLocation(picker.Items[selectedIndex]);
            }
        }
Exemplo n.º 2
0
        public App()
        {
            InitializeComponent();

            //Applicable OCR server locations(at time of writing) are: westus, eastus2, westcentralus, westeurope, southeastasia
            AppConstants.SetOcrLocation("westus");

            //
            // Add your API keys of Cognitive Services.
            //
            //AppConstants.ComputerVisionApiKey = "{Your API Key here}";
            //AppConstants.BingWebSearchApiKey = "{Your API Key here}";

            //AppConstants.CustomVisionApiKey = "{Your Custom Vision API Key here}";
            //AppConstants.CustomVisionApiUrl = "{Your Csutom Vision Prediction URL for image file here}";
            // ex. https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/xxxxxx/image?iterationId=yyyyyy

            MainPage = new NavigationPage(new OcrSelectPage());
        }