public Shewhart()
        {
            InitializeComponent();

            System.Windows.Forms.Application.EnableVisualStyles();

            // Create a Windows Forms checkbox control and assign
            // it as the WindowsFormsHost element's child.

            var measSys = new MeasurementSystem();
            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);

            _graphPlotControl = new GraphPlotControl(CoordinateSystemType.Users);

            var measurement = new ShewharMeasurement
            {
                Foundry = 0,
                Process = 0,
                TestName = "CMIM",
                TrendManager = new TrendManager(TrendsFactory.GetAllTrends())
            };

            var shewhartChart = new ShewhartControlChart(measurement.TrendManager);

            shewhartChart.Abscisses[0].Title = "Number";
            shewhartChart.Ordinates[0].Title = "Value";

            _graphPlotControl.Plot.CoordinateSystem = shewhartChart;

            _graphPlotControl.Plot.Legend.Visible = false;
            _graphPlotControl.BorderStyle = BorderStyle.None;
            _graphPlotControl.MeasurementSystem = measSys;
            _graphPlotControl.Plot.CoordinateSystem.SweepValueQuantityType = PhysicalQuantityType.Frequencies;
            _graphPlotControl.Plot.Data = MakeData(measurement);

              //  _graphPlotControl.Tag = megaMeasurement;

            graphicsHost.Child = _graphPlotControl;

            // Cause the OnFlowDirectionChange delegate to be called.
            graphicsHost.FlowDirection = System.Windows.FlowDirection.LeftToRight;

            // Cause the OnClipChange delegate to be called.
            graphicsHost.Clip = new RectangleGeometry();
        }
        public Histogram()
        {
            InitializeComponent();

            System.Windows.Forms.Application.EnableVisualStyles();

            // Create a Windows Forms checkbox control and assign
            // it as the WindowsFormsHost element's child.

            var measSys = new MeasurementSystem();
            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);

            _integralPlotControl = new IntegralGraphControl();
            _integralPlotControl.Data = MakeData();

            var graphPlotControl = (GraphPlotControl)_integralPlotControl.Graphs[0];
            graphPlotControl.BorderStyle = BorderStyle.None;
            graphPlotControl.MeasurementSystem = measSys;
            graphPlotControl.Plot.CoordinateSystem.SweepValueQuantityType = PhysicalQuantityType.Frequencies;
            graphPlotControl.GraphTitle = "Histogram";

            var ftMeas = new FtMeasurement
            {
                Foundry = 0,
                Process = 0,
                Wafer = "C2",
                ElementType = "Transistor",
                ElementSubTypes = new List<string> { "T240" },
            };

            var megaMeas = new MegaMeasurement();

            megaMeas.Add(ftMeas);

            graphPlotControl.Tag = megaMeas;

            graphicsHost.Child = _integralPlotControl;

            // Cause the OnFlowDirectionChange delegate to be called.
            graphicsHost.FlowDirection = System.Windows.FlowDirection.LeftToRight;

            // Cause the OnClipChange delegate to be called.
            graphicsHost.Clip = new RectangleGeometry();
        }
        public PageAddStatistics()
        {
            InitializeComponent();

            var statisticsPage = new AddMeasurementPageXML();

            var measSys = new MeasurementSystem();
            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);

            var data = new AddMeasurementPageXMLData() {MeasurementSystem = measSys};

            statisticsPage.SetData(data);

            AddStatisticsHost.Child = statisticsPage;

            // Cause the OnFlowDirectionChange delegate to be called.
            AddStatisticsHost.FlowDirection = System.Windows.FlowDirection.LeftToRight;

            // Cause the OnClipChange delegate to be called.
            AddStatisticsHost.Clip = new RectangleGeometry();
        }
        public Measurement()
        {
            InitializeComponent();

            System.Windows.Forms.Application.EnableVisualStyles();

            var measuremForm = new MeasurementToDBFormXML();
            var measSys = new MeasurementSystem();

            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);

            measuremForm.MeasurementSystem = measSys;

            measureHost.Child = measuremForm;

            // Cause the OnFlowDirectionChange delegate to be called.
            measureHost.FlowDirection = System.Windows.FlowDirection.LeftToRight;

            // Cause the OnClipChange delegate to be called.
            measureHost.Clip = new RectangleGeometry();
        }
        public Page2()
        {
            InitializeComponent();

            System.Windows.Forms.Application.EnableVisualStyles();

            // Create a Windows Forms checkbox control and assign
            // it as the WindowsFormsHost element's child.

            var measSys = new MeasurementSystem();
            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);

            _integralPlotControl = new IntegralGraphControl();
            _integralPlotControl.Data = MakeData();

            var graphPlotControl = (GraphPlotControl)_integralPlotControl.Graphs[0];
            graphPlotControl.Plot.CoordinateSystem = new WaferDiagram();
            graphPlotControl.Plot.Legend.Visible = false;
            graphPlotControl.BorderStyle = BorderStyle.None;
            graphPlotControl.MeasurementSystem = measSys;
            graphPlotControl.Plot.CoordinateSystem.SweepValueQuantityType = PhysicalQuantityType.Frequencies;
            graphPlotControl.GraphTitle = "Wafer";

            var sMeas = new SMeasurement
                            {
                                Foundry = 0,
                                Process = 0,
                                Wafer = "C2",
                                ElementType = "Transistor",
                                ElementSubTypes = new List<string> {"T240"},
                                Frequency = 10000000000,
                                TransformMode = ComplexToComplexTransformMode.Magnitude,
                                IsDB = true
                            };

            var ftMeas = new FtMeasurement
            {
                Foundry = 0,
                Process = 0,
                Wafer = "C2",
                ElementType = "Transistor",
                ElementSubTypes = new List<string> { "T240" },
            };

            var megaMeas = new MegaMeasurement();

            megaMeas.Add(ftMeas);
            megaMeas.Add(sMeas);

            graphPlotControl.Tag = megaMeas;

            graphicsHost.Child = _integralPlotControl;

            // Cause the OnFlowDirectionChange delegate to be called.
            graphicsHost.FlowDirection = System.Windows.FlowDirection.LeftToRight;

            // Cause the OnClipChange delegate to be called.
            graphicsHost.Clip = new RectangleGeometry();

            _filterPage = new GraphicFilterPage();
            var wafer = graphPlotControl.Plot.CoordinateSystem as WaferDiagram;
            var data = new GraphicFilterPage.Data { GraphPlot = graphPlotControl, FilterCriteria = wafer.FilterCriteria };
            _filterPage.MeasurementSystem = graphPlotControl.MeasurementSystem;

            _filterPage.SetData(data);       // Передаем данные в диалог настроек.

            filterPageHost.Child = _filterPage;

            UpdateRadioButtons();
        }
        private void SplitTraces_Click(object sender, RoutedEventArgs e)
        {
            Measurements.Visibility = SplitTraces.Visibility = System.Windows.Visibility.Collapsed;
            JoinTraces.Visibility = System.Windows.Visibility.Visible;

            _integralPlotControl.Data.ComplexFunctions[1].GraphIndex = 1;
            _integralPlotControl.Data.ComplexFunctions[0].Visible = true;
            _integralPlotControl.Data.ComplexFunctions[1].Visible = true;

            _integralPlotControl.UpdateAllGraphs();

            var measSys = new MeasurementSystem();
            measSys.SetPreambula(SiPreambuledUnitType.Hz, SiPreambula.Giga);
            var graphPlotControl = (GraphPlotControl)_integralPlotControl.Graphs[0];
            graphPlotControl.Plot.CoordinateSystem = new WaferDiagram();
            graphPlotControl.Plot.Legend.Visible = false;
            graphPlotControl.BorderStyle = BorderStyle.None;
            graphPlotControl.MeasurementSystem = measSys;
            graphPlotControl.Plot.CoordinateSystem.SweepValueQuantityType = PhysicalQuantityType.Frequencies;
            graphPlotControl.GraphTitle = "Wafer 1";
            graphPlotControl.UpdateData();

            graphPlotControl = (GraphPlotControl)_integralPlotControl.Graphs[1];
            graphPlotControl.Plot.CoordinateSystem = new WaferDiagram();
            graphPlotControl.Plot.Legend.Visible = false;
            graphPlotControl.BorderStyle = BorderStyle.None;
            graphPlotControl.MeasurementSystem = measSys;
            graphPlotControl.Plot.CoordinateSystem.SweepValueQuantityType = PhysicalQuantityType.Scalar;
            graphPlotControl.GraphTitle = "Wafer 2";
            graphPlotControl.UpdateData();
        }