Ejemplo n.º 1
0
        public virtual void createMultiLabels()
        {
            theNode.setDescriptiveName("Multi Label Product");
            JDFDeliveryIntent diBig = initDeliveryIntent(0);

            theNode.removeResource(ElementName.CUSTOMERINFO, 0);

            ProductGoldenTicket gtLabel1 = new ProductGoldenTicket(0, EnumVersion.Version_1_3, 0, 0);
            JDFNode             n1       = theNode.addProduct();

            gtLabel1.assign(n1);
            addKid(gtLabel1);

            gtLabel1.initCustomerInfo("Johann", "ReweEinkäufer", "Rewe", "Mineralwasser label");
            initMediaIntent(n1, 24.4, EnumSpanCoatings.Coated, "38DL247 38");
            JDFLayoutIntent li = initLayoutIntent(n1, 92, 28.3, 1, 1);

            initColorIntent(n1, 6, 0, null);
            initOutputComponent(n1, li, "Label");
            JDFDeliveryIntent di = gtLabel1.initDeliveryIntent(5000);

            diBig.moveElement(di.getDropIntent(0), null);
            gtLabel1.getNode().removeResource("DeliveryIntent", 0);

            ProductGoldenTicket gtLabel2 = new ProductGoldenTicket(0, EnumVersion.Version_1_3, 0, 0);

            JDFNode n2 = theNode.addProduct();

            gtLabel2.assign(n2);
            addKid(gtLabel2);

            gtLabel2.initCustomerInfo("Franzi", "KulmbachEinkäufer", "Kulmbach", "Weissbier label");
            initMediaIntent(n2, 24.4, EnumSpanCoatings.Coated, "38DL247 38");
            li            = initLayoutIntent(n2, 11.4, 5, 1, 1);
            gtLabel2.cols = new VString("Green Gold Black Yellow Gold Thermo", null);
            gtLabel2.initColorIntent(n2, 6, 0, null);
            initOutputComponent(n2, li, "Label");
            di = gtLabel2.initDeliveryIntent(10000);
            diBig.moveElement(di.getDropIntent(0), null);
            gtLabel2.getNode().removeResource("DeliveryIntent", 0);
        }
Ejemplo n.º 2
0
        ///
        ///	 <summary> * initialize deliveryintent and also output component
        ///	 *  </summary>
        ///	 * <param name="amount"> </param>
        ///
        protected internal virtual JDFDeliveryIntent initDeliveryIntent(int amount)
        {
            JDFDeliveryIntent di = (JDFDeliveryIntent)theNode.addResource(ElementName.DELIVERYINTENT, EnumUsage.Input);
            JDFDate           d  = new JDFDate();

            d.addOffset(0, 0, 0, 7);
            di.appendRequired().setPreferred(d);
            if (amount > 0)
            {
                JDFComponent      outComp = (JDFComponent)theNode.getCreateResource(ElementName.COMPONENT, EnumUsage.Output, 0);
                JDFDropItemIntent dit     = di.appendDropIntent().appendDropItemIntent();
                dit.refElement(outComp);
                dit.setAmount(amount);
                JDFResourceLink rl = theNode.getLink(outComp, null);
                rl.setAmount(amount, null);
            }

            di.setResStatus(EnumResStatus.Available, false);
            di.preferredToActual();
            return(di);
        }