Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the Visifire.Charts.Axis class
        /// </summary>
        public Axis()
        {
            // Initialize list of ChartGrid list
            Grids = new ChartGridCollection();

            // Initialize list of Ticks list 
            Ticks = new TicksCollection();

            // Initialize AxisLabels element
            AxisLabels = new AxisLabels();

            // Attach event handler on collection changed event with chart grid collection
            Grids.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Grids_CollectionChanged);

            // Attach event handler on collection changed event with ticks collection
            Ticks.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Ticks_CollectionChanged);

            InternalAxisMinimum = Double.NaN;
            InternalAxisMaximum = Double.NaN;

        }
Beispiel #2
0
        public void CreatePowerChart(string startDate, string endDate)
        {
            try
            {
                #region 功率图表处理
                string chartTitle = string.Empty;
                string unit = string.Empty;
                ChartData chartData = null;
                try
                {
                    chartData = DataUtil.getPowerData(this.plantId, startDate, endDate);
                    if (chartData == null)
                    {
                        gidPowerChartContainer.Children.Clear();
                        Label l = new Label();
                        l.Content = "无数据";
                        l.HorizontalAlignment = HorizontalAlignment.Center;
                        l.VerticalAlignment = VerticalAlignment.Center;
                        l.FontSize = 48;
                        gidPowerChartContainer.Children.Add(l);
                        return;
                    }
                }
                catch (Exception e2)
                {
                    Console.WriteLine(e2.StackTrace);
                    gidPowerChartContainer.Children.Clear();
                    Label l = new Label();
                    l.Content = "无数据";
                    l.HorizontalAlignment = HorizontalAlignment.Center;
                    l.VerticalAlignment = VerticalAlignment.Center;
                    l.FontSize = 48;
                    gidPowerChartContainer.Children.Add(l);
                    return;
                }

                Chart chart = new Chart();
                ColorSet cs = new ColorSet();
                cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(240, 252, 101, 6)));
                cs.Id = "colorSet1";
                chart.ColorSets.Add(cs);
                chart.ColorSet = "colorSet1";
                chart.BorderBrush = new SolidColorBrush(Color.FromArgb(155, 0, 0, 0));
                chart.Background = new SolidColorBrush(Color.FromArgb(1, 255, 255, 255));
                chart.View3D = false;
                chart.ScrollingEnabled = false;
                chart.CornerRadius = new CornerRadius(30);
                Title title = new Title();
                chart.Titles.Add(title);
                Axis axisX = new Axis();
                axisX.IntervalType = IntervalTypes.Number;
                axisX.Interval = 24;
                axisX.FontSize = 20;
                AxisLabels labels = new AxisLabels();
                axisX.AxisLabels = labels;
                labels.Angle = -45;
                labels.FontSize = 22;
                chart.AxesX.Add(axisX);

                Axis axisY = new Axis();
                axisY.Title = "kW";
                axisY.FontSize = 22;
                axisY.AxisMinimum = 0;
                axisY.TitleFontSize = 20;
                axisY.AxisType = AxisTypes.Primary;

                Axis axisY2 = new Axis();
                axisY2.Title = "W/㎡";
                axisY2.FontSize = 22;
                axisY2.TitleFontSize = 20;
                axisY2.AxisMinimum = 0;
                axisY2.ValueFormatString = "0";
                axisY2.AxisType = AxisTypes.Secondary;

                labels = new AxisLabels();
                labels.FontSize = 22;
                axisY.AxisLabels = labels;
                chart.AxesY.Add(axisY);

                labels = new AxisLabels();
                labels.FontSize = 22;
                axisY2.AxisLabels = labels;
                chart.AxesY.Add(axisY2);

                Legend legend1 = new Legend();
                legend1.FontSize = 14;
                chart.Legends.Add(legend1);

                DataSeries dataSeries = new DataSeries();
                dataSeries.RenderAs = RenderAs.Area;
                dataSeries.XValueType = ChartValueTypes.Auto;
                DataPoint dataPoint;
                dataSeries.AxisYType = AxisTypes.Primary;
                dataSeries.LegendText = chartData.series[0].name;
                for (int i = 0; i < chartData.series[0].data.Count(); i++)
                {
                    dataPoint = new DataPoint();
                    //dataPoint.YValue = chartData.series[0].data[i] == null ? 0 : chartData.series[0].data[i].Value;
                    if (chartData.series[0].data[i] != null)
                        dataPoint.YValue = chartData.series[0].data[i].Value;
                    dataPoint.AxisXLabel = chartData.categories[i];
                    dataSeries.DataPoints.Add(dataPoint);
                }

                chart.Series.Add(dataSeries);
                //if(chartData.series)
                DataSeries dataSunSeries = new DataSeries();
                dataSunSeries.RenderAs = RenderAs.QuickLine;
                dataSunSeries.XValueType = ChartValueTypes.Auto;
                DataPoint sundataPoint;
                dataSunSeries.AxisYType = AxisTypes.Secondary;
                dataSunSeries.LegendText = chartData.series[1].name;
                dataSunSeries.Color = new SolidColorBrush(Color.FromRgb(23, 118, 184));
                dataSunSeries.LineThickness = 2;
                for (int i = 0; i < chartData.series[1].data.Count(); i++)
                {
                    sundataPoint = new DataPoint();
                    if (chartData.series[1].data[i] != null)
                        sundataPoint.YValue = chartData.series[1].data[i].Value;
                    //sundataPoint.AxisXLabel = chartData.categories[i];
                    dataSunSeries.DataPoints.Add(sundataPoint);
                }
                chart.Series.Add(dataSunSeries);
                double maxValue = dataSunSeries.DataPoints.Max(m => m.YValue);
                if (maxValue < 7 || maxValue.Equals(double.NaN))
                {
                    axisY2.AxisMaximum = 0;
                    axisY2.AxisMaximum = 7;
                    axisY2.Interval = 1;
                }
                gidPowerChartContainer.Children.Clear();
                gidPowerChartContainer.Children.Add(chart);
                #endregion
            }
            catch (Exception ee)
            {
                LogUtil.error("CreatePowerChart error:" + ee.StackTrace);
                throw ee;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 绘制发电量图表
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="type">1:week 2:month</param>
        public void CreateEnergyChart(string startDate, string endDate, int type)
        {
            try
            {
                columnWidth = curPage == int.Parse(ConfigPara.MonthEnergyChartPage) ? 2 : 5;
                float maxValue = 0f;
                #region 发电量图表显示
                string chartTitle = string.Empty;
                string unit = string.Empty;
                string startDateStr = string.Format("{0}-{1}-{2}", startDate.Substring(0, 4), startDate.Substring(4, 2), startDate.Substring(6, 2));

                DateTime startDateTime = DateTime.Parse(startDateStr);
                IList<KeyValuePair<string, float?>> energyChartData;
                try
                {
                    energyChartData = DataUtil.getEnergyData(this.plantId, startDate, endDate, chartTitle, unit, out maxValue);
                    if (energyChartData == null)
                    {
                        gidEnergyChartContainer.Children.Clear();
                        Label l = new Label();
                        l.Content = "无数据";
                        l.HorizontalAlignment = HorizontalAlignment.Center;
                        l.VerticalAlignment = VerticalAlignment.Center;
                        l.FontSize = 48;
                        gidEnergyChartContainer.Children.Add(l);
                        return;
                    }
                }
                catch (Exception e2)
                {
                    Console.WriteLine(e2.Message);
                    gidEnergyChartContainer.Children.Clear();
                    Label l = new Label();
                    l.Content = "无数据";
                    l.HorizontalAlignment = HorizontalAlignment.Center;
                    l.VerticalAlignment = VerticalAlignment.Center;
                    l.FontSize = 48;
                    gidEnergyChartContainer.Children.Add(l);
                    return;
                }
                Chart energyChart = new Chart();
                ColorSet cs = new ColorSet();
                cs.Brushes.Add(new SolidColorBrush(Color.FromArgb(240, 252, 101, 6)));
                cs.Id = "colorSet1";

                energyChart.ColorSets.Add(cs);
                energyChart.ColorSet = "colorSet1";
                energyChart.BorderBrush = new SolidColorBrush(Color.FromArgb(155, 0, 0, 0));
                energyChart.Background = new SolidColorBrush(Color.FromArgb(1, 255, 255, 255));

                energyChart.View3D = false;
                energyChart.ScrollingEnabled = false;
                energyChart.CornerRadius = new CornerRadius(30);
                Title energTitle = new Title();
                energTitle.FontSize = 22;
                energyChart.Titles.Add(energTitle);
                Axis eaxis = new Axis();
                eaxis.IntervalType = IntervalTypes.Number;
                if (type == 2)
                    eaxis.Interval = 2;
                eaxis.TitleFontSize = 22;
                eaxis.FontSize = 22;

                AxisLabels elabels = new AxisLabels();
                elabels.FontSize = 22;
                eaxis.AxisLabels = elabels;

                elabels.Angle = -45;
                energyChart.AxesX.Add(eaxis);

                Axis eaxisY = new Axis();
                eaxisY.Title = "kWh";
                eaxisY.FontSize = 24;
                eaxisY.TitleFontSize = 22;
                elabels = new AxisLabels();
                elabels.FontSize = 22;
                eaxisY.AxisLabels = elabels;
                energyChart.AxesY.Add(eaxisY);

                DataSeries edataSeries = new DataSeries();
                edataSeries.RenderAs = RenderAs.Column;
                edataSeries.XValueType = ChartValueTypes.Auto;
                DataPoint edataPoint;
                double percent20 = maxValue * 0.02;
                for (int i = 0; i < energyChartData.Count; i++)
                {
                    edataPoint = new DataPoint();
                    edataPoint.AxisXLabel = startDateTime.AddDays(i).ToString("yy/MM/dd");
                    edataPoint.XValue = i;
                    edataPoint.YValue = (double)energyChartData[i].Value;
                    edataPoint.ToolTipText = string.Format("{0},{1}", edataPoint.AxisXLabel, energyChartData[i].Value);
                    if (edataPoint.YValue < percent20 && edataPoint.YValue > 0)
                        edataPoint.YValue = percent20;
                    edataSeries.DataPoints.Add(edataPoint);
                }
                energyChart.DataPointWidth = columnWidth;
                energyChart.Series.Add(edataSeries);
                gidEnergyChartContainer.Children.Clear();
                gidEnergyChartContainer.Children.Add(energyChart);
                #endregion
            }
            catch (Exception ee)
            {
                LogUtil.error("CreateEnergyChart error:" + ee.StackTrace);
                throw ee;
            }
        }
        /// <summary>
        /// 柱状图
        /// </summary>
        /// <param name="gvColumn"></param>
        /// <param name="ColumnScroll"></param>
        /// <param name="LineScroll"></param>
        public void Column(Grid gvColumn, ScrollViewer ColumnScroll)
        {
            #region 初始化
            ColumnScroll.Visibility = Visibility.Visible;

            Grid Column_Range = gvColumn.Children[0] as Grid;
            Grid Column_ParticipationStrength = gvColumn.Children[1] as Grid;

            Column_Range.Children.Clear();
            Column_ParticipationStrength.Children.Clear();
           
            Color[] colors = new Color[] { Colors.Red, Colors.LawnGreen, Colors.Blue, Colors.Yellow, Colors.Magenta, Colors.Black, Colors.Brown, Colors.DimGray };

            data = new List<ClusteredBarData>();
            #endregion

            #region 实例图表
           
            //最大力量
            Chart chart1 = new Chart();
            chart1.DataPointWidth = 2;
            chart1.Width = 870;
            Axis xaxis1 = new Axis();
            AxisLabels xal1 = new AxisLabels
            {

                Enabled = true,

                Angle = -45
            };
            xaxis1.AxisLabels = xal1;
            chart1.AxesX.Add(xaxis1);
            SetTitle(chart1, "主动参与力量");
            chart1.Rendered += new EventHandler(c_Rendered);
           
            Chart chart3 = new Chart();
            //主动/被动关节活动度
            SetTitle(chart3, "活动范围");
            chart3.DataPointWidth = 2;
            chart3.Width = 870;
            Axis xaxis3 = new Axis();
            AxisLabels xal3 = new AxisLabels
            {

                Enabled = true,

                Angle = -45
            };
            xaxis3.AxisLabels = xal3;
            chart3.AxesX.Add(xaxis3);
            chart3.Rendered += new EventHandler(c_Rendered);
           
            #endregion

            #region 被动运动集合
            if (CkGuided.IsChecked.Value==true)
            {
                #region 活动范围
                //活动范围
                if (CkGuided_RangeList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Red);
                    ds.Color = brush;
                    ds.Name = "被动运动模式";
                    foreach (var item in CkGuided_RangeList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart3.Series.Add(ds);
                }
                #endregion

                #region 活动范围 对比 
                //活动范围
                if (CkGuided_RangeList.Count > 0)
                {
                    var groupRecords = new List<RecordData>();
                    //int count=0;
                    foreach (var item in CkGuided_RangeList)
                    {
                        bool flag = true;
                        string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
                        var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

                        for (int i = 0; i < data.Count; i++)
                        {
                            if (data[i].X == x)
                            {
                                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                                bd.BrushColor = colors[0];
                                data[i].BarDatas.Add(bd);
                                flag = false;
                                break;
                            }
                        }

                        if (flag)
                        {
                            ClusteredBarData cbd = new ClusteredBarData();
                            List<BarData> barDatas = new List<BarData>();

                            cbd.X = x;
                            BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                            bd.BrushColor = colors[0];
                            barDatas.Add(bd);
                            cbd.BarDatas = barDatas;
                            data.Add(cbd);
                        }

                    }
                }
                #endregion

                #region 参与力量
                //参与力量
                if (CkGuided_ParticipationStrengthList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Red);
                    ds.Color = brush;
                    ds.Name = "被动运动模式";
                    foreach (var item in CkGuided_ParticipationStrengthList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart1.Series.Add(ds);
                }
                #endregion
            }
            #endregion

            #region 主动运动集合
            //if (CkFree.IsChecked.Value == true)
            //{
            //    #region 活动范围
            //    //活动范围
            //    if (CkFree_RangeList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.LawnGreen);
            //        ds.Color = brush;
            //        ds.Name = "主动运动";
            //        foreach (var item in CkFree_RangeList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart3.Series.Add(ds);
            //    }
            //    #endregion

            //    #region 活动范围 对比
            //    //活动范围
            //    if (CkFree_RangeList.Count > 0)
            //    {
            //        var groupRecords = new List<RecordData>();
            //        //int count=0;
            //        foreach (var item in CkFree_RangeList)
            //        {
            //            bool flag = true;
            //            string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
            //            var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

            //            for (int i = 0; i < data.Count; i++)
            //            {
            //                if (data[i].X == x)
            //                {
            //                    BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                    bd.BrushColor = colors[1];
            //                    data[i].BarDatas.Add(bd);
            //                    flag = false;
            //                    break;
            //                }
            //            }

            //            if (flag)
            //            {
            //                ClusteredBarData cbd = new ClusteredBarData();
            //                List<BarData> barDatas = new List<BarData>();
            //                cbd.X = x;
            //                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                bd.BrushColor = colors[1];
            //                barDatas.Add(bd);
            //                cbd.BarDatas = barDatas;
            //                data.Add(cbd);
            //            }

            //        }

            //    }
            //    #endregion

            //    #region 参与力量
            //    //参与力量
            //    if (CkFree_ParticipationStrengthList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.LawnGreen);
            //        ds.Color = brush;
            //        ds.Name = "主动运动";
            //        foreach (var item in CkFree_ParticipationStrengthList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart1.Series.Add(ds);
            //    }
            //    #endregion
            //}
            #endregion

            #region 助动运动集合
            //if (CkInitiated.IsChecked.Value == true)
            //{
            //    #region 活动范围
            //    //活动范围
            //    if (CkInitiated_RangeList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.Blue);
            //        ds.Color = brush;
            //        ds.Name = "助动运动";
            //        foreach (var item in CkInitiated_RangeList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart3.Series.Add(ds);
            //    }
            //    #endregion

            //    #region 活动范围 对比
            //    //活动范围
            //    if (CkInitiated_RangeList.Count > 0)
            //    {
            //        var groupRecords = new List<RecordData>();
            //        //int count=0;
            //        foreach (var item in CkInitiated_RangeList)
            //        {
            //            bool flag = true;
            //            string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
            //            var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

            //            for (int i = 0; i < data.Count; i++)
            //            {
            //                if (data[i].X == x)
            //                {
            //                    BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                    bd.BrushColor = colors[2];
            //                    data[i].BarDatas.Add(bd);
            //                    flag = false;
            //                    break;
            //                }
            //            }

            //            if (flag)
            //            {
            //                ClusteredBarData cbd = new ClusteredBarData();
            //                List<BarData> barDatas = new List<BarData>();
            //                cbd.X = x;
            //                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                bd.BrushColor = colors[2];
            //                barDatas.Add(bd);
            //                cbd.BarDatas = barDatas;
            //                data.Add(cbd);
            //            }

            //        }

            //    }
            //    #endregion

            //    #region 参与力量
            //    //参与力量
            //    if (CkInitiated_ParticipationStrengthList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.Blue);
            //        ds.Color = brush;
            //        ds.Name = "助动运动";
            //        foreach (var item in CkInitiated_ParticipationStrengthList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart1.Series.Add(ds);
            //    }
            //    #endregion
            //}
            #endregion

            #region 主动配重块集合
            if (CkFreeCounterWeight.IsChecked.Value == true)
            {
                #region 活动范围
                //活动范围
                if (CkFreeCounterWeight_RangeList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Yellow);
                    ds.Color = brush;
                    ds.Name = "向心、离心运动模式";
                    foreach (var item in CkFreeCounterWeight_RangeList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart3.Series.Add(ds);
                }
                #endregion

                #region 活动范围 对比
                //活动范围
                if (CkFreeCounterWeight_RangeList.Count > 0)
                {
                    var groupRecords = new List<RecordData>();
                    //int count=0;
                    foreach (var item in CkFreeCounterWeight_RangeList)
                    {

                        bool flag = true;
                        string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
                        var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

                        for (int i = 0; i < data.Count; i++)
                        {
                            if (data[i].X == x)
                            {
                                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                                bd.BrushColor = colors[3];
                                data[i].BarDatas.Add(bd);
                                flag = false;
                                break;
                            }
                        }

                        if (flag)
                        {
                            ClusteredBarData cbd = new ClusteredBarData();
                            List<BarData> barDatas = new List<BarData>();
                            cbd.X = x;
                            BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                            bd.BrushColor = colors[3];
                            barDatas.Add(bd);
                            cbd.BarDatas = barDatas;
                            data.Add(cbd);
                        }

                    }

                }
                #endregion

                #region 参与力量
                //参与力量
                if (CkFreeCounterWeight_ParticipationStrengthList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Yellow);
                    ds.Color = brush;
                    ds.Name = "向心、离心运动模式";
                    foreach (var item in CkFreeCounterWeight_ParticipationStrengthList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart1.Series.Add(ds);
                }
                #endregion
            }
            #endregion

            #region 主动恒阻力集合
            if (CkFreeConstantResistance.IsChecked.Value == true)
            {
                #region 活动范围
                //活动范围
                if (CkFreeConstantResistance_RangeList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Magenta);
                    ds.Color = brush;
                    ds.Name = "等张运动模式";
                    foreach (var item in CkFreeConstantResistance_RangeList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart3.Series.Add(ds);
                }
                #endregion

                #region 活动范围 对比
                //活动范围
                if (CkFreeConstantResistance_RangeList.Count > 0)
                {
                    var groupRecords = new List<RecordData>();
                    //int count=0;
                    foreach (var item in CkFreeConstantResistance_RangeList)
                    {
                        bool flag = true;
                        string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
                        var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

                        for (int i = 0; i < data.Count; i++)
                        {
                            if (data[i].X == x)
                            {
                                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                                bd.BrushColor = colors[4];
                                data[i].BarDatas.Add(bd);
                                flag = false;
                                break;
                            }
                        }

                        if (flag)
                        {
                            ClusteredBarData cbd = new ClusteredBarData();
                            List<BarData> barDatas = new List<BarData>();
                            cbd.X = x;
                            BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                            bd.BrushColor = colors[4];
                            barDatas.Add(bd);
                            cbd.BarDatas = barDatas;
                            data.Add(cbd);
                        }
                    }

                }
                #endregion

                #region 参与力量
                //参与力量
                if (CkFreeConstantResistance_ParticipationStrengthList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Magenta);
                    ds.Color = brush;
                    ds.Name = "等张运动模式";
                    foreach (var item in CkFreeConstantResistance_ParticipationStrengthList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart1.Series.Add(ds);
                }
                #endregion
            }
            #endregion

            #region 等长A集合
            if (CkIsotonicA.IsChecked.Value == true)
            {
                #region 活动范围
                //活动范围
                if (CkIsotonicA_RangeList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Black);
                    ds.Color = brush;
                    ds.Name = "等长运动模式";
                    foreach (var item in CkIsotonicA_RangeList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart3.Series.Add(ds);
                }
                #endregion

                #region 活动范围 对比
                //活动范围
                if (CkIsotonicA_RangeList.Count > 0)
                {
                    var groupRecords = new List<RecordData>();
                    //int count=0;
                    foreach (var item in CkIsotonicA_RangeList)
                    {
                        bool flag = true;
                        string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
                        var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

                        for (int i = 0; i < data.Count; i++)
                        {
                            if (data[i].X == x)
                            {
                                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                                bd.BrushColor = colors[5];
                                data[i].BarDatas.Add(bd);
                                flag = false;
                                break;
                            }
                        }

                        if (flag)
                        {
                            ClusteredBarData cbd = new ClusteredBarData();
                            List<BarData> barDatas = new List<BarData>();
                            cbd.X = x;
                            BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                            bd.BrushColor = colors[5];
                            barDatas.Add(bd);
                            cbd.BarDatas = barDatas;
                            data.Add(cbd);
                        }

                    }

                }
                #endregion

                #region 参与力量
                //参与力量
                if (CkIsotonicA_ParticipationStrengthList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Black);
                    ds.Color = brush;
                    ds.Name = "等长运动模式";
                    foreach (var item in CkIsotonicA_ParticipationStrengthList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart1.Series.Add(ds);
                }
                #endregion
            }
            #endregion

            #region 等长B集合
            if (CkIsotonicB.IsChecked.Value == true)
            {
                #region 活动范围
                //活动范围
                if (CkIsotonicB_RangeList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Brown);
                    ds.Color = brush;
                    ds.Name = "协调性训练模式";
                    foreach (var item in CkIsotonicB_RangeList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart3.Series.Add(ds);
                }
                #endregion

                #region 活动范围 对比
                //活动范围
                if (CkIsotonicB_RangeList.Count > 0)
                {
                    var groupRecords = new List<RecordData>();
                    //int count=0;
                    foreach (var item in CkIsotonicB_RangeList)
                    {
                        bool flag = true;
                        string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
                        var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

                        for (int i = 0; i < data.Count; i++)
                        {
                            if (data[i].X == x)
                            {
                                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                                bd.BrushColor = colors[6];
                                data[i].BarDatas.Add(bd);
                                flag = false;
                                break;
                            }
                        }

                        if (flag)
                        {
                            ClusteredBarData cbd = new ClusteredBarData();
                            List<BarData> barDatas = new List<BarData>();
                            cbd.X = x;
                            BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
                            bd.BrushColor = colors[6];
                            barDatas.Add(bd);
                            cbd.BarDatas = barDatas;
                            data.Add(cbd);
                        }

                    }

                }
                #endregion

                #region 参与力量
                //参与力量
                if (CkIsotonicB_ParticipationStrengthList.Count > 0)
                {
                    DataSeries ds = new DataSeries();
                    ds.RenderAs = RenderAs.Column;
                    SolidColorBrush brush = new SolidColorBrush(Colors.Brown);
                    ds.Color = brush;
                    ds.Name = "协调性训练模式";
                    foreach (var item in CkIsotonicB_ParticipationStrengthList)
                    {
                        DataPoint dp = new DataPoint();
                        dp.YValue = Convert.ToDouble(item.Value);
                        dp.AxisXLabel = item.Key.ToString();
                        ds.DataPoints.Add(dp);
                    }
                    chart1.Series.Add(ds);
                }
                #endregion
            }
            #endregion

            #region 推箱子集合
            //if (CkSokoban.IsChecked.Value == true)
            //{
            //    #region 活动范围
            //    //活动范围
            //    if (CkSokoban_RangeList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.DimGray);
            //        ds.Color = brush;
            //        ds.Name = "推箱子";
            //        foreach (var item in CkSokoban_RangeList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart3.Series.Add(ds);
            //    }
                #endregion

            #region 活动范围 对比
            //    //活动范围
            //    if (CkSokoban_RangeList.Count > 0)
            //    {
            //        var groupRecords = new List<RecordData>();
            //        //int count=0;
            //        foreach (var item in CkSokoban_RangeList)
            //        {
            //            bool flag = true;
            //            string date = Convert.ToDateTime(item.Key).ToString("yyyy/MM/dd");
            //            var x = dateAxis.ConvertToDouble(Convert.ToDateTime(date));

            //            for (int i = 0; i < data.Count; i++)
            //            {
            //                if (data[i].X == x)
            //                {
            //                    BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                    bd.BrushColor = colors[7];
            //                    data[i].BarDatas.Add(bd);
            //                    flag = false;
            //                    break;
            //                }
            //            }

            //            if (flag)
            //            {
            //                ClusteredBarData cbd = new ClusteredBarData();
            //                List<BarData> barDatas = new List<BarData>();
            //                cbd.X = x;
            //                BarData bd = new BarData { YMin = Convert.ToDouble(item.Value2), YMax = Convert.ToDouble(item.Value) };
            //                bd.BrushColor = colors[7];
            //                barDatas.Add(bd);
            //                cbd.BarDatas = barDatas;
            //                data.Add(cbd);
            //            }
            //        }

            //    }
            #endregion

            //    #region 参与力量
            //    //参与力量
            //    if (CkSokoban_ParticipationStrengthList.Count > 0)
            //    {
            //        DataSeries ds = new DataSeries();
            //        ds.RenderAs = RenderAs.Column;
            //        SolidColorBrush brush = new SolidColorBrush(Colors.DimGray);
            //        ds.Color = brush;
            //        ds.Name = "推箱子";
            //        foreach (var item in CkSokoban_ParticipationStrengthList)
            //        {
            //            DataPoint dp = new DataPoint();
            //            dp.YValue = Convert.ToDouble(item.Value);
            //            dp.AxisXLabel = item.Key.ToString();
            //            ds.DataPoints.Add(dp);
            //        }
            //        chart1.Series.Add(ds);
            //    }
            //    #endregion
            //}
            //#endregion

            #region 添加图表到容器
            Column_Range.Children.Add(chart3);
            Column_ParticipationStrength.Children.Add(chart1);

            #endregion

            #region 添加数据
            EnumerableDataSource<ClusteredBarData> value = new EnumerableDataSource<ClusteredBarData>(data);
            value.SetXMapping(k => k.X);
            value.SetYMapping(k => k.BarDatas[0].YMax);

            DataContext = value;
            #endregion
        }
Beispiel #5
0
        /// <summary>
        /// 显示打印内容
        /// </summary>
        private void ShowPrintContent()
        {
            int TotalPageCount = 2; //总页数
            int TotalCount = 0;     //记录总条数

           
            #region 加载页面内容
            

            #region 页面参数

            List<FixedPage> vpages = new List<FixedPage>();
            FixedPage curPage = null;

            Size pageSize = new Size();
            Thickness pageMargin = new Thickness();

            pageSize.Width = Objtoobj.objectToDouble("823");
            pageSize.Height = Objtoobj.objectToDouble("1120");
            pageMargin = Objtoobj.strToThicknewss("10");
            #endregion

            #region 页面
            for (int i = 0; i < TotalPageCount; i++)
            {
                FixedPage vpage = new FixedPage();
                vpage.RenderSize = pageSize;
                vpage.Measure(pageSize);
                vpage.Width = pageSize.Width;
                vpage.Height = pageSize.Height;
                vpages.Add(vpage);
                //curPage = vpage;
            }

            curPage=vpages[0];
            #endregion

            #region 拼接
          
            #region 标题
            TextBlock tbTitle = new TextBlock();
            tbTitle.Text = "北京市积水潭医院";

            tbTitle.Margin = new Thickness(320,10,0,0);
            tbTitle.FontSize = 20;
            tbTitle.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            tbTitle.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            tbTitle.TextAlignment = System.Windows.TextAlignment.Center;
            curPage.Children.Add(tbTitle);
            #endregion

            TextBlock vt = new TextBlock();
            vt.FontFamily = new FontFamily("宋体");
            Line line = new Line();
            int selectIndex = 0;
            foreach (FixedPage item in vpages)
            {
                selectIndex++;
                curPage = item;

                #region 页码
                vt = new TextBlock();
                vt.Text =  selectIndex + "/";
                vt.Margin = new Thickness(680, 1080, 0, 0);
                vt.FontSize = 12;
                vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                curPage.Children.Add(vt);

                vt = new TextBlock();
                vt.Text =  TotalPageCount.ToString() ;
                vt.Margin = new Thickness(695, 1080, 0, 0);
                vt.FontSize = 12;
                vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                curPage.Children.Add(vt);
                #endregion

                if (selectIndex == 1)
                {

                    #region 标题
                    vt = new TextBlock();
                    vt.Text = "康复医学科";
                    vt.Margin = new Thickness(350, 40, 0, 0);
                    vt.FontSize = 20;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region 患者信息

                    vt = new TextBlock();
                    vt.Text = "姓   名: " + ModuleConstant.Syspatient.UserName;
                    vt.Margin = new Thickness(45, 80, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (string.IsNullOrEmpty(ModuleConstant.Syspatient.Sex))
                    {
                        vt.Text = "性  别: 未输入";
                    }
                    else
                    {
                       string sex= ModuleConstant.Syspatient.Sex == "1" ? "男" : "女";
                       vt.Text = "性  别: " + sex;
                    }
                    vt.Margin = new Thickness(220, 80, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "出生日期: " + Convert.ToDateTime(ModuleConstant.Syspatient.BirthDay).ToString("yyyy-MM-dd");
                    vt.Margin = new Thickness(400, 80, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "病历号: " + ModuleConstant.Syspatient.PatientCarNo;
                    vt.Margin = new Thickness(45, 110, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "年  龄: "+(DateTime.Now.Year-Convert.ToDateTime( ModuleConstant.Syspatient.BirthDay).Year);
                    vt.Margin = new Thickness(220, 110, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "初步诊断: " +EnumHelper.GetEnumItemName(Convert.ToInt32(ModuleConstant.Syspatient.DiagnoseTypeId),typeof( DiagnoseTypeEnum));
                    vt.Margin = new Thickness(400, 115, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    if (ModuleConstant.Syspatient.BodyHeight.HasValue)
                    {
                        vt.Text = "身   高: " + ModuleConstant.Syspatient.BodyHeight;
                    }
                    else
                    {
                        vt.Text = "身   高: ";
                    }
                    vt.Margin = new Thickness(45, 140, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (ModuleConstant.Syspatient.Weight.HasValue)
                    {
                        vt.Text = "体  重: " + ModuleConstant.Syspatient.Weight;
                    }
                    else
                    {
                        vt.Text = "体  重: ";
                    }
                    vt.Margin = new Thickness(220, 140, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = "打印日期:" + DateTime.Now.ToString() ;
                    vt.Margin = new Thickness(580, 140, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    #endregion

                    #region 分割线
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 70;
                    line.Y2 = 70;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 1.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);
                    #endregion

                    #region 力量评定部分

                    vt = new TextBlock();
                    vt.Text = "一、力量评测部分";
                    vt.Margin = new Thickness(45, 180, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #region 表格一 前屈
                   
                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 230;
                    line.Y2 = 230;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 30;
                    line.Y1 = 230;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //右边框
                    line = new Line();
                    line.X1 = 770;
                    line.X2 = 770;
                    line.Y1 = 230;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //下边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 430;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 表格线

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 255;
                    line.Y2 = 255;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 280;
                    line.Y2 = 280;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 305;
                    line.Y2 = 305;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 330;
                    line.Y2 = 330;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 355;
                    line.Y2 = 355;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 380;
                    line.Y2 = 380;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                  
                    line = new Line();
                    line.X1 = 130;
                    line.X2 = 130;
                    line.Y1 = 230;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                  
                    line = new Line();
                    line.X1 = 280;
                    line.X2 = 280;
                    line.Y1 = 230;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 430;
                    line.X2 = 430;
                    line.Y1 = 230;
                    line.Y2 = 430;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 标题
                    vt = new TextBlock();
                    vt.Text = "前屈";
                    vt.Margin = new Thickness(45, 235, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(45, 260, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(45, 285, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(45, 310, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "平均值";
                    vt.Margin = new Thickness(45, 335, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准差";
                    vt.Margin = new Thickness(45, 360, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准值";
                    vt.Margin = new Thickness(45, 385, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "爆发力(最大值)";
                    vt.Margin = new Thickness(145, 235, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "耐力(最小值)";
                    vt.Margin = new Thickness(295, 235, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "疲劳指数/[(最大值-最小值)/最大值*100%]";
                    vt.Margin = new Thickness(440, 235, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion
                  
                    #region 数据
                    vt = new TextBlock();
                    vt.Text = "测试时间:" + Protrusive.FitTime;
                    vt.Margin = new Thickness(45, 205, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceFirst;
                    vt.Margin = new Thickness(145, 260, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceSecond;
                    vt.Margin = new Thickness(145, 285, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceThird;
                    vt.Margin = new Thickness(145, 310, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceAVG;
                    vt.Margin = new Thickness(145, 335, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceSD;
                    vt.Margin = new Thickness(145, 360, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.ExplosiveForceSV;
                    vt.Margin = new Thickness(145, 385, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceFirst;
                    vt.Margin = new Thickness(295, 260, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceSecond;
                    vt.Margin = new Thickness(295, 285, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceThird;
                    vt.Margin = new Thickness(295, 310, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceAVG;
                    vt.Margin = new Thickness(295, 335, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceSD;
                    vt.Margin = new Thickness(295, 360, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.EnduranceSV;
                    vt.Margin = new Thickness(295, 385, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexFirst;
                    vt.Margin = new Thickness(440, 260, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexSecond;
                    vt.Margin = new Thickness(440, 285, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexThird;
                    vt.Margin = new Thickness(440, 310, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexAVG;
                    vt.Margin = new Thickness(440, 335, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexSD;
                    vt.Margin = new Thickness(440, 360, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Protrusive.LaborIndexSV;
                    vt.Margin = new Thickness(440, 385, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #endregion

                    #region 表格二 后伸

                 
                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 650;
                    line.Y2 = 650;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 30;
                    line.Y1 = 650;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //右边框
                    line = new Line();
                    line.X1 = 770;
                    line.X2 = 770;
                    line.Y1 = 650;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //下边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 850;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 表格线

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 675;
                    line.Y2 = 675;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 700;
                    line.Y2 = 700;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 725;
                    line.Y2 = 725;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 750;
                    line.Y2 = 750;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 775;
                    line.Y2 = 775;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 800;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 130;
                    line.X2 = 130;
                    line.Y1 = 650;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 280;
                    line.X2 = 280;
                    line.Y1 = 650;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 430;
                    line.X2 = 430;
                    line.Y1 = 650;
                    line.Y2 = 850;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 标题
                    vt = new TextBlock();
                    vt.Text = "后伸";
                    vt.Margin = new Thickness(45, 655, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(45, 680, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(45, 705, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(45, 730, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "平均值";
                    vt.Margin = new Thickness(45, 755, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准差";
                    vt.Margin = new Thickness(45, 780, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准值";
                    vt.Margin = new Thickness(45, 805, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "爆发力(最大值)";
                    vt.Margin = new Thickness(145, 655, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "耐力(最小值)";
                    vt.Margin = new Thickness(295, 655, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "疲劳指数/[(最大值-最小值)/最大值*100%]";
                    vt.Margin = new Thickness(440, 655, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region 数据

                    vt = new TextBlock();
                    vt.Text = "测试时间:" + Bend.FitTime;
                    vt.Margin = new Thickness(45, 625, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceFirst;
                    vt.Margin = new Thickness(145, 680, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceSecond;
                    vt.Margin = new Thickness(145, 705, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceThird;
                    vt.Margin = new Thickness(145, 730, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceAVG;
                    vt.Margin = new Thickness(145, 755, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceSD;
                    vt.Margin = new Thickness(145, 780, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.ExplosiveForceSV;
                    vt.Margin = new Thickness(145, 805, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceFirst;
                    vt.Margin = new Thickness(295, 680, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceSecond;
                    vt.Margin = new Thickness(295, 705, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceThird;
                    vt.Margin = new Thickness(295, 730, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceAVG;
                    vt.Margin = new Thickness(295, 755, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceSD;
                    vt.Margin = new Thickness(295, 780, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.EnduranceSV;
                    vt.Margin = new Thickness(295, 805, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexFirst;
                    vt.Margin = new Thickness(440, 680, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexSecond;
                    vt.Margin = new Thickness(440, 705, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexThird;
                    vt.Margin = new Thickness(440, 730, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexAVG;
                    vt.Margin = new Thickness(440, 755, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexSD;
                    vt.Margin = new Thickness(440, 780, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = Bend.LaborIndexSV;
                    vt.Margin = new Thickness(440, 805, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #endregion

                    #region 图表

                    #region chart1
                    CustomChars chart1 = new CustomChars();
                    //chart1.Maxarc = 100;
                    chart1.Background = new SolidColorBrush(Colors.White);
                    chart1.ScaleColor = new SolidColorBrush(Colors.LightGray);
                    chart1.LineColor1 = ChartColor.brush[0];
                    chart1.LineColor2 = ChartColor.brush[1];
                    chart1.LineColor3 = ChartColor.brush[2];
                    chart1.Width = 630;
                    chart1.Height = 170;
                    chart1.Margin = new Thickness(120, 440, 0, 0);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 490;
                    line.Y2 = 490;
                    line.Stroke = ChartColor.brush[0];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "前屈";
                    vt.Margin = new Thickness(50, 465, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Inlines.Add(new Italic(new Run(Protrusive.IntervalValue + "s")));
                    vt.Margin = new Thickness(400, 608, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(750, 608, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("T")));  
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(105, 440, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("N")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(82, 482, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 510;
                    line.Y2 = 510;
                    line.Stroke = ChartColor.brush[1];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(82, 502, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 530;
                    line.Y2 = 530;
                    line.Stroke = ChartColor.brush[2];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(82, 522, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region chart2
                    CustomChars chart2 = new CustomChars();
                    //chart2.Maxarc = 500;
                    chart2.Background = new SolidColorBrush(Colors.White);
                    chart2.ScaleColor = new SolidColorBrush(Colors.LightGray);
                    chart2.LineColor1 = ChartColor.brush[0];
                    chart2.LineColor2 = ChartColor.brush[1];
                    chart2.LineColor3 = ChartColor.brush[2];
                    chart2.Width = 630;
                    chart2.Height = 170;
                    chart2.Margin = new Thickness(120, 860, 0, 0);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 910;
                    line.Y2 = 910;
                    line.Stroke = ChartColor.brush[0];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "后伸";
                    vt.Margin = new Thickness(50, 885, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Inlines.Add(new Italic(new Run(Bend.IntervalValue + "s")));
                    vt.Margin = new Thickness(400, 1028, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(750, 1028, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("T")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(105, 860, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("N")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(82, 902, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 930;
                    line.Y2 = 930;
                    line.Stroke = ChartColor.brush[1];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(82, 922, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 950;
                    line.Y2 = 950;
                    line.Stroke = ChartColor.brush[2];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(82, 942, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    #endregion

                    #endregion

                    #region 添加折线图

                    #region 前屈

                    if (ProtrusiveList.Count > 0)
                    {
                         List<double> point=null;
                         List<double> point2=null;
                         List<double> point3=null;
                         double maxValue = 0;
                        for (int c = 0; c < ProtrusiveList.Count; c++)
                        {
                            EvaluteDetail myLine = ProtrusiveList[c];
                            string[] ypoint = myLine.Record2.Split('|');
                            for (int i = 0; i < ypoint.Count(); i++)
                            {
                                maxValue = MavValue(decimal.Parse(ypoint[i]));
                            }
                            if (c == 0)
                            {
                                point = SetPint(point, ypoint);
                            }
                            else if (c == 1)
                            {
                                point2 = SetPint(point2, ypoint);
                            }
                            else
                            {
                                point3 = SetPint(point3, ypoint);
                            }
                        }
                        chart1.Maxarc = maxValue;
                        chart1.Point1 = point;
                        chart1.Point2 = point2;
                        chart1.Point3 = point3;
                        curPage.Children.Add(chart1);
                    }
                    #endregion

                    #region 后伸
                    if (BendList.Count > 0)
                    {
                        List<double> point = null;
                        List<double> point2 = null;
                        List<double> point3 = null;
                        double maxValue = 0;
                        for (int c = 0; c < BendList.Count; c++)
                        {
                            EvaluteDetail myLine = BendList[c];
                            string[] ypoint = myLine.Record2.Split('|');
                            for (int i = 0; i < ypoint.Count(); i++)
                            {
                                maxValue = MavValue(decimal.Parse(ypoint[i]));
                            }
                            if (c == 0)
                            {
                                point = SetPint(point, ypoint);
                            }
                            else if (c == 1)
                            {
                                point2 = SetPint(point2, ypoint);
                               
                            }
                            else
                            {
                                point3 = SetPint(point3, ypoint);
                            }
                        }
                        chart2.Maxarc = maxValue;
                        chart2.Point1 = point;
                        chart2.Point2 = point2;
                        chart2.Point3 = point3;
                        curPage.Children.Add(chart2);
                    }
                    #endregion

                    #endregion

                    #endregion

                }
                #region 其它

                else
                {
                    #region 表格三

                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 70;
                    line.Y2 = 70;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 30;
                    line.Y1 = 70;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //右边框
                    line = new Line();
                    line.X1 = 770;
                    line.X2 = 770;
                    line.Y1 = 70;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //下边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 270;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 表格线

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 95;
                    line.Y2 = 95;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 120;
                    line.Y2 = 120;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 145;
                    line.Y2 = 145;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 170;
                    line.Y2 = 170;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 195;
                    line.Y2 = 195;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 220;
                    line.Y2 = 220;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 245;
                    line.Y2 = 245;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 130;
                    line.X2 = 130;
                    line.Y1 = 70;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 280;
                    line.X2 = 280;
                    line.Y1 = 70;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 430;
                    line.X2 = 430;
                    line.Y1 = 70;
                    line.Y2 = 270;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 205;
                    line.X2 = 205;
                    line.Y1 = 95;
                    line.Y2 = 220;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 355;
                    line.X2 = 355;
                    line.Y1 = 95;
                    line.Y2 = 220;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 600;
                    line.X2 = 600;
                    line.Y1 = 95;
                    line.Y2 = 220;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 标题
                    vt = new TextBlock();
                    vt.Text = "旋转(左/右)";
                    vt.Margin = new Thickness(45, 75, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(45, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(45, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(45, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "平均值";
                    vt.Margin = new Thickness(45, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准差";
                    vt.Margin = new Thickness(45, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准值";
                    vt.Margin = new Thickness(45, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "双侧差异(%)";
                    vt.Margin = new Thickness(45, 250, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "爆发力(最大值)";
                    vt.Margin = new Thickness(145, 75, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "耐力(最小值)";
                    vt.Margin = new Thickness(295, 75, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "疲劳指数/[(最大值-最小值)/最大值*100%]";
                    vt.Margin = new Thickness(440, 75, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region 数据

                    #region 左
                  
                    vt = new TextBlock();
                    vt.Text = "测试时间:"+RotationLeft.FitTime;
                    vt.Margin = new Thickness(45, 45, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceFirst;
                    vt.Margin = new Thickness(145, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceSecond;
                    vt.Margin = new Thickness(145, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceThird;
                    vt.Margin = new Thickness(145, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceAVG;
                    vt.Margin = new Thickness(145, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceSD;
                    vt.Margin = new Thickness(145, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.ExplosiveForceSV;
                    vt.Margin = new Thickness(145, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (Convert.ToDouble(RotationLeft.ExplosiveForceAVG) < Convert.ToDouble(RotationRigth.ExplosiveForceAVG))
                    {
                        vt.Text = (Convert.ToDouble(RotationLeft.ExplosiveForceAVG) / Convert.ToDouble(RotationRigth.ExplosiveForceAVG)*100).ToString("#0.00") ;
                    }
                    else
                    {
                        vt.Text = (Convert.ToDouble(RotationRigth.ExplosiveForceAVG) / Convert.ToDouble(RotationLeft.ExplosiveForceAVG)*100).ToString("#0.00") ;
                    }
                    vt.Margin = new Thickness(145, 250, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceFirst;
                    vt.Margin = new Thickness(295, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceSecond;
                    vt.Margin = new Thickness(295, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceThird;
                    vt.Margin = new Thickness(295, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceAVG;
                    vt.Margin = new Thickness(295, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceSD;
                    vt.Margin = new Thickness(295, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.EnduranceSV;
                    vt.Margin = new Thickness(295, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (Convert.ToDouble(RotationLeft.EnduranceAVG) < Convert.ToDouble(RotationRigth.EnduranceAVG))
                    {
                        vt.Text = (Convert.ToDouble(RotationLeft.EnduranceAVG) / Convert.ToDouble(RotationRigth.EnduranceAVG)*100).ToString("#0.00");
                    }
                    else
                    {
                        vt.Text = (Convert.ToDouble(RotationRigth.EnduranceAVG) / Convert.ToDouble(RotationLeft.EnduranceAVG)*100).ToString("#0.00");
                    }
                   
                    vt.Margin = new Thickness(295, 250, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexFirst;
                    vt.Margin = new Thickness(440, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexSecond;
                    vt.Margin = new Thickness(440, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexThird;
                    vt.Margin = new Thickness(440, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexAVG;
                    vt.Margin = new Thickness(440, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexSD;
                    vt.Margin = new Thickness(440, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationLeft.LaborIndexSV;
                    vt.Margin = new Thickness(440, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                 
                    #endregion

                    #region 右
                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceFirst;
                    vt.Margin = new Thickness(220, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceSecond;
                    vt.Margin = new Thickness(220, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceThird;
                    vt.Margin = new Thickness(220, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceAVG;
                    vt.Margin = new Thickness(220, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceSD;
                    vt.Margin = new Thickness(220, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.ExplosiveForceSV;
                    vt.Margin = new Thickness(220, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                  


                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceFirst;
                    vt.Margin = new Thickness(370, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceSecond;
                    vt.Margin = new Thickness(370, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceThird;
                    vt.Margin = new Thickness(370, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceAVG;
                    vt.Margin = new Thickness(370, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceSD;
                    vt.Margin = new Thickness(370, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.EnduranceSV;
                    vt.Margin = new Thickness(370, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                  

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexFirst;
                    vt.Margin = new Thickness(615, 100, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexSecond;
                    vt.Margin = new Thickness(615, 125, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexThird;
                    vt.Margin = new Thickness(615, 150, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexAVG;
                    vt.Margin = new Thickness(615, 175, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexSD;
                    vt.Margin = new Thickness(615, 200, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = RotationRigth.LaborIndexSV;
                    vt.Margin = new Thickness(615, 225, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                   
                    #endregion
                    #endregion

                    #region 图表

                    #region chart3
                   
                    CustomChars chart3 = new CustomChars();
                    //chart3.Maxarc = 500;
                    chart3.Background = new SolidColorBrush(Colors.White);
                    chart3.ScaleColor = new SolidColorBrush(Colors.LightGray);
                    chart3.LineColor1 = ChartColor.brush[0];
                    chart3.LineColor2 = ChartColor.brush[1];
                    chart3.LineColor3 = ChartColor.brush[2];
                    chart3.Width = 630;
                    chart3.Height = 130;
                    chart3.Margin = new Thickness(120, 280, 0, 0);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 330;
                    line.Y2 = 330;
                    line.Stroke = ChartColor.brush[0];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "旋转左";
                    vt.Margin = new Thickness(50, 305, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Inlines.Add(new Italic(new Run(RotationLeft.IntervalValue + "s")));
                    vt.Margin = new Thickness(400, 408, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(750, 408, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("T")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(105, 280, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("N")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(82, 322, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 350;
                    line.Y2 = 350;
                    line.Stroke = ChartColor.brush[1];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(82, 342, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 370;
                    line.Y2 = 370;
                    line.Stroke = ChartColor.brush[2];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(82, 362, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region chart4

                    CustomChars chart4 = new CustomChars();
                    //chart4.Maxarc = 500;
                    chart4.Background = new SolidColorBrush(Colors.White);
                    chart4.ScaleColor = new SolidColorBrush(Colors.LightGray);
                    chart4.LineColor1 = ChartColor.brush[0];
                    chart4.LineColor2 = ChartColor.brush[1];
                    chart4.LineColor3 = ChartColor.brush[2];
                    chart4.Width = 630;
                    chart4.Height = 130;
                    chart4.Margin = new Thickness(120, 430, 0, 0);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 480;
                    line.Y2 = 480;
                    line.Stroke = ChartColor.brush[0];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "旋转右";
                    vt.Margin = new Thickness(50, 455, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                     vt = new TextBlock();
                    vt.Inlines.Add(new Italic(new Run(RotationLeft.IntervalValue + "s")));
                    vt.Margin = new Thickness(400, 558, 0, 0);
                    vt.FontSize = 14;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(750, 558, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("T")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Margin = new Thickness(105, 430, 0, 0);
                    vt.FontSize = 14;
                    vt.Inlines.Add(new Italic(new Run("N")));
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "测试1";
                    vt.Margin = new Thickness(82, 472, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 500;
                    line.Y2 = 500;
                    line.Stroke = ChartColor.brush[1];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试2";
                    vt.Margin = new Thickness(82, 492, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    line = new Line();
                    line.X1 = 35;
                    line.X2 = 80;
                    line.Y1 = 520;
                    line.Y2 = 520;
                    line.Stroke = ChartColor.brush[2];
                    line.StrokeThickness = 2.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    vt = new TextBlock();
                    vt.Text = "测试3";
                    vt.Margin = new Thickness(82, 512, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion
                    #endregion

                    #region 添加折线图

                    #region 旋转力量左
                    if (RotationLeftList.Count > 0)
                    {
                        List<double> point = null;
                        List<double> point2 = null;
                        List<double> point3 = null;
                        double maxValue=0;

                        for (int c = 0; c < RotationLeftList.Count; c++)
                        {
                            EvaluteDetail myLine = RotationLeftList[c];
                            string[] ypoint = myLine.Record2.Split('|');

                            
                            for (int i = 0; i < ypoint.Count(); i++)
                            {
                                maxValue = MavValue(decimal.Parse(ypoint[i]));
                            }
                           
                            if (c == 0)
                            {
                                point = SetPint(point, ypoint);
                            }
                            else if (c == 1)
                            {
                                point2 = SetPint(point2, ypoint);
                            }
                            else
                            {
                                point3 = SetPint(point3, ypoint);
                            }
                        }
                        chart3.Maxarc = maxValue;
                        chart3.Point1 = point;
                        chart3.Point2 = point2;
                        chart3.Point3 = point3;
                        curPage.Children.Add(chart3);
                    }
                    #endregion

                    #region 旋转力量右
                    if (RotationRigthList.Count > 0)
                    {
                        List<double> point = null;
                        List<double> point2 = null;
                        List<double> point3 = null;
                        double maxValue = 0;
                        for (int c = 0; c < RotationRigthList.Count; c++)
                        {
                            EvaluteDetail myLine = RotationRigthList[c];
                            string[] ypoint = myLine.Record2.Split('|');
                            for (int i = 0; i < ypoint.Count(); i++)
                            {
                                maxValue = MavValue(decimal.Parse(ypoint[i]));
                            }
                            if (c == 0)
                            {
                                point = SetPint(point, ypoint);

                            }
                            else if (c == 1)
                            {
                                point2 = SetPint(point2, ypoint);

                            }
                            else
                            {
                                point3 = SetPint(point3, ypoint);
                            }
                        }
                        chart4.Maxarc = maxValue;
                        chart4.Point1 = point;
                        chart4.Point2 = point2;
                        chart4.Point3 = point3;
                        curPage.Children.Add(chart4);
                    }
                    #endregion

                    #endregion

                    #endregion

                    #region 关节活动度
                    vt = new TextBlock();
                    vt.Text = "二、关节活动度";
                    vt.Margin = new Thickness(45, 580, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    #region 表格四

                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 600;
                    line.Y2 = 600;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 30;
                    line.Y1 = 600;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //右边框
                    line = new Line();
                    line.X1 = 770;
                    line.X2 = 770;
                    line.Y1 = 600;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //下边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 800;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 表格线

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 450;
                    line.Y1 = 650;
                    line.Y2 = 650;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 450;
                    line.Y1 = 700;
                    line.Y2 = 700;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 170;
                    line.X2 = 170;
                    line.Y1 = 600;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 310;
                    line.X2 = 310;
                    line.Y1 = 600;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 450;
                    line.X2 = 450;
                    line.Y1 = 600;
                    line.Y2 = 800;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 标题
                    vt = new TextBlock();
                    vt.Text = "最大活动范围";
                    vt.Margin = new Thickness(45, 625, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = "实际值";
                    vt.Margin = new Thickness(45, 665, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准值";
                    vt.Margin = new Thickness(45, 715, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = "前屈";
                    vt.Margin = new Thickness(220, 625, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "后伸";
                    vt.Margin = new Thickness(360, 625, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    #endregion

                    #region 图表

                    MyChart chart5 = new MyChart();
                    chart5.DataPointWidth = 12;
                    chart5.AnimationEnabled = false;
                    //chart5 = GetPng(chart5, RenderAs.Column);
                    chart5.Width = 300;
                    chart5.Height = 180;
                   
                    Axis yAxis = new Axis();
                    yAxis.Title = "";
                    chart5.AxesY.Add(yAxis);

                    Axis xaxis5 = new Axis();
                    AxisLabels xal5 = new AxisLabels
                    {
                        Enabled = true,
                        Angle = -45
                    };
                    xaxis5.AxisLabels = xal5;
                    //xaxis5.Enabled = false;
                    chart5.AxesX.Add(xaxis5);
                    SetTitle(chart5, "");

                    DataSeries dataSeries5 = new DataSeries();
                    dataSeries5.RenderAs = RenderAs.Column;
                    if (MaxProtrusive.HasValue)
                    {
                        dataSeries5.DataPoints.Add(new DataPoint
                        {
                            AxisXLabel = "前屈",
                            YValue = Convert.ToDouble(MaxProtrusive.Value)
                        });
                    }
                    if (MaxBend.HasValue)
                    {
                        dataSeries5.DataPoints.Add(new DataPoint
                        {
                            AxisXLabel = "后伸",
                            YValue = Convert.ToDouble(MaxBend.Value)
                        });
                    }

                    chart5.Rendered += new EventHandler(c_Rendered);
                    chart5.Margin = new Thickness(460, 610, 0, 0);
                    chart5.Series.Add(dataSeries5);
                    curPage.Children.Add(chart5);
                    #endregion

                    #region 数据

                    vt = new TextBlock();
                    if (MaxProtrusive.HasValue)
                    {
                        vt.Text = MaxProtrusive.Value.ToString();
                    }
                    vt.Margin = new Thickness(220, 665, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "";//标准值
                    vt.Margin = new Thickness(220, 715, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    if (MaxBend.HasValue)
                    {
                        vt.Text = MaxBend.Value.ToString();
                    }
                    vt.Margin = new Thickness(360, 665, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "";
                    vt.Margin = new Thickness(360, 715, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #endregion

                    #region 表格五

                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 820;
                    line.Y2 = 820;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //左边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 30;
                    line.Y1 = 820;
                    line.Y2 = 1070;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //右边框
                    line = new Line();
                    line.X1 = 770;
                    line.X2 = 770;
                    line.Y1 = 820;
                    line.Y2 = 1070;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    //下边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 1070;
                    line.Y2 = 1070;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    #endregion

                    #region 表格线

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 450;
                    line.Y1 = 900;
                    line.Y2 = 900;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 450;
                    line.Y1 = 935;
                    line.Y2 = 935;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 450;
                    line.Y1 = 1035;
                    line.Y2 = 1035;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 170;
                    line.X2 = 450;
                    line.Y1 = 860;
                    line.Y2 = 860;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    line = new Line();
                    line.X1 = 170;
                    line.X2 = 170;
                    line.Y1 = 820;
                    line.Y2 = 1070;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 310;
                    line.X2 = 310;
                    line.Y1 = 860;
                    line.Y2 = 1035;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);

                    line = new Line();
                    line.X1 = 450;
                    line.X2 = 450;
                    line.Y1 = 820;
                    line.Y2 = 1070;
                    line.Stroke = Brushes.Black;
                    line.StrokeThickness = 0.5;
                    line.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    line.Margin = new System.Windows.Thickness(0.5);
                    curPage.Children.Add(line);


                    #endregion

                    #region 标题

                    vt = new TextBlock();
                    vt.Text = "最大活动范围";
                    vt.Margin = new Thickness(45, 855, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "实际值";
                    vt.Margin = new Thickness(45, 915, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "标准值";
                    vt.Margin = new Thickness(45, 945, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "双侧对比(%)";
                    vt.Margin = new Thickness(45, 1045, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                    vt.Text = "旋转";
                    vt.Margin = new Thickness(300, 835, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "左";
                    vt.Margin = new Thickness(230, 870, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "右";
                    vt.Margin = new Thickness(370, 870, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #region 图表

                    MyChart chart6 = new MyChart();
                    //chart6 = GetPng(chart6, RenderAs.Column);
                    chart6.DataPointWidth = 12;
                    chart6.AnimationEnabled = false;
                    chart6.Width = 300;
                    chart6.Height = 210;
                    Axis xaxis6 = new Axis();
                    AxisLabels xal6 = new AxisLabels
                    {
                        Enabled = true,
                        Angle = -45
                    };
                    xaxis6.AxisLabels = xal6;
                    //xaxis6.Enabled = false;
                    chart6.AxesX.Add(xaxis6);
                    SetTitle(chart6, "");

                    DataSeries dataSeries = new DataSeries();
                    dataSeries.RenderAs = RenderAs.Column;
                    if (MaxRotationLeft.HasValue)
                    {
                        dataSeries.DataPoints.Add(new DataPoint
                        {
                            AxisXLabel = "左",
                            YValue =Convert.ToDouble(MaxRotationLeft.Value)
                        });
                    }
                    if (MaxRotationRight.HasValue)
                    {
                        dataSeries.DataPoints.Add(new DataPoint
                        {
                            AxisXLabel = "右",
                            YValue = Convert.ToDouble(MaxRotationRight.Value)
                        });
                    }

                    chart6.Rendered += new EventHandler(c_Rendered);
                    chart6.Margin =new Thickness(460, 840, 0, 0);
                    chart6.Series.Add(dataSeries);
                    curPage.Children.Add(chart6);
                
                    #endregion

                    #region 数据
                    vt = new TextBlock();
                    if (MaxRotationLeft.HasValue)
                    {
                        vt.Text = MaxRotationLeft.Value.ToString();
                    }
                    vt.Margin = new Thickness(230, 915, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (MaxRotationRight.HasValue)
                    {
                        vt.Text = MaxRotationRight.Value.ToString();
                    }
                    vt.Margin = new Thickness(370, 915, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);


                    vt = new TextBlock();
                   
                    vt.Margin = new Thickness(230, 1045, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    if (!MaxRotationRight.HasValue || !MaxRotationLeft.HasValue)
                    {
                        vt.Text = "0";
                    }
                    else
                    {
                        if (MaxRotationRight.Value > MaxRotationLeft.Value)
                        {
                            vt.Text = Math.Round((MaxRotationLeft.Value/MaxRotationRight.Value)*100,2).ToString();
                        }
                        else
                        {
                            vt.Text = Math.Round((MaxRotationRight.Value / MaxRotationLeft.Value)*100, 2).ToString();
                        }
                    }
                    
                    vt.Margin = new Thickness(230, 1045, 0, 0);
                    vt.FontSize = 12;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);
                    #endregion

                    #endregion

                    #endregion
                }
            }
            #endregion
            #endregion

            #endregion
            mydocument = LoadPrint(vpages, pageSize);
        }
        private void CreateImage()
        {
            if (cbMode.SelectedItem == null || ((ComboBoxItem)cbMode.SelectedItem).Tag.ToString() == "0")
            {
                spImage.Children.Clear();
            }
            else
            {
                int currentActionId = Convert.ToInt32(((ComboBoxItem)cbMode.SelectedItem).Tag);

                //折线图
                Chart chart1 = new Chart();
                chart1.DataPointWidth = 2;
                chart1.Width = 650;
                chart1.Height = 200;
                Axis xaxis1 = new Axis();
                AxisLabels xal1 = new AxisLabels
                {

                    Enabled = true,

                    Angle = -45
                };
                xaxis1.AxisLabels = xal1;
                chart1.AxesX.Add(xaxis1);
                SetTitle(chart1, EnumHelper.GetEnumItemName(currentActionId, typeof(EvaluateActionEnum)));
                chart1.Rendered += new EventHandler(c_Rendered);


                //绑定数据
                var allData = (from od in MySession.Query<EvaluteDetail>()
                               where od.PatientID == ModuleConstant.PatientId && od.ActionId == currentActionId
                               select od).ToList();

                allData = (from od in allData
                           where (from o in TestList select o.DayTime).Contains(GetDate(od.EvaluteDetailDate))
                           select od).ToList();

                //SetDataPoints(chart1, allData, EvaluateActionEnum.RangeProtrusive, "前曲范围");
                //SetDataPoints(chart1, allData, EvaluateActionEnum.RangeBend, "后伸范围");
                //SetDataPoints(chart1, allData, EvaluateActionEnum.RotationRangeLeft, "旋转左范围");
                //SetDataPoints(chart1, allData, EvaluateActionEnum.RotationRangeRight, "旋转右范围");
                SetDataPoints(chart1, allData, (EvaluateActionEnum)currentActionId, EnumHelper.GetEnumItemName(currentActionId, typeof(EvaluateActionEnum)));

                spImage.Children.Clear();
                spImage.Children.Add(chart1);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Creates the visual element for the Axis
        /// </summary>
        /// <param name="Chart">Chart</param>
        internal void CreateVisualObject(Chart Chart)
        {
            if (AxisLabels == null)
            {   
                AxisLabels = new AxisLabels() { IsDefault = true };
                AddAxisLabelsIntoRootElement();
            }

            IsNotificationEnable = false;
            AxisLabels.IsNotificationEnable = false;
            AxisLabels.Chart = Chart;

            if (!Double.IsNaN(ClosestPlotDistance) && !Chart.ChartArea.IsAutoCalculatedScrollBarScale && Chart.IsScrollingActivated)
                throw new ArgumentException(" ScrollBarScale property and ClosestPlotDistance property in Axis cannot be set together.");

            if (AxisRepresentation == AxisRepresentations.AxisX)
                AxisLabels.ApplyStyleFromTheme(Chart, "AxisXLabels");
            else if (AxisRepresentation == AxisRepresentations.AxisY)
                AxisLabels.ApplyStyleFromTheme(Chart, "AxisYLabels");

            foreach (CustomAxisLabels customLabels in CustomAxisLabels)
            {   
                customLabels.Chart = Chart;

                if (AxisRepresentation == AxisRepresentations.AxisX)
                    customLabels.ApplyStyleFromTheme(Chart, "CustomAxisXLabels");
                else if (AxisRepresentation == AxisRepresentations.AxisY)
                    customLabels.ApplyStyleFromTheme(Chart, "CustomAxisYLabels");
            }

            if (Chart.PlotDetails.ChartOrientation != ChartOrientationType.Circular)
            {   
                // Create visual elements
                Visual = new StackPanel() { Background = InternalBackground };

                AxisElementsContainer = new StackPanel();
                InternalStackPanel = new Canvas();
                ScrollViewerElement = new Canvas();

                if (!String.IsNullOrEmpty(this.Title))
                {
                    AxisTitleElement = new Title();
                    ApplyTitleProperties();
                }
                else
                    AxisTitleElement = null;

                ApplyVisualProperty();

                SetUpAxisManager();
                SetUpTicks();
                SetUpGrids();
                SetUpAxisLabels();
                SetUpCustomAxisLabels();

                // set the placement order based on the axis orientation
                switch (AxisOrientation)
                {
                    case AxisOrientation.Horizontal:
                        ApplyHorizontalAxisSettings();
                        _zeroBaseLinePixPosition = Graphics.ValueToPixelPosition(0, Width, InternalAxisMinimum, InternalAxisMaximum, 0);

                        break;

                    case AxisOrientation.Vertical:
                        ApplyVerticalAxisSettings();
                        _zeroBaseLinePixPosition = Height - Graphics.ValueToPixelPosition(0, Height, InternalAxisMinimum, InternalAxisMaximum, 0);

                        break;
                }

                IsNotificationEnable = true;
                AxisLabels.IsNotificationEnable = true;

                if (!(Boolean)this.Enabled)
                {
                    Visual.Visibility = Visibility.Collapsed;
                }

                AttachEventForZoomBar();
            }
            else
            {
                CreateAxesForCircularChart();   
            }
        }