void importer_BatchImported(object sender, BatchImportedEventArgs e) { TUsProcessed = e.Statistics.TotalRead; TUsImported = e.Statistics.TotalImported; if (TUs > 0) { ProgressImport(TUsProcessed * 100 / TUs); } }
private void TmImporter_BatchImported(object sender, BatchImportedEventArgs e) { string info; var stats = e.Statistics; info = "Total read: " + stats.TotalRead + "\n"; info += "Total imported: " + stats.TotalImported + "\n"; info += "TUs added: " + stats.AddedTranslationUnits + "\n"; info += "TUs discarded: " + stats.DiscardedTranslationUnits + "\n"; info += "TUs merged: " + stats.MergedTranslationUnits + "\n"; info += "Errors: " + stats.Errors + "\n"; }
private void importer_BatchImported(object sender, BatchImportedEventArgs e) { if (OnProgressChanged != null) { OnProgressChanged(this, new ProgressEventArgs { Type = ProgressEventArgs.ProcessorType.TmImporter, Description = string.Empty, CurrentProgress = e.Statistics.TotalImported, TotalUnits = TotalUnits }); } }
private void Importer_BatchImported(object sender, BatchImportedEventArgs e) { string info; ImportStatistics stats = e.Statistics; info = "Total read: " + stats.TotalRead + "\n"; info += "Total imported: " + stats.TotalImported + "\n"; info += "TUs added: " + stats.AddedTranslationUnits + "\n"; info += "TUs discarded: " + stats.DiscardedTranslationUnits + "\n"; info += "TUs merged: " + stats.MergedTranslationUnits + "\n"; info += "Errors: " + stats.Errors + "\n"; MessageBox.Show(info, "Import statistics of current chunk"); e.Cancel = false; }
/// <summary> /// Import event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void importer_BatchImported(object sender, BatchImportedEventArgs e) { WriteResult(e.Statistics.AddedTranslationUnits + " TU(s) were imported.\r\n"); e.Cancel = false; }