예제 #1
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddTextParameter("Viewport Name", "N", "---", GH_ParamAccess.item, "GH_HACK");
            pManager[0].Optional = true;

            pManager.AddIntegerParameter("Display", "D", "---", GH_ParamAccess.item, 0);
            pManager[1].Optional = true;

            pManager.AddIntegerParameter("Projection", "P", "---", GH_ParamAccess.item, 0);
            pManager[2].Optional = true;

            pManager.AddGenericParameter("Camera", "C", "---", GH_ParamAccess.item);
            pManager[3].Optional = true;

            Param_Integer param = (Param_Integer)pManager[2];

            param.AddNamedValue("Parallel", 0);
            param.AddNamedValue("Perspective", 1);
            param.AddNamedValue("Two Point", 2);

            Param_GenericObject paramGen = (Param_GenericObject)Params.Input[3];

            paramGen.PersistentData.Append(new GH_ObjectWrapper(new wCameraStandard()));

            SetDisplayMode();
        }
예제 #2
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Seed", "S", "The seed for the noise", GH_ParamAccess.item, 1);
            pManager[0].Optional = true;
            pManager.AddIntegerParameter("Width", "W", "The width of the new Aviary Image in pixels", GH_ParamAccess.item, 100);
            pManager[1].Optional = true;
            pManager.AddIntegerParameter("Height", "H", "The height of the new Aviary Image in pixels", GH_ParamAccess.item, 100);
            pManager[2].Optional = true;
            pManager.AddIntegerParameter("Depth", "D", "The sample depth through the noise field", GH_ParamAccess.item, 1);
            pManager[3].Optional = true;
            pManager.AddIntegerParameter("Mode", "M", "The cellular boundary mode", GH_ParamAccess.item, 0);
            pManager[4].Optional = true;
            pManager.AddIntegerParameter("Interpolation", "I", "The output interpolation sample value mode", GH_ParamAccess.item, 0);
            pManager[5].Optional = true;
            pManager.AddNumberParameter("Frequency", "F", "Scale of the sample point distribution frequency", GH_ParamAccess.item, 0.25);
            pManager[6].Optional = true;

            Param_Integer paramA = (Param_Integer)pManager[4];

            paramA.AddNamedValue("Value", 0);
            paramA.AddNamedValue("Perlin", 1);
            paramA.AddNamedValue("Cubic", 2);
            paramA.AddNamedValue("Simplex", 3);
            paramA.AddNamedValue("WhiteNoise", 4);

            Param_Integer paramB = (Param_Integer)pManager[5];

            foreach (Mp.Noise.InterpolationModes value in Enum.GetValues(typeof(Mp.Noise.InterpolationModes)))
            {
                paramB.AddNamedValue(value.ToString(), (int)value);
            }
        }
예제 #3
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Layer", "L", "---", GH_ParamAccess.item);
            pManager.AddIntegerParameter("Fitting Mode", "M", "---", GH_ParamAccess.item, 2);
            pManager[1].Optional = true;
            pManager.AddIntegerParameter("Scaling Mode", "S", "---", GH_ParamAccess.item, 0);
            pManager[2].Optional = true;
            pManager.AddIntegerParameter("Width", "W", "---", GH_ParamAccess.item, 0);
            pManager[3].Optional = true;
            pManager.AddIntegerParameter("Height", "H", "---", GH_ParamAccess.item, 0);
            pManager[4].Optional = true;

            Param_Integer paramA = (Param_Integer)Params.Input[1];

            paramA.AddNamedValue(modes[0], 0);
            paramA.AddNamedValue(modes[1], 1);
            paramA.AddNamedValue(modes[2], 2);
            paramA.AddNamedValue(modes[3], 3);
            paramA.AddNamedValue(modes[4], 4);

            Param_Integer paramB = (Param_Integer)Params.Input[2];

            paramB.AddNamedValue(types[0], 0);
            paramB.AddNamedValue(types[1], 1);
            paramB.AddNamedValue(types[2], 2);
            paramB.AddNamedValue(types[3], 3);
        }
예제 #4
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("StyleIndex", "I", "windows style\n0 - Default\n1 - Blank Slate (None)\n2 - Minimal Utility", GH_ParamAccess.item, 0);
            Param_Integer pi = pManager[0] as Param_Integer;

            pi.AddNamedValue("Default", 0);
            pi.AddNamedValue("Blank Slate", 1);
            pi.AddNamedValue("Minimal", 2);
        }
예제 #5
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("User Data", "D", "User Dictionaries to export to JSON.", GH_ParamAccess.list);
            pManager.AddIntegerParameter("Format Data", "F", "Set to true to format data.", GH_ParamAccess.item, 0);
            Param_Integer param = pManager[1] as Param_Integer;

            param.AddNamedValue("Human readable string", 1);
            param.AddNamedValue("Non formatted string", 0);
        }
예제 #6
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Mode", "M", "---", GH_ParamAccess.item, 0);
            pManager[0].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[0];

            param.AddNamedValue("Extent", 0);
            param.AddNamedValue("Histogram", 1);
        }
예제 #7
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Object", "O", "Wind Objects", GH_ParamAccess.item);
            pManager.AddIntegerParameter("Pattern", "P", "Pattern", GH_ParamAccess.item, 0);
            pManager[1].Optional = true;
            pManager.AddNumberParameter("Scale", "S", "Scale", GH_ParamAccess.item, 1);
            pManager[2].Optional = true;
            pManager.AddColourParameter("Fore", "F", "---", GH_ParamAccess.item, wColors.LightGray.ToDrawingColor());
            pManager[3].Optional = true;
            pManager.AddColourParameter("Back", "B", "---", GH_ParamAccess.item, wColors.VeryLightGray.ToDrawingColor());
            pManager[4].Optional = true;

            Param_GenericObject paramGen = (Param_GenericObject)Params.Input[0];

            paramGen.PersistentData.Append(new GH_ObjectWrapper(new pSpacer(new GUIDtoAlpha(Convert.ToString(this.Attributes.InstanceGuid.ToString() + Convert.ToString(this.RunCount)), false).Text)));

            Param_Integer param = (Param_Integer)pManager[1];

            param.AddNamedValue("Grid", 0);
            param.AddNamedValue("Diamond", 1);
            param.AddNamedValue("Triangular", 2);
            param.AddNamedValue("Hexagonal", 3);
            param.AddNamedValue("Stagger", 4);
            param.AddNamedValue("Checker", 5);
            param.AddNamedValue("Solid Diamond", 6);
            param.AddNamedValue("Trellis", 7);
            param.AddNamedValue("Dots", 8);
        }
예제 #8
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddPlaneParameter("Location", "L", "Location", GH_ParamAccess.item, Plane.WorldXY);
            pManager.AddTextParameter("Text", "T", "Text", GH_ParamAccess.item);
            pManager.AddNumberParameter("Size", "S", "Size", GH_ParamAccess.item, 10);
            pManager.AddIntegerParameter("Justification", "J", "0 = BottomLeft, 1 = BottomCenter, 2 = BottomRight, 3 = MiddleLeft, 4 = MiddleCenter, 5 = MiddleRight, 6 = TopLeft, 7 = TopCenter, 8 = TopRight", GH_ParamAccess.item, 4);
            pManager.AddTextParameter("Font", "F", "Font", GH_ParamAccess.item, "Arial");
            pManager.AddBooleanParameter("Bold", "B", "Bold", GH_ParamAccess.item, false);
            pManager.AddNumberParameter("OffsetDistance", "O", "", GH_ParamAccess.item, 0);

            pManager.HideParameter(0);

            Param_Integer var = pManager[3] as Param_Integer;

            if (var != null)
            {
                var.AddNamedValue("BottomLeft", 0);
                var.AddNamedValue("BottomCenter", 1);
                var.AddNamedValue("BottomRight", 2);
                var.AddNamedValue("MiddleLeft", 3);
                var.AddNamedValue("MiddleCenter", 4);
                var.AddNamedValue("MiddleRight", 5);
                var.AddNamedValue("TopLeft", 6);
                var.AddNamedValue("TopCenter", 7);
                var.AddNamedValue("TopRight", 8);
            }
        }
예제 #9
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddPlaneParameter("Location", "L", "Location", GH_ParamAccess.item, Plane.WorldXY);
            pManager.AddTextParameter("Text", "T", "Text", GH_ParamAccess.item);
            pManager.AddNumberParameter("Size", "S", "Size", GH_ParamAccess.item, 20);
            pManager.AddColourParameter("Color", "C", "Color", GH_ParamAccess.item, Color.Aqua);
            pManager.AddIntegerParameter("Justification", "J", "Text justification", GH_ParamAccess.item, 7);
            pManager.AddTextParameter("Font", "F", "Font", GH_ParamAccess.item, "Arial");
            pManager.AddBooleanParameter("Bold", "B", "Bold", GH_ParamAccess.item, false);
            pManager.AddBooleanParameter("Italy", "I", "Italy", GH_ParamAccess.item, false);

            pManager.HideParameter(0);
            pManager[1].Optional = true;
            pManager[3].Optional = true;
            Param_Integer obj = (Param_Integer)pManager[4];

            obj.AddNamedValue("Top Left", 1);
            obj.AddNamedValue("Top Center", 2);
            obj.AddNamedValue("Top Right", 3);
            obj.AddNamedValue("Middle Left", 4);
            obj.AddNamedValue("Middle Center", 5);
            obj.AddNamedValue("Middle Right", 6);
            obj.AddNamedValue("Bottom Left", 7);
            obj.AddNamedValue("Bottom Center", 8);
            obj.AddNamedValue("Bottom Right", 9);
        }
예제 #10
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Data", "D", "---", GH_ParamAccess.item);
            pManager.AddIntegerParameter("Mode", "M", "---", GH_ParamAccess.item, 0);
            pManager[1].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[1];

            param.AddNamedValue("Polar", 0);
            param.AddNamedValue("Radar", 1);
        }
예제 #11
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Gradient", "G", "---", GH_ParamAccess.item, 0);

            Param_Integer param = (Param_Integer)Params.Input[0];

            param.AddNamedValue(FontSet[0].Title, 0);
            param.AddNamedValue(FontSet[1].Title, 1);
            param.AddNamedValue(FontSet[2].Title, 2);
            param.AddNamedValue(FontSet[3].Title, 3);
            param.AddNamedValue(FontSet[4].Title, 4);
        }
예제 #12
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Mode", "M", "---", GH_ParamAccess.item, 0);
            pManager[0].Optional = true;
            pManager.AddIntegerParameter("Gap", "G", "---", GH_ParamAccess.item, 32);
            pManager[1].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[0];

            param.AddNamedValue("Horizontal", 0);
            param.AddNamedValue("Vertical", 1);
        }
예제 #13
0
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("LoadGroups", "LoadGroups", "LoadGroups to include in LoadCombination. Single LoadGrousp or list of LoadGroups.", GH_ParamAccess.list);
            pManager.AddIntegerParameter("CombinationType", "CombinationType", "Type of combination", GH_ParamAccess.item, 0);
            Param_Integer type = pManager[1] as Param_Integer;

            type.AddNamedValue("6.10a", 0);
            type.AddNamedValue("6.10b", 1);
            type.AddNamedValue("characteristic", 2);
            type.AddNamedValue("frequent", 3);
            type.AddNamedValue("quasi permanent", 4);
        }
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddTextParameter("Button Label Text", "BT", "The text to display on the button to the right of the text box", GH_ParamAccess.item, "Browse...");
            pManager.AddIntegerParameter("Dialog Type", "DT", "The type of dialog to display - Open, Save, or Folder", GH_ParamAccess.item, 0);
            Param_Integer typeParam = pManager[1] as Param_Integer;

            typeParam.AddNamedValue("Open File", 0);
            typeParam.AddNamedValue("Save File", 1);
            typeParam.AddNamedValue("Browse Folder", 2);
            pManager.AddBooleanParameter("Must Exist", "ME", "Set to true if the file (in an open file dialog) must exist", GH_ParamAccess.item, true);
            pManager.AddTextParameter("Filter", "F", "The file filter(s) to use. Specify type names, separated from path filters with a | character, like \"Grasshopper Files|*.gh\" and join multiples with | characters as well.", GH_ParamAccess.item, "All Files|*.*");
        }
예제 #15
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Elements", "E", "Elements", GH_ParamAccess.list);
            pManager.AddIntegerParameter("Dock Direction", "D", "Dock Direction", GH_ParamAccess.list, 0);
            pManager[1].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[1];

            param.AddNamedValue("Top", 0);
            param.AddNamedValue("Bottom", 1);
            param.AddNamedValue("Left", 2);
            param.AddNamedValue("Right", 3);
        }
예제 #16
0
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            //0
            pManager.AddGenericParameter("Geometries", "G", "Geometries to be converted,\r\nYou can input\r\n  Box\r\n  FD_Extrusion\r\n  Mesh (will be triangulated)\r\n  Brep (will be triangulated)", GH_ParamAccess.list);
            //1
            pManager.AddIntegerParameter("Surface heat generated", "SH", "Surface heat generated\r\n    0: NA\r\n    1: Surface temperature", GH_ParamAccess.item, 0);
            Param_Integer p1 = pManager[1] as Param_Integer;

            p1.AddNamedValue("NA", 0);
            p1.AddNamedValue("Surface temperature", 1);
            //2
            pManager.AddTextParameter("Surface temperature", "ST", "Surface temperature [C]", GH_ParamAccess.item, "Default");
        }
예제 #17
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddBooleanParameter("Hello?", "B", "If true, will say hi", GH_ParamAccess.item, false);
            pManager[0].Optional = true;
            pManager.AddIntegerParameter("Language", "L", "Select Language", GH_ParamAccess.item, 0);
            pManager[1].Optional = true;

            Param_Integer param = (Param_Integer)pManager[1];

            param.AddNamedValue("English", 0);
            param.AddNamedValue("Spanish", 1);
            param.AddNamedValue("Japanese", 2);
        }
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddTextParameter("Data", "D", "The data to display in the table, organized in branches by column.", GH_ParamAccess.tree);
            pManager.AddTextParameter("Column Headings", "C", "The heading for each column, one for each column in Data", GH_ParamAccess.list);
            pManager.AddBooleanParameter("Allow Sorting", "S", "Set to true to allow sorting by column values", GH_ParamAccess.item, true);
            pManager.AddIntegerParameter("Column Sizing Mode", "CS", "Sizing Mode for columns. Pick from predefined \"special\" values or supply a fixed numerical width.", GH_ParamAccess.item, -1);

            Param_Integer sizingMode = pManager[3] as Param_Integer;

            sizingMode.AddNamedValue("Equal", -1);
            sizingMode.AddNamedValue("Size to Cells", -2);
            sizingMode.AddNamedValue("Size to Header", -3);
        }
예제 #19
0
        protected override void BeforeSolveInstance()
        {
            base.BeforeSolveInstance();
            Param_Integer var = this.Params.Input[this.Params.Input.Count() - 1] as Param_Integer;

            if (var != null)
            {
                var.AddNamedValue("Line", 0);
                var.AddNamedValue("Sigmoid", 1);
                var.AddNamedValue("Start", 2);
                var.AddNamedValue("End", 3);
            }
        }
예제 #20
0
        private void DiagRMode(Object sender, EventArgs e)
        {
            PatternModeStatus = 4;

            Param_Integer param = (Param_Integer)this.Params.Input[1];

            param.ClearNamedValues();
            param.AddNamedValue("Solid", 0);
            param.AddNamedValue("Dots", 1);
            param.AddNamedValue("Dashed", 2);
            param.AddNamedValue("Staggerd", 3);

            this.ExpireSolution(true);
        }
예제 #21
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Mode", "M", "---", GH_ParamAccess.item, 0);
            pManager[0].Optional = true;
            pManager.AddGenericParameter("Overlay Bitmap", "O", "---", GH_ParamAccess.item);
            pManager.AddGenericParameter("Underlay Bitmap", "B", "---", GH_ParamAccess.item);
            pManager.AddIntegerParameter("Threshold", "T", "---", GH_ParamAccess.item, 50);
            pManager[3].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[0];

            param.AddNamedValue("Threshold", 0);
            param.AddNamedValue("Euclidean", 1);
        }
예제 #22
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Images", "imgs", "Images to Combine", GH_ParamAccess.list);
            pManager.AddIntegerParameter("Align", "A", "Different Alignments", GH_ParamAccess.item, 0);

            Param_Integer AlignParam = pManager[1] as Param_Integer;

            AlignParam.AddNamedValue("Left/Top", 0);
            AlignParam.AddNamedValue("Center", 1);
            AlignParam.AddNamedValue("Right/Bot", 2);

            pManager.AddBooleanParameter("Direction", "Dir", "True for Horizontal False for Vertical", GH_ParamAccess.item, true);
            pManager.AddIntegerParameter("Padding", "P", "Padding to add between the images, does not add on the edges", GH_ParamAccess.item, 0);
        }
예제 #23
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Bitmap", "B", "Bitmap", GH_ParamAccess.item);
            pManager.AddIntegerParameter("Fitting", "F", "Fitting", GH_ParamAccess.item, 3);
            pManager[1].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[1];

            param.AddNamedValue("Fit", 0);
            param.AddNamedValue("Fill", 1);
            param.AddNamedValue("Stretch", 2);
            param.AddNamedValue("Center", 3);
            param.AddNamedValue("None", 4);
        }
예제 #24
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Elements", "E", "Elements", GH_ParamAccess.list);
            pManager.AddBooleanParameter("Horizontal", "H", "---", GH_ParamAccess.item, true);
            pManager[1].Optional = true;
            pManager.AddIntegerParameter("Align", "A", "Align", GH_ParamAccess.item, 1);
            pManager[2].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[2];

            param.AddNamedValue("Left / Top", 1);
            param.AddNamedValue("Middle / Center", 2);
            param.AddNamedValue("Right / Bottom", 3);
        }
예제 #25
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Window", "W", "The window to modify", GH_ParamAccess.item);
            pManager.AddPointParameter("Starting Location", "L", "The point (screen coordinates, so 0,0 is upper left) \nat which to locate the window's upper left corner.", GH_ParamAccess.item);
            pManager[1].Optional = true;
            pManager.AddIntegerParameter("Theme", "T", "The base theme for the window.", GH_ParamAccess.item);
            pManager[2].Optional = true;
            Param_Integer themeParam = (Param_Integer)pManager[2];

            themeParam.AddNamedValue("Light", 0);
            themeParam.AddNamedValue("Dark", 1);
            pManager.AddTextParameter("Accent Color", "A", "The color accent for the window.  Use the component \nmenu item \"Create Accent List\" so you don't have to guess", GH_ParamAccess.item);
            pManager[3].Optional = true;
        }
예제 #26
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            Param.Brep     = pManager.AddBrepParameter("Boundary Brep", "B", "The outer boundary to sample points in.", GH_ParamAccess.item);
            Param.Distance = pManager.AddNumberParameter("Distance", "D", "The distance between points or the diameter of a sphere.", GH_ParamAccess.item);
            Param.Seed     = pManager.AddIntegerParameter("Seed", "S", "The seed that for the random generation of the points.", GH_ParamAccess.item);
            Param.Random   = pManager.AddIntegerParameter("Random", "R", "Should the generation be truly random or deterministic?", GH_ParamAccess.item, 0);

            Param_Integer paramRandom = pManager[3] as Param_Integer;

            paramRandom.AddNamedValue("Deterministic", 0);
            paramRandom.AddNamedValue("Random", 1);

            pManager[2].Optional = true;
            pManager[3].Optional = true;
        }
예제 #27
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("Width", "W", "Width of the New Image", GH_ParamAccess.item, 500);
            pManager.AddIntegerParameter("Height", "H", "Height of the New Image", GH_ParamAccess.item, 500);
            pManager.AddIntegerParameter("DPI", "DPI", "DPI of the new Image", GH_ParamAccess.item, 96);

            Param_Integer DPIparam = pManager[2] as Param_Integer;

            DPIparam.AddNamedValue("72 DPI", 72);
            DPIparam.AddNamedValue("96 DPI", 96);
            DPIparam.AddNamedValue("150 DPI", 150);
            DPIparam.AddNamedValue("300 DPI", 300);
            DPIparam.AddNamedValue("600 DPI", 600);

            pManager.AddColourParameter("Color", "C", "Color of the new Image", GH_ParamAccess.item, Color.White);
        }
예제 #28
0
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            //0
            pManager.AddIntegerParameter("Unit", "U", "SI Unit\r\n    0: m\r\n    1: cm\r\n    2: mm\r\n    3: μm\r\n" +
                                         "US Unit\r\n    0: Yard\r\n    1: Feet\r\n    2: Inch", GH_ParamAccess.item, 0);
            Param_Integer p0 = (Param_Integer)pManager[0];

            p0.AddNamedValue("Meter (m) / Yard", 0);
            p0.AddNamedValue("Centimetre (cm) / Feet", 1);
            p0.AddNamedValue("Millimetre (mm) / Inch", 2);
            p0.AddNamedValue("Micrometre (µm)", 3);
            //1
            pManager.AddBoxParameter("Box", "B", "A Box to be converted to Analysis Range", GH_ParamAccess.item);
            //2
            pManager.AddBooleanParameter("Update", "Up", "Update the settings", GH_ParamAccess.item, false);
        }
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Canvas", "cnv", "Image to use as a reference", GH_ParamAccess.item);
            pManager.AddColourParameter("Colors", "Cc", "Color to use on the start of the Gradient", GH_ParamAccess.item, Color.White);
            pManager.AddColourParameter("Colors", "Ce", "Color to use on the start of the Gradient", GH_ParamAccess.list);

            pManager.AddIntegerParameter("Factor", "F", "Factor in percentage", GH_ParamAccess.item, 50);

            Param_Integer FactorParam = pManager[3] as Param_Integer;

            FactorParam.AddNamedValue("10 Percent", 10);
            FactorParam.AddNamedValue("20 Percent", 20);
            FactorParam.AddNamedValue("30 Percent", 30);
            FactorParam.AddNamedValue("40 Percent", 40);
            FactorParam.AddNamedValue("50 Percent", 50);
        }
예제 #30
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddTimeParameter("DateTime", "D", "The default value of the text box", GH_ParamAccess.item, DateTime.Now);
            pManager[0].Optional = true;
            pManager.AddIntegerParameter("Format", "F", "Format", GH_ParamAccess.item, 0);
            pManager[1].Optional = true;
            pManager.AddTextParameter("Custom Format", "C", "---", GH_ParamAccess.item, "13:45:30");
            pManager[2].Optional = true;

            Param_Integer param = (Param_Integer)Params.Input[1];

            param.AddNamedValue("Custom", 0);
            param.AddNamedValue("1:45 PM", 1);
            param.AddNamedValue("1:45:30 PM", 2);
            param.AddNamedValue("13:45:30", 3);
        }