Пример #1
0
        private void ReportItemChage(ReportItem v)
        {
            ReportItem mc;

            mc = v;
            if (mc.Name == "方法名称")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.methodname;
            }

            if (mc.Name == "方法说明")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.methodmemo;
            }

            if (mc.Name == "方法作者")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.methodauthor;
            }

            if (mc.Name == "样品文件名")
            {
                mc.txtresult = GlobeVal.myglobefile.SampleFile;
            }

            if (mc.Name == "样品说明")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.samplememo;
            }
            if (mc.Name == "样品注释1")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.samplememo1;
            }

            if (mc.Name == "样品注释2")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.samplememo2;
            }

            if (mc.Name == "样品注释3")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.samplememo3;
            }

            if (mc.Name == "已试验试样")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.mspecount.ToString();
            }

            if (mc.Name == "最后试验日期")
            {
                mc.txtresult = CComLibrary.GlobeVal.filesave.lasttestdatatime;
            }

            if (mc.Name == "用户名")
            {
                mc.txtresult = GlobeVal.myglobefile.UserName[GlobeVal.myglobefile.CurentUserIndex];
            }

            if (mc.Name == "控制过程")
            {
                string s = "";

                if (CComLibrary.GlobeVal.filesave.mcontrolprocess == 1)
                {
                    s = s + "控制过程:" + "中级测控" + "\r\n";
                }



                CComLibrary.GlobeVal.filesave.InitExplainList();

                for (int i = 0; i < CComLibrary.GlobeVal.filesave.mexplainlist.Count; i++)
                {
                    s = s + "   " + "步骤" + (i + 1).ToString() + " " + CComLibrary.GlobeVal.filesave.mexplainlist[i].explain(Convert.ToInt32(GlobeVal.myglobefile.machinekind)) + "\r\n";
                }

                mc.txtresult = s;
            }
        }
Пример #2
0
        public ReportApp()
        {
            mPagelist = new List <PageSizeF>();
            PageSizeF f = new PageSizeF();

            f.Name = "A4";
            f.size = Spire.Doc.Documents.PageSize.A4;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "A3";
            f.size = Spire.Doc.Documents.PageSize.A3;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "A5";
            f.size = Spire.Doc.Documents.PageSize.A5;
            mPagelist.Add(f);



            f      = new PageSizeF();
            f.Name = "A6";
            f.size = Spire.Doc.Documents.PageSize.A6;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "B4";
            f.size = Spire.Doc.Documents.PageSize.B4;
            mPagelist.Add(f);


            f      = new PageSizeF();
            f.Name = "B5";
            f.size = Spire.Doc.Documents.PageSize.B5;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "B6";
            f.size = Spire.Doc.Documents.PageSize.B6;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "EnvelopeDL";
            f.size = Spire.Doc.Documents.PageSize.EnvelopeDL;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Executive";
            f.size = Spire.Doc.Documents.PageSize.Executive;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Flsa";
            f.size = Spire.Doc.Documents.PageSize.Flsa;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "HalfLetter";
            f.size = Spire.Doc.Documents.PageSize.HalfLetter;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Ledger";
            f.size = Spire.Doc.Documents.PageSize.Ledger;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Legal";
            f.size = Spire.Doc.Documents.PageSize.Legal;
            mPagelist.Add(f);


            f      = new PageSizeF();
            f.Name = "Letter";
            f.size = Spire.Doc.Documents.PageSize.Letter;
            mPagelist.Add(f);


            f      = new PageSizeF();
            f.Name = "Letter11x17";
            f.size = Spire.Doc.Documents.PageSize.Letter11x17;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Note";
            f.size = Spire.Doc.Documents.PageSize.Note;
            mPagelist.Add(f);

            f      = new PageSizeF();
            f.Name = "Quarto";
            f.size = Spire.Doc.Documents.PageSize.Quarto;
            mPagelist.Add(f);



            ReportItem r;

            mreportitemlist = new List <ReportItem>();
            mreportbody     = new List <ReportItem>();
            mreportheader   = new List <ReportItem>();
            mreportfooter   = new List <ReportItem>();

            r      = new ReportItem();
            r.Name = "方法名称";

            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "方法说明";

            r.kind = 0;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "方法作者";
            r.kind = 0;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "样品文件名";
            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "样品说明";

            r.kind = 0;
            mreportitemlist.Add(r);



            r      = new ReportItem();
            r.Name = "样品注释1";
            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "样品注释2";
            r.kind = 0;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "样品注释3";
            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "曲线图1";
            r.kind = 3;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "曲线图2";
            r.kind = 3;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "结果表格1";

            r.kind = 4;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "结果表格2";
            r.kind = 4;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "已试验试样";
            r.kind = 0;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.Name = "最后试验日期";
            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "控制过程";
            r.kind = 0;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "文本";
            r.kind = 1;
            mreportitemlist.Add(r);


            r      = new ReportItem();
            r.Name = "图片";
            r.kind = 2;
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.kind = 0;
            r.Name = "分页符";
            mreportitemlist.Add(r);

            r      = new ReportItem();
            r.kind = 0;
            r.Name = "用户名";
            mreportitemlist.Add(r);
        }