Ejemplo n.º 1
0
        public Window1()
        {
            InitializeComponent();

            restClient = new RestServiceClient();
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;
            restClient.ServerUrl = Properties.Settings.Default.ServerAddress;

            if (String.IsNullOrEmpty(Properties.Settings.Default.ApplicationId) || String.IsNullOrEmpty(Properties.Settings.Default.Password) )
            {
                changeAppIdAndPwd();
            }


            restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
            restClient.Password = Properties.Settings.Default.Password;

            restClientAsync = new RestServiceClientAsync(restClient);

            restClientAsync.UploadFileCompleted += UploadCompleted;
            restClientAsync.TaskProcessingCompleted += ProcessingCompleted;
            restClientAsync.DownloadFileCompleted += DownloadCompleted;
            restClientAsync.ListTasksCompleted += TaskListObtained;

            fieldLevelImage.RegionSelected += fieldSelected;
        }
        public ProcessingPage()
        {
            InitializeComponent();

            RestServiceClient syncClient = new RestServiceClient();
            syncClient.ApplicationId = "DSGOffers";
            syncClient.Password = "******";

            abbyyClient = new RestServiceClientAsync(syncClient);

            abbyyClient.UploadFileCompleted += UploadCompleted;
            abbyyClient.TaskProcessingCompleted += ProcessingCompleted;
            abbyyClient.DownloadFileCompleted += DownloadCompleted;
        }
Ejemplo n.º 3
0
        public Test()
        {
            restClient = new RestServiceClient();
            restClient.ServerUrl = Properties.Settings.Default.ServerAddress;
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;

            if (!String.IsNullOrEmpty(Properties.Settings.Default.ApplicationId))
                restClient.ApplicationId = Properties.Settings.Default.ApplicationId;

            if (!String.IsNullOrEmpty(Properties.Settings.Default.Password))
                restClient.Password = Properties.Settings.Default.Password;

            restClientAsync = new RestServiceClientAsync(restClient);

            Console.WriteLine(String.Format("Application id: {0}\n", restClient.ApplicationId));
        }
Ejemplo n.º 4
0
        public ProcessingPage()
        {
            InitializeComponent();

            RestServiceClient syncClient = new RestServiceClient();
			!!! Please provide application id and password and remove this line !!!
			// Name of application you created
            syncClient.ApplicationId = "";
			// Password should be sent to your e-mail after application was created
            syncClient.Password = "";

            abbyyClient = new RestServiceClientAsync(syncClient);

            abbyyClient.UploadFileCompleted += UploadCompleted;
            abbyyClient.TaskProcessingCompleted += ProcessingCompleted;
            abbyyClient.DownloadFileCompleted += DownloadCompleted;
        }
        public ProcessingPage()
        {
            InitializeComponent();

            RestServiceClient syncClient = new RestServiceClient();
               // #error Please provide application id and password and remove this line !!!
            // To create an application and obtain a password,
            // register at http://cloud.ocrsdk.com/Account/Register
            // More info on getting your application id and password at
            // http://ocrsdk.com/documentation/faq/#faq3

            // Name of application you created
            syncClient.ApplicationId = "ReceiptsReader";
            // Password should be sent to your e-mail after application was created
            syncClient.Password = "******";

            abbyyClient = new RestServiceClientAsync(syncClient);

            abbyyClient.UploadFileCompleted += UploadCompleted;
            abbyyClient.TaskProcessingCompleted += ProcessingCompleted;
            abbyyClient.DownloadFileCompleted += DownloadCompleted;
        }