Esempio n. 1
0
        public void initMeasure(int progressMaximum, bool isPrecise)
        {
            labels.Clear();
            list = new List <PointPairListPlusWithMaxCapacity>();
            var g = Graph.MeasureGraph.Instance;

            pspec = g.PreciseData.GetUsed();
            foreach (var ped in pspec)
            {
                var temp = new PointPairListPlusWithMaxCapacity();
                temp.PEDreference = ped;
                list.Add(temp);
            }

            iteration = 0;

            var panel = (MeasureGraphPanel)Panel;

            panel.MeasureCancelRequested += MonitorForm_MeasureCancelRequested;

            g.GraphDataModified  += NewIterationAsync;
            g.NewGraphData       += InvokeRefreshGraph;
            panel.ProgressMaximum = progressMaximum;
            panel.Init(g);

            if (progressMaximum > 0)
            {
                // only iterations limit
                UseTimeScale = false;
            }
            else if (progressMaximum < 0)
            {
                // time limit or combined
                UseTimeScale = true;
            }
            else
            {
                // no limit
                UseTimeScale = false;
            }
            ZedGraphRebirth(FORM_TITLE, progressMaximum);

            Show();
            Activate();

            start = DateTime.Now;
        }
Esempio n. 2
0
        public void initMeasure(int progressMaximum, bool isPrecise)
        {
            labels.Clear();
            list = new List<PointPairListPlusWithMaxCapacity>();
            var g = Graph.MeasureGraph.Instance;
            pspec = g.PreciseData.GetUsed();
            foreach (var ped in pspec) {
                var temp = new PointPairListPlusWithMaxCapacity();
                temp.PEDreference = ped;
                list.Add(temp);
            }

            iteration = 0;

            var panel = (MeasureGraphPanel)Panel;
            panel.MeasureCancelRequested += MonitorForm_MeasureCancelRequested;

            g.GraphDataModified += NewIterationAsync;
            g.NewGraphData += InvokeRefreshGraph;
            panel.ProgressMaximum = progressMaximum;
            panel.Init(g);

            if (progressMaximum > 0) {
                // only iterations limit
                UseTimeScale = false;
            } else if (progressMaximum < 0) {
                // time limit or combined
                UseTimeScale = true;
            } else {
                // no limit
                UseTimeScale = false;
            }
            ZedGraphRebirth(FORM_TITLE, progressMaximum);

            Show();
            Activate();

            start = DateTime.Now;
        }