Ejemplo n.º 1
0
 public void AsyncTranslation_callback(IAsyncTranslation result)
 {
     if (PhraseRects.All(x => x.atrans.isDone == true))
     {
         SaveForStreaming();
     }
     pbxDisplay.Invalidate();
 }
Ejemplo n.º 2
0
 public void UpdateText(IAsyncOCR OCRResult, TranslationCallback callback = null)
 {
     // Only reevaluate if the underlying text actually changed
     if (atrans == null || this.GetText(OCRResult) != this.atrans.rawText)
     {
         string NewText = GetText(OCRResult);
         BabelForm.Invoke(BabelForm.SafeIncrementOdometer, new object[] { 0, NewText.Length }); // Update odometer
         atrans = AsyncStatic.MakeTranslation(NewText, callback);
     }
 }
Ejemplo n.º 3
0
 private void Translation_callback(IAsyncTranslation tr)
 {
     Invalidate();
 }