private void btnLoad_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(OcrUrl.Text))
         {
             return;
         }
         var bmp = blockOcr.GetOcrImage(false);
         OrigImage.Image = bmp;
         ProcImage.Image = bmp.Clone() as Bitmap;
         imageFromFile   = false;
     }
     catch (Exception ex)
     {
         SB.Logger.LogError(Components.OcrTesting, ex.Message, true);
     }
 }
예제 #2
0
 private void btnLoad_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(OcrUrl.Text))
         {
             return;
         }
         var bmp = blockOcr.GetOcrImage(false);
         OrigImage.Image = bmp;
         ProcImage.Image = bmp.Clone() as Bitmap;
         imageFromFile   = false;
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message, "NOTICE",
                                              System.Windows.Forms.MessageBoxButtons.OK,
                                              System.Windows.Forms.MessageBoxIcon.Error);
     }
 }
 private void btnLoad_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(OcrUrl.Text))
         {
             return;
         }
         CProxy proxy = null;
         if (chbProxy.IsChecked.GetValueOrDefault() && chbProxy.IsEnabled)
         {
             proxy = blockOcr.CreateProxy(proxyTextbox.Text, proxyTypeCombobox.SelectedItem.ToString().ToEnum(ProxyType.Http));
         }
         var bmp = blockOcr.GetOcrImage(false, proxy);
         OrigImage.Image = bmp;
         ProcImage.Image = bmp.Clone() as Bitmap;
         imageFromFile   = false;
     }
     catch (Exception ex)
     {
         SB.Logger.LogError(Components.OcrTesting, ex.Message, true);
     }
 }