コード例 #1
0
ファイル: Window1.xaml.cs プロジェクト: shvivek/ocrsdk.com
        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;
        }
コード例 #2
0
        public NamecardRecognizer()
        {
            this._restClientAsync = new RestServiceClientAsync(this._restClient);
            this._restClientAsync.UploadFileCompleted     += UploadCompleted;
            this._restClientAsync.TaskProcessingCompleted += ProcessingCompleted;
            this._restClientAsync.DownloadFileCompleted   += DownloadCompleted;

            this._settings = GetBusCardProcessingSettings();
        }
コード例 #3
0
        public ProcessingPage()
        {
            InitializeComponent();

            RestServiceClient syncClient = new RestServiceClient();

            // !!!! Provide your credentials here !!!!
            syncClient.ApplicationId = "";
            syncClient.Password      = "";

            abbyyClient = new RestServiceClientAsync(syncClient);

            abbyyClient.UploadFileCompleted     += UploadCompleted;
            abbyyClient.TaskProcessingCompleted += ProcessingCompleted;
            abbyyClient.DownloadFileCompleted   += DownloadCompleted;
        }
コード例 #4
0
        public ProcessingPage()
        {
            InitializeComponent();

            RestServiceClient syncClient = new RestServiceClient();

            #error 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;
        }
コード例 #5
0
        public MainWindow()
        {
            InitializeComponent();

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

            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;
        }
コード例 #6
0
ファイル: Test.cs プロジェクト: KirillTemnov/ocrsdk.com
        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));
        }
コード例 #7
0
        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 = "";
            // 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;
        }