/// <summary> /// 数据准备(下载、解压) /// </summary> private void PrepareData() { //Go DataPrepare pre = new DataPrepare( task.Urls.ToArray(), Path.Combine(this.BerDataDir, task.Campaign, "ORX")); pre.InfoProduced += pre_InfoProduced; pre.Run(); this.ShowInfo("数据准备完毕!"); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { watch.Stop(); watch.Start(); string[] inputs = this.textBox_urlfilePath.Lines; string[] outputs = this.directorySelectionControl1.Pathes; if (inputs.Length != outputs.Length) { MessageBox.Show("输入输出路径数量必须一致!"); return; } for (int i = 0; i < inputs.Length; i++) { var path = inputs[i]; var outpath = outputs[i]; string[] files; if (radioButton_local.Checked) { string pattern = "*.*"; if (this.checkBox1.Checked) { pattern = "*.*Z"; } files = Directory.GetFiles(path, pattern); } else { files = File.ReadAllLines(path); } prepare = new DataPrepare( files, outpath, Application.StartupPath, this.radioButton_remote.Checked, this.checkBox1.Checked, this.checkBox_teqcFormat.Checked, this.checkBox_formatOfile.Checked, this.radioButton_up.Checked || this.radioButton_low.Checked, this.radioButton_up.Checked, this.checkBox_delOriFile.Checked, this.checkBox_delMidFile.Checked, this.checkBox_ignoreError.Checked, this.progressBarComponent1); prepare.InfoProduced += new InfoProducedEventHandler(prepare_InfoProduced); prepare.Run(); } watch.Stop(); string msg = "\r\n是否打开目录?"; Geo.Utils.FormUtil.ShowIfOpenDirMessageBox(this.directorySelectionControl1.Path, msg); }
/// <summary> /// 数据准备(下载、解压) /// </summary> private void PrepareData() { string startUpPath = Application.StartupPath;//可执行程序目录 //Go DataPrepare pre = new DataPrepare( task.Urls.ToArray(), Path.Combine(this.DataDir, task.Campaign, "Orx"), startUpPath, true, false, false, false); pre.InfoProduced += pre_InfoProduced; pre.strRun(); this.ShowInfo("数据准备完毕!"); }
private void button_run_Click(object sender, EventArgs e) { ShowInfo("开始工作...."); watch.Stop(); watch.Start(); this.button_run.Enabled = false; //数据准备变量 gnssUrlFilePath = this.textBox_gnssUrlFilePath.Text; resultLocalDir = this.textBox_resultDir.Text; if (!Directory.Exists(resultLocalDir)) { Directory.CreateDirectory(resultLocalDir); } resultFtp = textBox_ftpResult.Text; //计算变量 string campaign = this.textBox_campaign.Text; Time gpsTime = new Time(this.dateTimePicker_date.Value); this.pcfName = GetPcfName(); //Go DataPrepare pre = new DataPrepare( File.ReadAllLines(gnssUrlFilePath), Path.Combine(this.BerDataDir, campaign, "ORX")); pre.InfoProduced += pre_InfoProduced; pre.Run(); this.ShowInfo("数据准备完毕!"); this.ShowInfo("开始计算!"); bpe.Init(campaign, gpsTime, checkBox_skip.Checked); if (this.checkBox_asyn.Checked) { bpe.RunAsyn(pcfName); } else { bpe.Run(pcfName); } }