/// <summary> /// 时段计算 /// </summary> /// <param name="files"></param> /// <param name="Option"></param> /// <param name="netPeriod"></param> private void RunPpp(List <ObsSiteInfo> files, GnssProcessOption Option, TimePeriod netPeriod) { if (files.Count == 0) { log.Warn("没有文件!"); return; } //设置独立的输出目录 var OriginalDirectory = Option.OutputDirectory; Option.OutputDirectory = Option.GetSolverDirectory(netPeriod); Geo.Utils.FileUtil.CheckOrCreateDirectory(Option.OutputDirectory); this.ObsSiteInfos = new ObsSiteInfos(files); var pppRunner = new PointPositionBackGroundRunner(Option, ObsSiteInfos.GetFilePathes().ToArray()); pppRunner.ParallelConfig = ParallelConfig; pppRunner.ProgressViewer = ProgressViewer; pppRunner.Processed += PppRunner_Processed; pppRunner.Completed += PppRunner_Completed; pppRunner.Init(); pppRunner.Run(); //恢复目录 Option.OutputDirectory = OriginalDirectory; }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { startTime = DateTime.Now; //Run(); var optPath = this.fileOpenControl1.FilePath; if (String.IsNullOrWhiteSpace(optPath) || !System.IO.File.Exists(optPath)) { Geo.Utils.FormUtil.ShowWarningMessageBox("文件路径不存在 !" + optPath); return; } Runner = new PointPositionBackGroundRunner(optPath); Runner.ProgressViewer = progressBarComponent1; Runner.Init(); Runner.Run(); }
/// <summary> /// 时段计算 /// </summary> /// <param name="files"></param> /// <param name="Option"></param> /// <param name="netPeriod"></param> private void RunPpp(List <ObsSiteInfo> files) { if (files.Count == 0) { log.Warn("没有文件!"); return; } //设置独立的输出目录 this.ObsSiteInfos = new ObsSiteInfos(files); var pppRunner = new PointPositionBackGroundRunner(Option, ObsSiteInfos.GetFilePathes().ToArray()); pppRunner.ParallelConfig = ParallelConfig; pppRunner.ProgressViewer = ProgressViewer; pppRunner.Processed += PppRunner_Processed; pppRunner.Completed += PppRunner_Completed; pppRunner.Init(); pppRunner.Run(); }
protected override void Run(string[] inputPathes) { if (inputPathes.Length == 0) { Geo.Utils.FormUtil.ShowWarningMessageBox("巧妇难为无米之炊,请找点观测数据再来算 (* ̄︶ ̄)"); return; } this.Coords.Clear(); isFirstSolver = true; Option = CheckOrBuildGnssOption(); Runner = null; Runner = new PointPositionBackGroundRunner(this.Option, inputPathes); Runner.ParallelConfig = ParallelConfig; Runner.ProgressViewer = this.ProgressBar; Runner.Processed += OneSolver_Processed; Runner.SolverCreated += Runner_SolverCreated; Runner.Init(); Runner.Run(); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { Geo.Utils.FormUtil.ShowWaittingForm("正在处理,请耐心等待!"); var filePathes = SelectFilePageControl.FilePathes; PointPositionBackGroundRunner runner = new PointPositionBackGroundRunner(this.Option, filePathes); runner.ProgressViewer = ProgressBarWizardPage.ProgressBarComponent; runner.Init(); runner.Run(); this.Invoke(new Action(delegate() { this.Enabled = true; if (Geo.Utils.FormUtil.ShowYesNoMessageBox("计算完毕,是否关闭窗口?") == System.Windows.Forms.DialogResult.Yes) { this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } })); }