Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     outputFile = null;
     sty = null;
     dataLayer = null;
     runner = null;
 }
Exemplo n.º 2
0
 private void btnExtract_Click(object sender, RoutedEventArgs e)
 {
     if (runner != null) return;
     prgProgress.Value = 0;
     sty = new ExtractorLib.ExtractorLib(String.Join(",", lstTables.SelectedItems.OfType<string>().ToArray<string>()),
                         outputFile, dataLayer, 5);
     sty.MadeProgress += (o, v) => {
         this.Dispatcher.Invoke(new UpdateProgressCallback(this.updateProgress), new object[] {5});
     };
     sty.ExtractionFinished += (o, v) => {
         this.Dispatcher.Invoke(new CompleteProgressCallback(this.completeProgress));
         System.Windows.Forms.MessageBox.Show("Extraction Complete!");
         runner = null;
     };
     runner = new Thread(sty.Convert);
     runner.Start();
 }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     Options options = new Options();
     if (!CommandLineParser.Default.ParseArguments(args, options))
     {
         return;
     }
     StreamWriter w = new StreamWriter(options.outputFile);
     DataLayer d;
     try
     {
         d = new DataLayer(options.connectionString);
     }
     catch (Exception e)
     {
         Console.Error.WriteLine(e.Message);
         return;
     }
     ExtractorLib.ExtractorLib sty = new ExtractorLib.ExtractorLib(options.tables, w, d, options.notificationPercent);
     sty.MadeProgress += new MadeProgressEventHandler(sty_MadeProgress);
     sty.ExtractionFinished += new ExtractionFinishedEventHandler(sty_ExtractionFinished);
     sty.Convert();
 }
Exemplo n.º 4
0
 static void sty_MadeProgress(object sender, ExtractorLib.ExtractorLib.ProgressEventArgs e)
 {
     Console.Write(".");
 }