Пример #1
0
    private FixedPage CreateFifthPageContent()
    {
      //PageContent pageContent = new PageContent();
      FixedPage fixedPage = new FixedPage();
      UIElement visual = BuildDrawing(); // CreateThirdVisual(false);

      FixedPage.SetLeft(visual, 0);
      FixedPage.SetTop(visual, 0);

      double pageWidth = 96 * 8.5;
      double pageHeight = 96 * 11;

      fixedPage.Width = pageWidth;
      fixedPage.Height = pageHeight;

      fixedPage.Children.Add((UIElement)visual);

      Size sz = new Size(8.5 * 96, 11 * 96);
      fixedPage.Measure(sz);
      fixedPage.Arrange(new Rect(new Point(), sz));
      fixedPage.UpdateLayout();

      //((IAddChild)pageContent).AddChild(fixedPage);
      return fixedPage;
    }
Пример #2
0
        private PageContent CreatePawnTicketContent()
        {
            PageContent pageContent = new PageContent();
            FixedPage fixedPage = new FixedPage();
            UIElement visual = PawnTicketUIElement();

            FixedPage.SetLeft(visual, 0);
            FixedPage.SetTop(visual, 0);

            double pageWidth = 96 * 8.5;
            double pageHeight = 96 * 11;

            fixedPage.Width = pageWidth;
            fixedPage.Height = pageHeight;

            fixedPage.Children.Add((UIElement)visual);

            Size sz = new Size(8.5 * 96, 11 * 96);
            fixedPage.Measure(sz);
            fixedPage.Arrange(new Rect(new Point(), sz));
            fixedPage.UpdateLayout();

            ((IAddChild)pageContent).AddChild(fixedPage);
            return pageContent;
        }
Пример #3
0
        public void Create()
        {
            var uri    = new Uri("pack://application:,,,/ypi_client_order.xps");
            var stream = System.Windows.Application.GetResourceStream(uri).Stream;

            System.IO.Packaging.Package package1 = System.IO.Packaging.Package.Open(stream);
            System.IO.Packaging.PackageStore.AddPackage(uri, package1);
            var xpsDoc = new XpsDocument(package1, System.IO.Packaging.CompressionOption.Maximum, uri.AbsoluteUri);
            var fixedDocumentSequenceO = xpsDoc.GetFixedDocumentSequence();

            MemoryStream xpsStream       = new MemoryStream();
            Package      package2        = Package.Open(xpsStream, FileMode.Create);
            string       memoryStreamUri = "memorystream://printstream";
            Uri          packageUri      = new Uri(memoryStreamUri);

            PackageStore.AddPackage(packageUri, package2);
            XpsDocument       doc    = new XpsDocument(package2, CompressionOption.Fast, memoryStreamUri);
            XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(doc);

            System.Windows.Documents.Serialization.SerializerWriterCollator vxpsd = writer.CreateVisualsCollator();
            int pageno = 1;

            foreach (System.Windows.Documents.DocumentReference r in fixedDocumentSequenceO.References)
            {
                System.Windows.Documents.FixedDocument d = r.GetDocument(false);
                foreach (System.Windows.Documents.PageContent pc in d.Pages)
                {
                    System.Windows.Documents.FixedPage fixedPage = pc.GetPageRoot(false);
                    double width           = fixedPage.Width;
                    double height          = fixedPage.Height;
                    System.Windows.Size sz = new System.Windows.Size(width, height);
                    fixedPage.Measure(sz);
                    fixedPage.Arrange(new System.Windows.Rect(new System.Windows.Point(), sz));
                    fixedPage.UpdateLayout();
                    ContainerVisual newpage = new ContainerVisual();
                    newpage.Children.Add(fixedPage);
                    newpage.Children.Add(CreateWatermark(400, 400, "hello world"));
                    pageno++;
                    vxpsd.Write(newpage);

                    //PackageStore.RemovePackage(packageUri);
                    //doc.Close();
                }
            }

            doc.Close();
            xpsStream.Position = 0;
            Package     finalPackage          = Package.Open(xpsStream, FileMode.Open);
            XpsDocument finalDoc              = new XpsDocument(finalPackage, CompressionOption.Fast, memoryStreamUri);
            var         fixedDocumentSequence = xpsDoc.GetFixedDocumentSequence();
        }
Пример #4
0
        private void Xps_Click(object sender, RoutedEventArgs e)
        {
            FixedPage page = new FixedPage() { Background = Brushes.White, Width = Dpi * PaperWidth, Height = Dpi * PaperHeight };

            TextBlock tbTitle = new TextBlock { Text = "My InkCanvas Sketch", FontSize = 24, FontFamily = new FontFamily("Arial") };
            FixedPage.SetLeft(tbTitle, Dpi * 0.75);
            FixedPage.SetTop(tbTitle, Dpi * 0.75);
            page.Children.Add((UIElement)tbTitle);

            var toPrint = myInkCanvasBorder;
            myGrid.Children.Remove(myInkCanvasBorder);

            FixedPage.SetLeft(toPrint, Dpi * 2);
            FixedPage.SetTop(toPrint, Dpi * 2);
            page.Children.Add(toPrint);

            Size sz = new Size(Dpi * PaperWidth, Dpi * PaperHeight);
            page.Measure(sz);
            page.Arrange(new Rect(new Point(), sz));
            page.UpdateLayout();

            var filepath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "PrintingTest");
            if (!File.Exists(filepath))
                Directory.CreateDirectory(filepath);
            var filename = System.IO.Path.Combine(filepath, "myXpsFile.xps");

            FixedDocument doc = new FixedDocument();

            PageContent pageContent = new PageContent();
            ((System.Windows.Markup.IAddChild)pageContent).AddChild(page);
            doc.Pages.Add(pageContent);

            XpsDocument xpsd = new XpsDocument(filename, FileAccess.Write);
            XpsDocument.CreateXpsDocumentWriter(xpsd).Write(doc);               //requires System.Printing namespace

            xpsd.Close();

            PrintDialog printDialog = new PrintDialog();
            if (printDialog.ShowDialog() == true)
                printDialog.PrintQueue.AddJob("MyInkCanvas print job", filename, true);

            page.Children.Remove(toPrint);
            myGrid.Children.Add(toPrint);
        }
        // Token: 0x06002CBD RID: 11453 RVA: 0x000C9BA4 File Offset: 0x000C7DA4
        internal DocumentPage GetPage(int pageNumber)
        {
            if (pageNumber < 0)
            {
                throw new ArgumentOutOfRangeException("pageNumber", SR.Get("IDPNegativePageNumber"));
            }
            if (pageNumber >= this.Pages.Count)
            {
                return(DocumentPage.Missing);
            }
            FixedPage fixedPage = this.SyncGetPage(pageNumber, false);

            if (fixedPage == null)
            {
                return(DocumentPage.Missing);
            }
            Size size = this.ComputePageSize(fixedPage);
            FixedDocumentPage result = new FixedDocumentPage(this, fixedPage, size, pageNumber);

            fixedPage.Measure(size);
            fixedPage.Arrange(new Rect(default(Point), size));
            return(result);
        }
Пример #6
0
        public static void DoItTTT()
        {
            string filename    = "c:\\tmp\\goof.xps";
            string newFilename = "c:\\tmp\\new_goof.xps";

            XpsDocument xpsOld = new XpsDocument(filename, System.IO.FileAccess.Read);

            System.Windows.Documents.FixedDocumentSequence seqOld = xpsOld.GetFixedDocumentSequence();
            System.IO.Packaging.Package container = System.IO.Packaging.Package.Open(newFilename, System.IO.FileMode.Create);
            XpsDocumentWriter           writer    = XpsDocument.CreateXpsDocumentWriter(new XpsDocument(container));

            System.Windows.Documents.Serialization.SerializerWriterCollator vxpsd = writer.CreateVisualsCollator();
            int pageno = 1;

            foreach (System.Windows.Documents.DocumentReference r in seqOld.References)
            {
                System.Windows.Documents.FixedDocument d = r.GetDocument(false);
                foreach (System.Windows.Documents.PageContent pc in d.Pages)
                {
                    System.Windows.Documents.FixedPage fixedPage = pc.GetPageRoot(false);
                    double width           = fixedPage.Width;
                    double height          = fixedPage.Height;
                    System.Windows.Size sz = new System.Windows.Size(width, height);
                    fixedPage.Measure(sz);
                    fixedPage.Arrange(new System.Windows.Rect(new System.Windows.Point(), sz));
                    fixedPage.UpdateLayout();
                    ContainerVisual newpage = new ContainerVisual();
                    newpage.Children.Add(fixedPage);
                    newpage.Children.Add(CreateWatermark(400, 400, "hello world"));
                    pageno++;
                    vxpsd.Write(newpage);
                }
            }
            vxpsd.EndBatchWrite();
            container.Close();
            xpsOld.Close();
        }
        private void PrintDocument()
        {
            FixedDocument fixedDocument = new FixedDocument();
            fixedDocument.DocumentPaginator.PageSize = new Size(96 * 8.5, 96 * 11);

            foreach (BitmapSource bitmapSource in this.m_BitmapSourceList)
            {
                PageContent pageContent = new PageContent();

                FixedPage fixedPage = new FixedPage();
                fixedPage.Background = Brushes.White;
                fixedPage.Width = 96 * 8.5;
                fixedPage.Height = 96 * 11;

                Image image = new Image();
                image.Width = 96 * 8;
                image.Height = 96 * 10.5;
                image.Source = bitmapSource;

                FixedPage.SetLeft(image, 96 * .25);
                FixedPage.SetTop(image, 96 * .25);
                fixedPage.Children.Add((UIElement)image);

                ((IAddChild)pageContent).AddChild(fixedPage);
                fixedDocument.Pages.Add(pageContent);

                Size pageSize = new Size(96 * 8.5, 96 * 11);
                fixedPage.Measure(pageSize);
                fixedPage.Arrange(new Rect(new Point(), pageSize));
                fixedPage.UpdateLayout();
            }

            PrintDialog printDialog = new PrintDialog();
            printDialog.ShowDialog();
            printDialog.PrintDocument(fixedDocument.DocumentPaginator, "Print TIF Document");
        }
		public static void ArrangePage(Size pageSize, FixedPage page)
		{
			page.Measure(pageSize);
			page.Arrange(new Rect(new System.Windows.Point(), pageSize));
			page.UpdateLayout();
		}
Пример #9
0
        /// <summary>
        /// Called when the Ddl property has changed.
        /// </summary>
        void DdlUpdated()
        {
            if (_ddl != null)
            {
                _document = DdlReader.DocumentFromString(_ddl);
                _renderer = new DocumentRenderer(_document);

                //this.renderer.PrivateFonts = this.privateFonts;
                _renderer.PrepareDocument();

                //IDocumentPaginatorSource source = this.documentViewer.Document;

                //IDocumentPaginatorSource source = this.documentViewer.Document;

                int pageCount = _renderer.FormattedDocument.PageCount;
                if (pageCount == 0)
                    return;

                // HACK: hardcoded A4 size
                //double pageWidth = XUnit.FromMillimeter(210).Presentation;
                //double pageHeight = XUnit.FromMillimeter(297).Presentation;
                //Size a4 = new Size(pageWidth, pageHeight);

                XUnit pageWidth, pageHeight;
                Size size96 = GetSizeOfPage(1, out pageWidth, out pageHeight);

                FixedDocument fixedDocument = new FixedDocument();
                fixedDocument.DocumentPaginator.PageSize = size96;

                for (int pageNumber = 1; pageNumber <= pageCount; pageNumber++)
                {
                    try
                    {
                        size96 = GetSizeOfPage(1, out pageWidth, out pageHeight);

                        DrawingVisual dv = new DrawingVisual();
                        DrawingContext dc = dv.RenderOpen();
                        //XGraphics gfx = XGraphics.FromDrawingContext(dc, new XSize(XUnit.FromMillimeter(210).Point, XUnit.FromMillimeter(297).Point), XGraphicsUnit.Point);
                        XGraphics gfx = XGraphics.FromDrawingContext(dc, new XSize(pageWidth.Point, pageHeight.Presentation), XGraphicsUnit.Point);
                        _renderer.RenderPage(gfx, pageNumber, PageRenderOptions.All);
                        dc.Close();

                        // Create page content
                        PageContent pageContent = new PageContent();
                        pageContent.Width = size96.Width;
                        pageContent.Height = size96.Height;
                        FixedPage fixedPage = new FixedPage();
                        fixedPage.Background = new SolidColorBrush(System.Windows.Media.Color.FromRgb(0xFE, 0xFE, 0xFE));

                        UIElement visual = new DrawingVisualPresenter(dv);
                        FixedPage.SetLeft(visual, 0);
                        FixedPage.SetTop(visual, 0);

                        fixedPage.Width = size96.Width;
                        fixedPage.Height = size96.Height;

                        fixedPage.Children.Add(visual);

                        fixedPage.Measure(size96);
                        fixedPage.Arrange(new Rect(new Point(), size96));
                        fixedPage.UpdateLayout();

                        ((IAddChild)pageContent).AddChild(fixedPage);

                        fixedDocument.Pages.Add(pageContent);
                    }
                    catch (Exception)
                    {
                        // eat exception
                    }

                    viewer.Document = fixedDocument;
                }
            }
            else
                viewer.Document = null;
        }
        //*************************************************************************
        //  Method: SaveToXps()
        //
        /// <summary>
        /// Saves the graph to the specified XPS file.
        /// </summary>
        ///
        /// <param name="imageSize">
        /// Size of the XPS image, in WPS units.
        /// </param>
        ///
        /// <param name="fileName">
        /// File name to save to.
        /// </param>
        ///
        /// <remarks>
        /// This could conceivably be put in the base-class NodeXLControl class,
        /// but that would force all users of the control to add references to the
        /// XPS assemblies.
        /// </remarks>
        //*************************************************************************
        public void SaveToXps(
            Size imageSize,
            String fileName
            )
        {
            Debug.Assert( !String.IsNullOrEmpty(fileName) );
            AssertValid();

            CheckIfLayingOutGraph("SaveToXps");

            // This control will be rehosted by a FixedPage.  It can't be a child
            // of logical trees, so disconnect it from its parent after saving the
            // current vertex locations.

            LayoutSaver oLayoutSaver = new LayoutSaver(this.Graph);

            Debug.Assert(this.Parent is Panel);
            Panel oParentPanel = (Panel)this.Parent;
            UIElementCollection oParentChildren = oParentPanel.Children;
            Int32 iChildIndex = oParentChildren.IndexOf(this);
            oParentChildren.Remove(this);

            GraphImageCenterer oGraphImageCenterer = new GraphImageCenterer(this);

            FixedDocument oFixedDocument = new FixedDocument();
            oFixedDocument.DocumentPaginator.PageSize = imageSize;
            PageContent oPageContent = new PageContent();

            FixedPage oFixedPage = new FixedPage();
            oFixedPage.Width = imageSize.Width;
            oFixedPage.Height = imageSize.Height;

            this.Width = imageSize.Width;
            this.Height = imageSize.Height;

            // Adjust the control's translate transforms so that the image will be
            // centered on the same point on the graph that the control is centered
            // on.

            oGraphImageCenterer.CenterGraphImage(imageSize);

            oFixedPage.Children.Add(this);
            oFixedPage.Measure(imageSize);

            oFixedPage.Arrange(new System.Windows.Rect(
            new System.Windows.Point(), imageSize) );

            oFixedPage.UpdateLayout();

            ( (System.Windows.Markup.IAddChild)oPageContent ).AddChild(
            oFixedPage);

            oFixedDocument.Pages.Add(oPageContent);

            try
            {
            XpsDocument oXpsDocument = new XpsDocument(fileName,
                FileAccess.Write);

            XpsDocumentWriter oXpsDocumentWriter =
                XpsDocument.CreateXpsDocumentWriter(oXpsDocument);

            oXpsDocumentWriter.Write(oFixedDocument);
            oXpsDocument.Close();
            }
            finally
            {
            // Reconnect the NodeXLControl to its original parent.  Reset the
            // size to Auto in the process.

            oFixedPage.Children.Remove(this);
            this.Width = Double.NaN;
            this.Height = Double.NaN;
            oGraphImageCenterer.RestoreCenter();
            oParentChildren.Insert(iChildIndex, this);

            // The graph may have shrunk when it was connected to the
            // FixedPage, and even though it will be expanded to its original
            // dimensions when UpdateLayout() is called below, the layout may
            // have lost "resolution" and the results may be poor.
            //
            // Fix this by restoring the original layout and redrawing the
            // graph.

            this.UpdateLayout();
            oLayoutSaver.RestoreLayout();
            this.DrawGraph(false);
            }
        }
Пример #11
0
    /// <summary>
    /// Renders the current visual as a FixedPage and save it as XPS file.
    /// </summary>
    public void SaveXps()
    {
      XpsDocument xpsDocument = new XpsDocument(Path.Combine(OutputDirectory, Name + ".xps"), FileAccess.ReadWrite);
      PageContent pageContent = new PageContent();

      FixedPage fixedPage = new FixedPage();
      fixedPage.Width = WidthInPU;
      fixedPage.Height = HeightInPU;
      fixedPage.Background = Brushes.Transparent;

      // Visuals needs a UIElement as drawing container
      VisualPresenter presenter = new VisualPresenter();
      presenter.AddVisual(this.visual);

      FixedPage.SetLeft(presenter, 0);
      FixedPage.SetTop(presenter, 0);
      fixedPage.Children.Add(presenter);

      // Perform layout
      Size size = new Size(WidthInPU, HeightInPU);
      fixedPage.Measure(size);
      fixedPage.Arrange(new Rect(new Point(), size));
      fixedPage.UpdateLayout();

      ((IAddChild)pageContent).AddChild(fixedPage);

      FixedDocument fixedDocument = new FixedDocument();
      fixedDocument.DocumentPaginator.PageSize = size;
      fixedDocument.Pages.Add(pageContent);

      // Save as XPS file
      XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsDocument);
      xpsWriter.Write(fixedDocument);
      xpsDocument.Close();

      // Must call at least two times GC.Collect this to get access to the xps file even I write synchronously. This is a bug in WPF.
      // Vista 64 .NET 3.5 SP1 installed
      xpsDocument = null;
      xpsWriter = null;
      GC.Collect(10, GCCollectionMode.Forced);
      GC.Collect(10, GCCollectionMode.Forced);
      //GC.Collect(10, GCCollectionMode.Forced);
      //GC.Collect(10, GCCollectionMode.Forced);
    }
Пример #12
0
    internal void OnRender()
    {
      if (RenderEvent != null)
      {
        //IDocumentPaginatorSource source = this.documentViewer.Document;

        DrawingVisual dv = new DrawingVisual();
        DrawingContext dc = dv.RenderOpen();

        XGraphics gfx = XGraphics.FromDrawingContext(dc,
          new XSize(XUnit.FromMillimeter(210).Point, XUnit.FromMillimeter(297).Point), XGraphicsUnit.Point);
        try
        {
          RenderEvent(gfx);
        }
        catch { }
        dc.Close();
        //DrawingGroup dg = dv.Drawing;

        // Create page content
        PageContent pageContent = new PageContent();
        FixedPage fixedPage = new FixedPage();
        fixedPage.Background = Brushes.GhostWhite;
        //UIElement visual = dv; // CreateSecondVisual(false);

        UIElement visual = new DrawingVisualPresenter(dv);
        FixedPage.SetLeft(visual, 0);
        FixedPage.SetTop(visual, 0);

        double pageWidth = XUnit.FromMillimeter(210).Presentation;
        double pageHeight = XUnit.FromMillimeter(297).Presentation;

        fixedPage.Width = pageWidth;
        fixedPage.Height = pageHeight;

        fixedPage.Children.Add((UIElement)visual);

        Size size = new Size(pageWidth, pageHeight);
        fixedPage.Measure(size);
        fixedPage.Arrange(new Rect(new Point(), size));
        fixedPage.UpdateLayout();

        ((IAddChild)pageContent).AddChild(fixedPage);

        FixedDocument fixedDocument = new FixedDocument();
        fixedDocument.DocumentPaginator.PageSize = size;

        fixedDocument.Pages.Add(pageContent);

        this.documentViewer.Document = fixedDocument;

        string savedButton = System.Windows.Markup.XamlWriter.Save(fixedDocument);
      }
      else
        this.documentViewer.Document = null;



      //base.OnRender(drawingContext);
      ////drawingContext.DrawLine(new Pen(Brushes.Green, 10), new Point(10, 10), new Point(100, 150));

      //drawingContext.PushTransform(new ScaleTransform(0.75, 0.75));
      //XGraphics gfx = XGraphics.FromDrawingContext(drawingContext, new XSize(100, 100), XGraphicsUnit.Millimeter);
      //if (RenderEvent != null)
      //{
      //  try
      //  {
      //    RenderEvent(gfx);
      //  }
      //  catch
      //  {
      //    RenderEvent = null;
      //  }
      //}
      //else
      //  Draw(gfx);
    }
Пример #13
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);
        }
Пример #14
0
        /// <summary>
        /// 显示打印内容
        /// </summary>
        private void ShowPrintContent()
        {
            int TotalPageCount = 0; //总页数
            int TotalCount = 0;     //记录总条数

            if (FitResultList.Count > 0)
            {
                TotalCount = FitResultList.Count;
                int indexTemp = 0;
                if (TotalCount > 4)
                {
                    indexTemp = TotalCount - 4;
                    if (indexTemp % 5 == 0)
                    {
                        TotalPageCount = indexTemp / 5 + 1;
                    }
                    else
                    {
                        TotalPageCount = indexTemp / 5 + 2;
                    }
                }
            }
            #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 拼接
          
            double nleft = 20;
            double ntop = 200;

            #region 标题
            TextBlock tbTitle = new TextBlock();
            tbTitle.Text = "评测报告";

            tbTitle.Margin = new Thickness(330,10,0,0);
            tbTitle.FontSize = 34;
            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();
            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(630, 1080, 0, 0);
                vt.FontSize = 20;
                vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                curPage.Children.Add(vt);

                vt = new TextBlock();
                vt.Text = "共" + TotalPageCount + "页";
                vt.Margin = new Thickness(695, 1080, 0, 0);
                vt.FontSize = 20;
                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 = "姓名:" + ModuleConstant.Syspatient.UserName;
                    vt.Margin = new Thickness(45, 80, 0, 0);
                    vt.FontSize = 20;
                    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
                    {
                        vt.Text = "性别:" + ModuleConstant.Syspatient.Sex=="1"?"男":"女";
                    }
                    vt.Margin = new Thickness(45, 115, 0, 0);
                    vt.FontSize = 20;
                    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, 80, 0, 0);
                    vt.FontSize = 20;
                    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(220, 115, 0, 0);
                    vt.FontSize = 20;
                    vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                    vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    curPage.Children.Add(vt);

                    vt = new TextBlock();
                    vt.Text = "打印日期:" + DateTime.Now.ToString("yyyy-MM-dd") ;
                    vt.Margin = new Thickness(560, 215, 0, 0);
                    vt.FontSize = 20;
                    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 = 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 = 250;
                    line.Y2 = 250;
                    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 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 260;
                    line.Y2 = 260;
                    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 = 260;
                    line.Y2 = 1060;
                    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 = 260;
                    line.Y2 = 1060;
                    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 = 1060;
                    line.Y2 = 1060;
                    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 = 460;
                    line.Y2 = 460;
                    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 = 660;
                    line.Y2 = 660;
                    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 = 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 = 150;
                    line.X2 = 150;
                    line.Y1 = 260;
                    line.Y2 = 1060;
                    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 = 460;
                    line.X2 = 460;
                    line.Y1 = 260;
                    line.Y2 = 1060;
                    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 循环添加数据
                    //检测报告共有多少数量
                    int showCount = 0;
                    if (TotalCount > 4)
                    {
                        showCount = 4;
                    }
                    else
                    {
                        showCount = TotalCount;
                    }
                    for (int i = 0; i < 4; i++)
                    {
                           #region 子项分割线
                        line = new Line();
                        line.X1 = 150;
                        line.X2 = 770;
                        line.Y1 = 300 + ntop * i;
                        line.Y2 = 300 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 340 + ntop * i;
                        line.Y2 = 340 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 380 + ntop * i;
                        line.Y2 = 380 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 420 + ntop * i;
                        line.Y2 = 420 + ntop * i;
                        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 = 300;
                        line.X2 = 300;
                        line.Y1 = 300 + ntop * i;
                        line.Y2 = 460 + ntop * i;
                        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 = 620;
                        line.X2 = 620;
                        line.Y1 = 300 + ntop * i;
                        line.Y2 = 460 + ntop * i;
                        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
                    }
                    for (int i = 0; i < showCount; i++)
                    {
                     MyFitResult result=FitResultList[i];
                        #region 日期

                        vt = new TextBlock();
                        vt.Text =Convert.ToDateTime( FitResultList[i].DayTime).ToString("yyyy-MM-dd");// "2015-4-16";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(25, 355 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 标题

                        #region 屈伸
                        vt = new TextBlock();
                        vt.Text = "屈伸";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(240, 268 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 旋转
                        vt = new TextBlock();
                        vt.Text = "旋转";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(560, 268 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈
                        vt = new TextBlock();
                        vt.Text = "前屈";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 305 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈值
                        vt = new TextBlock();
                        vt.Text = result.FrontValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 345 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸
                        vt = new TextBlock();
                        vt.Text = "后伸";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 305 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸值
                        vt = new TextBlock();
                        vt.Text = result.BehindValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 345 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈力量
                        vt = new TextBlock();
                        vt.Text = "前屈力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 385 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈力量值
                        vt = new TextBlock();
                        vt.Text = result.FrontPowerValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 425 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸力量
                        vt = new TextBlock();
                        vt.Text = "后伸力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 385 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸力量值
                        vt = new TextBlock();
                        vt.Text = result.BehindPowerValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 425 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左
                        vt = new TextBlock();
                        vt.Text = "左";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 305 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左值
                        vt = new TextBlock();
                        vt.Text = result.LeftValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 350 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右
                        vt = new TextBlock();
                        vt.Text = "右";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 305 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右值
                        vt = new TextBlock();
                        vt.Text = result.RightValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 350 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左力量
                        vt = new TextBlock();
                        vt.Text = "左力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 385 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = 36;

                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左力量值
                        vt = new TextBlock();
                        vt.Text = result.MaxValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 425 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右力量
                        vt = new TextBlock();
                        vt.Text = "右力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 385 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;

                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右力量值
                        vt = new TextBlock();
                        vt.Text = result.RightValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 425 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #endregion
                    }
                    #endregion

                }
                #region 其它
               
                else
                {
                    #region 显示框
                    //上边框
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 60;
                    line.Y2 = 60;
                    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 = 60;
                    line.Y2 = 1060;
                    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 = 60;
                    line.Y2 = 1060;
                    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 = 1060;
                    line.Y2 = 1060;
                    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 = 260;
                    line.Y2 = 260;
                    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);

                    //第2格
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 460;
                    line.Y2 = 460;
                    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);

                    //第3格
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    line.Y1 = 660;
                    line.Y2 = 660;
                    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);

                    //第4格
                    line = new Line();
                    line.X1 = 30;
                    line.X2 = 770;
                    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 = 150;
                    line.X2 = 150;
                    line.Y1 = 60;
                    line.Y2 = 1060;
                    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 = 460;
                    line.X2 = 460;
                    line.Y1 = 60;
                    line.Y2 = 1060;
                    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 循环添加数据

                    #region 判断数据
                    int showCount = 0;
                    int startIndex = 0;

                    if (5 * (selectIndex - 1) > TotalCount - 4)
                    {
                        showCount = (TotalCount - 4) % 5;
                    }
                    else
                    {
                        showCount = 5;
                    }
                    
                    startIndex = 5 * (selectIndex - 2) + 4;

                    for (int i = 0; i < 5; i++)
                    {
                        #region 子项分割线
                        line = new Line();
                        line.X1 = 150;
                        line.X2 = 770;
                        line.Y1 = 100 + ntop * i;
                        line.Y2 = 100 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 140 + ntop * i;
                        line.Y2 = 140 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 180 + ntop * i;
                        line.Y2 = 180 + ntop * i;
                        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 = 150;
                        line.X2 = 770;
                        line.Y1 = 220 + ntop * i;
                        line.Y2 = 220 + ntop * i;
                        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 = 300;
                        line.X2 = 300;
                        line.Y1 = 100 + ntop * i;
                        line.Y2 = 260 + ntop * i;
                        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 = 620;
                        line.X2 = 620;
                        line.Y1 = 100 + ntop * i;
                        line.Y2 = 260 + ntop * i;
                        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
                    }

                    #endregion
                    //检测报告共有多少数量
                    for (int i = 0; i < showCount; i++)
                    {
                        MyFitResult result = FitResultList[startIndex+i];
                        #region 日期

                        vt = new TextBlock();
                        vt.Text = Convert.ToDateTime(result.DayTime).ToString("yyyy-MM-dd");// "2015-4-16";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(25, 155 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 标题

                        #region 屈伸
                        vt = new TextBlock();
                        vt.Text = "屈伸";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(240, 68 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 旋转
                        vt = new TextBlock();
                        vt.Text = "旋转";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(560, 68 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈
                        vt = new TextBlock();
                        vt.Text = "前屈";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 105 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈值
                        vt = new TextBlock();
                        vt.Text = result.FrontValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 145 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸
                        vt = new TextBlock();
                        vt.Text = "后伸";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 105 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸值
                        vt = new TextBlock();
                        vt.Text = result.BehindValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 145 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈力量
                        vt = new TextBlock();
                        vt.Text = "前屈力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 185 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 前屈力量值
                        vt = new TextBlock();
                        vt.Text = result.FrontPowerValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(165, 225 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸力量
                        vt = new TextBlock();
                        vt.Text = "后伸力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 185 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 后伸力量值
                        vt = new TextBlock();
                        vt.Text = result.BehindPowerValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(317, 225 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左
                        vt = new TextBlock();
                        vt.Text = "左";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 105 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左值
                        vt = new TextBlock();
                        vt.Text = result.LeftValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 150 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右
                        vt = new TextBlock();
                        vt.Text = "右";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 105 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右值
                        vt = new TextBlock();
                        vt.Text = result.RightValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 150 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左力量
                        vt = new TextBlock();
                        vt.Text = "左力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 185 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 左力量值
                        vt = new TextBlock();
                        vt.Text = result.MaxValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(485, 225 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右力量
                        vt = new TextBlock();
                        vt.Text = "右力量";
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 185 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion

                        #region 右力量值
                        vt = new TextBlock();
                        vt.Text = result.RightValue;
                        vt.FontSize = 20;
                        vt.Margin = new System.Windows.Thickness(631, 225 + ntop * i, 0, 0);
                        vt.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                        vt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                        vt.Width = nColWidth;
                        vt.Height = nRowHeight;
                        vt.TextAlignment = System.Windows.TextAlignment.Center;
                        curPage.Children.Add(vt);
                        #endregion
                        #endregion
                    }
                    #endregion 
                }
            }
            #endregion
            #endregion

            #endregion
            mydocument = LoadPrint(vpages, pageSize);
        }