コード例 #1
0
ファイル: Program.cs プロジェクト: mriffey/tps-parse-net
 private static void Main(string[] args)
 {
     Parser.Default.ParseArguments <Options, Schema.Options>(args)
     .MapResult(
         (Options opts) => ExportToCsv.Export(opts),
         (Schema.Options opts) => PrintSchema.Print(opts),
         errs => 1);
 }
コード例 #2
0
        public void PrintSchemaTest()
        {
            PrintSchema printSchema = new PrintSchema();

            Assert.IsInstanceOfType(printSchema, typeof(PrintSchema));

            Assert.IsInstanceOfType(printSchema.Database, typeof(DatabaseHandler));

        }
コード例 #3
0
        /**
         * Using Schema: Full Report
         * Description of steps when user makes dialog selection:
         *   1. Run through the installations that are being supplied. For each installation, output, in order:
         *       * Installation Data
         *       * Installation Title
         *       * Installation Notes
         *
         *   2. Again go through our installations and obtain the images specific to that installation.
         *       Each image should have a title to reference the installation data with each image.
         */
        public FlowDocument CreateFullInstallationReport(PrintDialog pd)
        {
            PrintSchema  ps       = new PrintSchema();
            FlowDocument document = new FlowDocument();

            // Setting our Flow Document columns to have the same width as the printable area
            document.ColumnWidth = pd.PrintableAreaWidth;
            document.PageHeight  = pd.PrintableAreaHeight;
            document.PageWidth   = pd.PrintableAreaWidth;

            List <Block> printableElements = ps.RunFullSchema(UserInputItem, Installations);

            foreach (Block elem in printableElements)
            {
                // Add these blocks to our flow document
                document.Blocks.Add(elem);
            }

            return(document);
        }