예제 #1
0
        private void Model_evtTempingsStarted()
        {
            graphTemps.Clear();
            //graphTemps2.Clear();
            graphTempsCount = 0;

            //plotter.Children.RemoveAll(typeof(LineGraph));

            graphTemps = new TemperaturePointCollection();
            graphTempsCount = 0;

            var ds = new EnumerableDataSource<TemperaturePoint>(graphTemps);
            ds.SetXMapping(x => (double)x.Count);
            ds.SetYMapping(y => y.Pressure);

           // plotter.AddLineGraph(ds, Colors.Green, 1, "T1");
           // plotter.LegendVisible = false;
        }
예제 #2
0
        public AnalysePage(MainWindow parentWnd)
        {
            _parentWnd = parentWnd;
            InitializeComponent();

            // Initialize the temperature graph.

            graphTemps = new TemperaturePointCollection();
            graphTempsCount = 0;

            var ds = new EnumerableDataSource<TemperaturePoint>(graphTemps);
            ds.SetXMapping(x => (double)x.Count);
            ds.SetYMapping(y => y.Pressure);

            //plotter.AddLineGraph(ds, Colors.Green, 1, "T1");
            //plotter.LegendVisible = false;
            /*
            graphTemps2 = new TemperaturePointCollection();
            graphTempsCount = 0;

            var ds2 = new EnumerableDataSource<TemperaturePoint>(graphTemps2);
            ds2.SetXMapping(x => (double)x.Count);
            ds2.SetYMapping(y => y.Pressure);

            plotter.AddLineGraph(ds2, Colors.Red, 1, "T2");
            // plotter.LegendVisible = false;*/

            // Initialize the PCR graph.

            graphPCR = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR = new EnumerableDataSource<PCRPoint>(graphPCR);
            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR, Colors.Green, 1, " ");
            pcrplotter.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR2 = new EnumerableDataSource<PCRPoint>(graphPCR2);
            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR2, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR3 = new EnumerableDataSource<PCRPoint>(graphPCR3);
            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR3, Colors.Blue, 1, " ");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR4 = new EnumerableDataSource<PCRPoint>(graphPCR4);
            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR4, Colors.Brown, 1, " ");


            graphPCR5 = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR5 = new EnumerableDataSource<PCRPoint>(graphPCR5);
            dsPCR5.SetXMapping(x => (double)x.Cycle);
            dsPCR5.SetYMapping(y => y.Reading);

            pcrplotter3.AddLineGraph(dsPCR5, Colors.Green, 1, " ");
            pcrplotter3.LegendVisible = false;

            graphPCR6 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR6 = new EnumerableDataSource<PCRPoint>(graphPCR6);
            dsPCR6.SetXMapping(x => (double)x.Cycle);
            dsPCR6.SetYMapping(y => y.Reading);

            pcrplotter3.AddLineGraph(dsPCR6, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR7 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR7 = new EnumerableDataSource<PCRPoint>(graphPCR7);
            dsPCR7.SetXMapping(x => (double)x.Cycle);
            dsPCR7.SetYMapping(y => y.Reading);

            pcrplotter3.AddLineGraph(dsPCR7, Colors.Blue, 1, " ");

            graphPCR8 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR8 = new EnumerableDataSource<PCRPoint>(graphPCR8);
            dsPCR8.SetXMapping(x => (double)x.Cycle);
            dsPCR8.SetYMapping(y => y.Reading);

            pcrplotter3.AddLineGraph(dsPCR8, Colors.Brown, 1, " ");

            graphPCR = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR9 = new EnumerableDataSource<PCRPoint>(graphPCR);
            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter1.AddLineGraph(dsPCR, Colors.Green, 1, " ");
            pcrplotter1.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR10 = new EnumerableDataSource<PCRPoint>(graphPCR2);
            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter1.AddLineGraph(dsPCR2, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR11 = new EnumerableDataSource<PCRPoint>(graphPCR3);
            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter1.AddLineGraph(dsPCR3, Colors.Blue, 1, " ");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR12 = new EnumerableDataSource<PCRPoint>(graphPCR4);
            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter1.AddLineGraph(dsPCR4, Colors.Brown, 1, " ");


            graphPCR = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR13 = new EnumerableDataSource<PCRPoint>(graphPCR);
            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter0.AddLineGraph(dsPCR, Colors.Green, 1, " ");
            pcrplotter0.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR14 = new EnumerableDataSource<PCRPoint>(graphPCR2);
            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter0.AddLineGraph(dsPCR2, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR15 = new EnumerableDataSource<PCRPoint>(graphPCR3);
            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter0.AddLineGraph(dsPCR3, Colors.Blue, 1, " ");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR16 = new EnumerableDataSource<PCRPoint>(graphPCR4);
            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter0.AddLineGraph(dsPCR4, Colors.Brown, 1, " ");


            graphPCR = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR17 = new EnumerableDataSource<PCRPoint>(graphPCR);
            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter4.AddLineGraph(dsPCR, Colors.Green, 1, " ");
            pcrplotter4.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR18 = new EnumerableDataSource<PCRPoint>(graphPCR2);
            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter4.AddLineGraph(dsPCR2, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR19 = new EnumerableDataSource<PCRPoint>(graphPCR3);
            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter4.AddLineGraph(dsPCR3, Colors.Blue, 1, " ");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR20 = new EnumerableDataSource<PCRPoint>(graphPCR4);
            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter4.AddLineGraph(dsPCR4, Colors.Brown, 1, " ");

            graphPCR = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR21 = new EnumerableDataSource<PCRPoint>(graphPCR);
            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter5.AddLineGraph(dsPCR, Colors.Green, 1, " ");
            pcrplotter5.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR22 = new EnumerableDataSource<PCRPoint>(graphPCR2);
            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter5.AddLineGraph(dsPCR2, Colors.Red, 1, " ");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR23 = new EnumerableDataSource<PCRPoint>(graphPCR3);
            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter5.AddLineGraph(dsPCR3, Colors.Blue, 1, " ");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR24 = new EnumerableDataSource<PCRPoint>(graphPCR4);
            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter5.AddLineGraph(dsPCR4, Colors.Brown, 1, " ");

            
            //plotter.HorizontalAxisNavigation.Remove();
            //plotter.VerticalAxisNavigation.Remove();
            //plotter.Children.Remove(plotter.MouseNavigation);
            //pcrplotter.Children.Remove(pcrplotter.MouseNavigation); 

            theModel = ((HelixGen.App)(App.Current)).Model;
            
            Button_Click1(null, null);
        }
예제 #3
0
        //m_data_x = new List<double>();
        //protected List<double> m_data_r2;
        //m_data_x = new List<double>();
        //protected List<double> m_data_r3;
        //m_data_x = new List<double>();
        //protected List<double> m_data_r4;
        //m_data_x = new List<double>();

        public MainPage(MainWindow parentWnd)
        {
            _parentWnd  = parentWnd;
            _vmMain     = new vmMain();
            DataContext = _vmMain;
            InitializeComponent();

            HelixGenModel model = ((HelixGen.App)App.Current).Model;

            // Initialize the temperature graph.

            graphTemps      = new TemperaturePointCollection();
            graphTempsCount = 0;

            var ds = new EnumerableDataSource <TemperaturePoint>(graphTemps);

            ds.SetXMapping(x => (double)x.Count);
            ds.SetYMapping(y => y.Pressure);

            plotter.AddLineGraph(ds, Colors.Green, 1, "T1");
            plotter.LegendVisible = false;

            graphTemps2     = new TemperaturePointCollection();
            graphTempsCount = 0;

            var ds2 = new EnumerableDataSource <TemperaturePoint>(graphTemps2);

            ds2.SetXMapping(x => (double)x.Count);
            ds2.SetYMapping(y => y.Pressure);

            plotter.AddLineGraph(ds2, Colors.Red, 1, "T2");
            // plotter.LegendVisible = false;

            // Initialize the PCR graph.

            graphPCR      = new PCRPointCollection();
            graphPCRCycle = 0;

            var dsPCR = new EnumerableDataSource <PCRPoint>(graphPCR);

            dsPCR.SetXMapping(x => (double)x.Cycle);
            dsPCR.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR, Colors.Green, 1, "R1");
            pcrplotter.LegendVisible = false;

            graphPCR2 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR2 = new EnumerableDataSource <PCRPoint>(graphPCR2);

            dsPCR2.SetXMapping(x => (double)x.Cycle);
            dsPCR2.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR2, Colors.Red, 1, "R2");
            //pcrplotter.LegendVisible = false;

            graphPCR3 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR3 = new EnumerableDataSource <PCRPoint>(graphPCR3);

            dsPCR3.SetXMapping(x => (double)x.Cycle);
            dsPCR3.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR3, Colors.Blue, 1, "R3");

            graphPCR4 = new PCRPointCollection();
            // graphPCRCycle = 0;

            var dsPCR4 = new EnumerableDataSource <PCRPoint>(graphPCR4);

            dsPCR4.SetXMapping(x => (double)x.Cycle);
            dsPCR4.SetYMapping(y => y.Reading);

            pcrplotter.AddLineGraph(dsPCR4, Colors.Brown, 1, "R4");

            _vmMain.PropertyChanged     += _vmMain_PropertyChanged;
            model.PCRCyclerTempChanged  += Model_PCRCyclerTempChanged;
            model.PCRCyclerTempChanged2 += Model_PCRCyclerTempChanged2;

            model.evtPCRReadingsStarted += Model_evtPCRReadingsStarted;
            model.evtPCRReadingsTaken   += Model_evtPCRReadingsTaken;
            //model.evtPCRReadingsTaken2 += Model_evtPCRReadingsTaken2;
            model.evtBeginAnalysis += model_evtBeginAnalysis;

            //protected List<double> m_data_r2;
            //m_data_r2 = new List<double>();
            //protected List<double> m_data_r3;
            //m_data_r3 = new List<double>();
            //protected List<double> m_data_r4;
            //m_data_r4 = new List<double>();
        }