Exemplo n.º 1
0
        ///
        ///	 * <param name="previewLeaf"> </param>
        ///
        private void setPreviewURL(JDFPreview previewLeaf)
        {
            DirectoryInfo share = UrlUtil.urlToFile(previewShare).Directory;
            FileInfo      file;

            if (bPPF)
            {
                file = new FileInfo(previewLeaf.getSheetName() + ".ppf");
            }
            else
            {
                file = new FileInfo(previewLeaf.getSheetName() + "_" + previewLeaf.getSide().getName().Substring(0, 1) + "_" + previewLeaf.getSeparation() + ".png");
            }
            file = FileUtil.getFileInDirectory(share, file);
            previewLeaf.setURL(UrlUtil.fileToUrl(file, false));
            previewLeaf.setPreviewUsage(EnumPreviewUsage.Separation);
            previewLeaf.setPreviewFileType(EnumPreviewFileType.CIP3Single);
        }
Exemplo n.º 2
0
        public virtual void testDieLayoutStrip()
        {
            JDFBinderySignature bs = stripParams.appendBinderySignature();

            bs.setBinderySignatureType(EnumBinderySignatureType.Die);
            JDFDieLayout dl = bs.appendDieLayout();
            JDFStation   s  = dl.appendStation();

            s.setStationAmount(12);
            s.setStationName("MyStation");
            JDFSignatureCell[] scs = new JDFSignatureCell[3];
            JDFPreview         pv0 = (JDFPreview)n.addResource(ElementName.PREVIEW, null, null, null, null, null, null);

            string[] index = { "0 ~ 2", "3 ~ 8", "9 ~ 11" };
            for (int i = 0; i < 3; i++)
            {
                JDFSignatureCell sc = scs[i] = bs.appendSignatureCell();
                sc.setStationName("MyStation");
                JDFPreview pv = (JDFPreview)pv0.addPartition(EnumPartIDKey.CellIndex, index[i]);
                pv.setURL("file://foo" + i + ".vrml");
                pv.setAttribute("PreviewFileType", "VRML");
                pv.setAttribute("PreviewUsage", "Animation");
                sc.refElement(pv);
            }

            scs[0].setXMLComment("This represents 3 times pageList 0");
            scs[0].setDescriptiveName("Strawberry lid");
            scs[0].setFrontPages(new JDFIntegerList("0 0 0"));

            scs[1].setFrontPages(new JDFIntegerList("1 1 1 1 1 1"));
            scs[1].setXMLComment("This represents 6 times pageList 1");
            scs[1].setDescriptiveName("Raspberry lid");

            scs[2].setFrontPages(new JDFIntegerList("2 2 2"));
            scs[2].setXMLComment("This represents 3 times pageList 2");
            scs[2].setDescriptiveName("Blueberry lid");

            d.write2File(sm_dirTestDataTemp + "DieStationStrip.jdf", 2, false);
        }