コード例 #1
0
        protected override void Run(string inputPathes)
        {
            if (this.IsCancel)
            {
                return;
            }

            var Solver = new ObsFileSmoothRangeFormater();

            CurrentRunningSolvers.Add(Solver);
            Solver.Option = CheckOrBuildGnssOption();

            Solver.Init(inputPathes);
            Solver.InfoProduced        += IntegralGnssFileSolver_InfoProduced;
            Solver.EpochEntityProduced += IntegralGnssFileSolver_MultiSiteEpochInfoProduced;
            Solver.Completed           += OneSolver_Completed;

            if (_resultCount == 0)
            {
                this.ProgressBar.InitFirstProcessCount(Solver.DataSource.ObsInfo.Count);
            }

            Solver.Run();

            this.ProgressBar.PerformClassifyStep(Solver.DataSource.ObsInfo.Count);
        }
コード例 #2
0
        protected void ParallelRunning(string[] inputPathes)
        {
            this.ProgressBar.InitProcess(inputPathes.Length);
            this.ProgressBar.ShowInfo("正在计算!");
            //  this.Invoke(new Action(delegate() { this.ProgressBar.Update();  }));

            this.Option = CheckOrBuildGnssOption();
            Parallel.ForEach(inputPathes, this.ParallelConfig.ParallelOptions, (obsData, state) =>
            {
                if (IsCancel || this.backgroundWorker1.CancellationPending)
                {
                    state.Stop();
                }

                var Solver           = new ObsFileSmoothRangeFormater();
                Solver.InfoProduced += IntegralGnssFileSolver_InfoProduced;
                Solver.IsCancel      = this.IsCancel;
                CurrentRunningSolvers.Add(Solver);
                Solver.Option = this.Option;
                Solver.Init(obsData);
                Solver.Completed += OneSolver_Completed;
                Solver.Run();
            });
        }