Beispiel #1
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="doc">Reference of parent <see cref="Document"/></param>
        /// <param name="box">Reference </param>
        public PackProperties(Document doc
                              , BoxProperties box
                              , PackArrangement arrangement
                              , HalfAxis.HAxis orientation
                              , PackWrapper wrapper)
            : base(doc)
        {
            _boxProperties = box;
            _boxProperties.AddDependancy(this);

            _arrangement = arrangement;
            _orientation = orientation;
            _wrapper     = wrapper;
        }
        public PackProperties(Document doc
                              , PackableBrick box
                              , PackArrangement arrangement
                              , HalfAxis.HAxis orientation
                              , PackWrapper wrapper)
            : base(doc)
        {
            _innerPackable = box;
            if (null != doc)
            {
                _innerPackable.AddDependancy(this);
            }

            Arrangement    = arrangement;
            BoxOrientation = orientation;
            Wrap           = wrapper;
        }
 public PackProperties(Document doc
                       , Packable packable
                       , PackArrangement arrangement
                       , HalfAxis.HAxis orientation, EnuRevSolidLayout revSolidLayout
                       , PackWrapper wrapper
                       , PackTray tray)
     : base(doc)
 {
     Content = packable;
     if (null != doc)
     {
         Content.AddDependancy(this);
     }
     Arrangement    = arrangement;
     BoxOrientation = orientation;
     RevSolidLayout = revSolidLayout;
     Wrap           = wrapper;
     Tray           = tray;
 }
Beispiel #4
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="doc">Reference of parent <see cref="Document"/></param>
        /// <param name="box">Reference </param>
        public PackProperties(Document doc
            , BoxProperties box
            , PackArrangement arrangement
            , HalfAxis.HAxis orientation
            , PackWrapper wrapper)
            : base(doc)
        {
            _boxProperties = box;
            _boxProperties.AddDependancy(this);

            _arrangement = arrangement;
            _orientation = orientation;
            _wrapper = wrapper;
        }
Beispiel #5
0
 private void SaveWrapperBase(PackWrapper wrapper, XmlElement wrapperElt, XmlDocument xmlDoc)
 {
     if (null == wrapper) return;
     // type
     XmlAttribute typeAttrib = xmlDoc.CreateAttribute("Type");
     typeAttrib.Value = wrapper.Type.ToString();
     wrapperElt.Attributes.Append(typeAttrib);
     // color
     XmlAttribute colorAttrib = xmlDoc.CreateAttribute("Color");
     colorAttrib.Value = string.Format("{0}", wrapper.Color.ToArgb());
     wrapperElt.Attributes.Append(colorAttrib);
     // weight
     XmlAttribute weightAttrib = xmlDoc.CreateAttribute("Weight");
     weightAttrib.Value = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", wrapper.Weight);
     wrapperElt.Attributes.Append(weightAttrib);
     // thickness
     XmlAttribute thicknessAttrib = xmlDoc.CreateAttribute("UnitThickness");
     thicknessAttrib.Value = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", wrapper.UnitThickness);
     wrapperElt.Attributes.Append(thicknessAttrib);
 }
Beispiel #6
0
 /// <summary>
 /// Create a new pack
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="description">Description</param>
 /// <param name="box">Inner box</param>
 /// <param name="arrangement">Arrangement</param>
 /// <param name="axis">Axis</param>
 /// <param name="wrapper">Wrapper</param>
 /// <returns></returns>
 public PackProperties CreateNewPack(
     string name, string description
     , BoxProperties box
     , PackArrangement arrangement
     , HalfAxis.HAxis axis
     , PackWrapper wrapper)
 { 
     // instantiate and initialize
     PackProperties packProperties = new PackProperties(this
         , box
         , arrangement
         , axis
         , wrapper);
     packProperties.Name = name;
     packProperties.Description = description;
     // insert in list
     _typeList.Add(packProperties);
     // notify listeners
     NotifyOnNewTypeCreated(packProperties);
     Modify();
     return packProperties;
 }