Example #1
0
        //These methods need to be modified to instantiate an instance of the class that contains the data you want to use in the report (PrintReportDocumentPaginator) and what you want
        //printed on each page of the report (GetPage).

        public PrintReportDocumentPaginator(TPReportData pass_rd1, TPReportData pass_rd2, Typeface input_typeface, double input_fontSize, double input_margin, Size input_pageSize)
        {
            //Modify the method to include the data objects that you want to use to create the report
            //curpat = input_pat;
            //curps = input_ps;


            rd1 = pass_rd1;
            rd2 = pass_rd2;

            //generic members for the class
            margin   = input_margin;
            fontsize = input_fontSize;
            pagesize = input_pageSize;
            typeface = input_typeface;

            //First call to determine how many pages there are in the document
            PaginateData();
        }
Example #2
0
        static void Execute(VMS.TPS.Common.Model.API.Application app)
        {
            // This program demonstrates use of MVVM design with stand alone Eclipse Script API.  It includes binding of members and methods. In addition use of a class for
            // multipage printing of a report from from the View class is demonstrated. A DocumentPaginator class (PrintReport.cs) includes generic code and hightlights
            // code added specifically for printing out a report from Eclipse.


            //VMS.TPS.Common.Model.API.Patient curpat = app.OpenPatientById("ZBenchMark-TG166");

            //VMS.TPS.Common.Model.API.PlanSetup curps = curpat.Courses.Where(x => x.Id == "C1").Single().PlanSetups.Where(x => x.Id == "TG-166").Single();



            Window w = new Window();

            // View gui = new View(); //This is the default with nothing passed
            //View gui = new View("Pass string from the API"); //This only passes a string
            //View gui = new View("Pass Eclipse Info", curpat, curps);

            Console.WriteLine("Loading default patients ...");

            DVHPlot.MainWindow dvhgui = new DVHPlot.MainWindow(app);

            TPReportData pt1ReportData = new TPReportData();
            TPReportData pt2ReportData = new TPReportData();

            //DrawDVH(dvhgui.ViewModel, curps);
            //DrawDVHs(dvhgui.ViewModel, "B_002", "B_001", app, pt1ReportData, pt1ReportData);
            //dvhgui.ViewModel.ExportPDF();


            //w.Content = dvhgui;
            //w.SizeToContent = SizeToContent.WidthAndHeight;
            //w.ShowDialog();

            //dvhgui.content = gui;
            dvhgui.ShowDialog();
        }