Esempio n. 1
0
        void importer_BatchImported(object sender, BatchImportedEventArgs e)
        {
            TUsProcessed = e.Statistics.TotalRead;
            TUsImported  = e.Statistics.TotalImported;

            if (TUs > 0)
            {
                ProgressImport(TUsProcessed * 100 / TUs);
            }
        }
Esempio n. 2
0
        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";
        }
Esempio n. 3
0
 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
         });
     }
 }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
 /// <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;
 }