Пример #1
0
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            writer.SetInt32("Operation", (int)Operation);
            writer.SetInt32("FillType", (int)FillType);

            return(base.Write(writer));
        }
 // Serialize this instance to a Grasshopper writer object.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetBoolean("OutputCode", this.outputCode.Checked);
     writer.SetInt32("Manufacturer", (int)this.Manufacturer);
     writer.SetInt32("MotionType", (int)this.c_motionType);
     writer.SetBoolean("RotAxis", this.extRotAxisCheck.Checked);
     writer.SetBoolean("LinAxis", this.extLinAxisCheck.Checked);
     return(base.Write(writer));
 }
Пример #3
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Mode", (int)_mode);
     writer.SetInt32("Display", (int)_disp);
     writer.SetBoolean("slider", slider);
     writer.SetInt32("noDec", noDigits);
     writer.SetDouble("valMax", MaxValue);
     writer.SetDouble("valMin", MinValue);
     writer.SetDouble("val", Value);
     return(base.Write(writer));
 }
Пример #4
0
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            int f = (int)_subdv;

            writer.SetInt32("subdivide", f);
            return(base.Write(writer));
        }
Пример #5
0
 ////////////////////////////////////////////////////////////////////////
 // Try to solve the saving of source Type.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     // First add our own field.
     writer.SetInt32("sourceType", (int)this.sourceType);
     // Then call the base class implementation.
     return(base.Write(writer));
 }
Пример #6
0
 // Serialize this instance to a Grasshopper writer object.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Manufacturer", (int)this.Manufacturer);
     writer.SetBoolean("Weight", this.weightOption.Checked);
     writer.SetBoolean("Declaration", this.declOption.Checked);
     writer.SetBoolean("Relative Tool Offset", this.reltoolOption.Checked);
     return(base.Write(writer));
 }
Пример #7
0
 // Serialize this instance to a Grasshopper writer object.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetBoolean("OutputCode", this.m_outputCode);
     writer.SetInt32("Manufacturer", (int)this.m_Manufacturer);
     writer.SetBoolean("RotAxis", this.extRotary);
     writer.SetBoolean("LinAxis", this.extLinear);
     writer.SetBoolean("Method", this.m_interpolationTypes);
     return(base.Write(writer));
 }
Пример #8
0
 // Serialize this instance to a Grasshopper writer object.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetBoolean("ModName", this.moduleName.Checked);
     writer.SetBoolean("Declarations", this.declarationsCheck.Checked);
     writer.SetBoolean("Overrides", this.overrideCheck.Checked);
     writer.SetInt32("Manufacturer", (int)this.Manufacturer);;
     writer.SetBoolean("IgnoreLen", this.ignore.Checked);
     return(base.Write(writer));
 }
Пример #9
0
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            if (!Enum.IsDefined(typeof(DocStorage), DocStorageMode))
            {
                DocStorageMode = DocStorage.InGrasshopperMemory;
            }
            writer.SetInt32(TargetDocIdentifier, (int)DocStorageMode);

            return(base.Write(writer));
        }
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            // we need to save all the items that we want to reappear when a GH file is saved and re-opened
            writer.SetInt32("Mode", (int)_mode);
            writer.SetInt32("loadselectid", loadselectid);
            writer.SetInt32("loadlistid", loadlistid);
            writer.SetInt32("catalogueIndex", catalogueIndex);
            writer.SetInt32("catalogueTypeIndex", catalogueTypeIndex);
            writer.SetInt32("catalogueProfileIndex", catalogueProfileIndex);
            writer.SetBoolean("isTapered", isTapered);
            writer.SetBoolean("isHollow", isHollow);
            writer.SetBoolean("isElliptical", isElliptical);
            writer.SetBoolean("isGeneral", isGeneral);
            writer.SetBoolean("isB2B", isB2B);

            // to save the dropdownlist content, spacer list and selection list
            // loop through the lists and save number of lists as well
            writer.SetInt32("dropdownCount", dropdowncontents.Count);
            for (int i = 0; i < dropdowncontents.Count; i++)
            {
                writer.SetInt32("dropdowncontentsCount" + i, dropdowncontents[i].Count);
                for (int j = 0; j < dropdowncontents[i].Count; j++)
                {
                    writer.SetString("dropdowncontents" + i + j, dropdowncontents[i][j]);
                }
            }
            // spacer list
            writer.SetInt32("spacerCount", dropdownspacer.Count);
            for (int i = 0; i < dropdownspacer.Count; i++)
            {
                writer.SetString("spacercontents" + i, dropdownspacer[i]);
            }
            // selection list
            writer.SetInt32("selectionCount", selections.Count);
            for (int i = 0; i < selections.Count; i++)
            {
                writer.SetString("selectioncontents" + i, selections[i]);
            }



            return(base.Write(writer));
        }
Пример #11
0
        /// <summary>
        /// Write to a file
        /// </summary>
        /// <param name="writer"></param>
        /// <returns></returns>
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            if (Value != null)
            {
                Value.historicData.Write(writer.CreateChunk("historicData"));
                Value.genoGuids.Write(writer.CreateChunk("genoData"));
                writer.SetInt32("popCount", Value.PopCount);
            }

            return(true);
        }
        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            writer.SetDouble("MultiplierFactor", Factor);
            writer.SetInt32("TargetCount", _targetIds.Count);
            for (int i = 0; i < _targetIds.Count; i++)
            {
                writer.SetGuid("TargetID", i, _targetIds[i]);
            }

            return(base.Write(writer));
        }
Пример #13
0
        /*******************************************/

        public override bool Write(GH_IO.Serialization.GH_IWriter writer)
        {
            writer.SetString("Component", Caller.Write());

            int index = ListItems.IndexOf(FirstSelectedItem);

            if (index >= 0)
            {
                writer.SetInt32("Selection", index);
            }

            return(base.Write(writer));
        }
Пример #14
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Mode", (int)_mode);
     writer.SetString("select", selecteditem);
     return(base.Write(writer));
 }
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("SpecialInteger", m_value);
     return(base.Write(writer));
 }
Пример #16
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Bitmask3", m_value);
     return(base.Write(writer));
 }
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("ShapeType", type);
     return(base.Write(writer));
 }
Пример #18
0
 // Serialize this instance to a Grasshopper writer object.
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Manufacturer", (int)this.Manufacturer);
     writer.SetBoolean("Pose", this.PoseOut.Checked);
     return(base.Write(writer));
 }
Пример #19
0
 /// <summary>
 /// Write all required data for deserialization to an IO archive.
 /// </summary>
 /// <param name="writer">Object to write with.</param>
 /// <returns>
 /// True on success, false on failure.
 /// </returns>
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("ClickMode", (int)clickMode);
     return(base.Write(writer));
 }
Пример #20
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("ElementType", (int)Value);
     return(true);
 }
Пример #21
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("FixType", (int)fixType);
     return(base.Write(writer));
 }
Пример #22
0
 public override bool Write(GH_IO.Serialization.GH_IWriter writer)
 {
     writer.SetInt32("Category", (int)Value);
     return(true);
 }