Ejemplo n.º 1
0
    protected override void register_parameters()
    {
        offsetDistance = base.RegisterFloatInput("DistanceInput", "distance", new Interval1d(-500, 500));

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        replaceInput = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);
    }
    protected override void register_parameters()
    {
        unionButton      = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "UnionButton", on_union);
        differenceButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "DifferenceButton", on_difference);
        intersectButton  = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "IntersectButton", on_intersection);

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        replaceInput = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);

        // always starts w/ union?
        UnityUIUtil.SetColors(unionButton, Colorf.LightGreen, Colorf.DimGrey);
    }
Ejemplo n.º 3
0
    protected override void register_parameters()
    {
        wallthickness = base.RegisterFloatInput("WallThicknessInput", "wall_thickness", new Interval1d(0.0001f, 9999f));

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        enableInfill = base.RegisterToggle("EnableInfillToggle", "add_infill");

        infillThickness    = base.RegisterFloatInput("InfillThicknessInput", "infill_thickness", new Interval1d(1.0f, 500.0f));
        infillThicknessRow = this.gameObject.FindChildByName("InfillThicknessParam", true);
        infillSpacing      = base.RegisterFloatInput("InfillSpacingInput", "infill_spacing", new Interval1d(1.0f, 500.0f));
        infillSpacingRow   = this.gameObject.FindChildByName("InfillSpacingParam", true);

        showInputObjects = base.RegisterToggle("ShowOriginalToggle", "show_original");
        replaceInput     = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);

        update_basic_expert_visibility();
    }
Ejemplo n.º 4
0
    protected override void register_parameters()
    {
        shellType = base.RegisterDropDown("ShellTypeDropDown", "shell_type",
                                          new List <string>()
        {
            "Voxel", "Extrusion"
        },
                                          new List <int>()
        {
            (int)MeshShellTool.ShellTypes.DistanceField,
            (int)MeshShellTool.ShellTypes.Extrusion
        });

        directionType = base.RegisterDropDown("ShellDirectionDropDown", "shell_direction",
                                              new List <string>()
        {
            "Inset", "Outset", "Symmetric"
        },
                                              new List <int>()
        {
            (int)MeshShellTool.ShellDirections.Inner,
            (int)MeshShellTool.ShellDirections.Outer,
            (int)MeshShellTool.ShellDirections.Symmetric,
        });

        shellThickness = base.RegisterFloatInput("ShellThicknessInput", "shell_thickness", new Interval1d(0.0001f, 9999f));

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        showInputObjects = base.RegisterToggle("ShowOriginalToggle", "show_original");
        replaceInput     = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);

        update_basic_expert_visibility();
    }
Ejemplo n.º 5
0
 void ToggleSliderTabs(TabOrder tabIndex, bool isVisible = false)
 {
     if (tabIndex == TabOrder.UserTab)
     {
         ucUserTab.Visible         = isVisible;
         ucNotificationTab.Visible = (ucUserTab.Visible) ? false : false;
     }
     else if (tabIndex == TabOrder.NotifiicationTab)
     {
         ucNotificationTab.Visible = !ucNotificationTab.Visible;
         ucUserTab.Visible         = (ucUserTab.Visible) ? false : false;
     }
     //Finally
     imgbtnNotification.Image = (ucNotificationTab.Visible) ? imgNotifHide : imgNotifShow;
 }
Ejemplo n.º 6
0
    protected override void register_parameters()
    {
        closingMode = base.RegisterDropDown("ClosingTypeDropDown", "closing_type",
                                            new List <string>()
        {
            "Robust", "Precise", "Fast"
        },
                                            new List <int>()
        {
            (int)GenerateClosedMeshTool.ClosingTypes.WindingNumberGrid,
            (int)GenerateClosedMeshTool.ClosingTypes.WindingNumberAnalytic,
            (int)GenerateClosedMeshTool.ClosingTypes.LevelSet
        });

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        offsetDistance = base.RegisterFloatInput("OffsetDistanceInput", "offset_distance", new Interval1d(-500, 500));
        windingIso     = base.RegisterFloatInput("WindingIsoInput", "winding_inflate", new Interval1d(0.01, 0.99));

        replaceInput = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);
    }
    protected override void register_parameters()
    {
        operationMode = base.RegisterDropDown("OpTypeDropDown", "op_type",
                                              new List <string>()
        {
            "Expand", "Contract", "Erode", "Fill"
        },
                                              new List <int>()
        {
            (int)MeshMorphologyTool.OperationTypes.Dilate,
            (int)MeshMorphologyTool.OperationTypes.Contract,
            (int)MeshMorphologyTool.OperationTypes.Open,
            (int)MeshMorphologyTool.OperationTypes.Close
        });

        offsetDistance = base.RegisterFloatInput("DistanceInput", "distance", new Interval1d(-500, 500));

        simpleCellSize    = base.RegisterFloatInput("SimpleCellSizeInput", "all_cell_size", new Interval1d(0.25f, 500.0f));
        simpleCellSizeRow = this.gameObject.FindChildByName("SimpleCellSizeParam", true);

        gridCellCount    = base.RegisterIntInput("GridCellCountInput", "grid_cell_count", new Interval1i(4, 2048));
        gridCellCountRow = this.gameObject.FindChildByName("GridCellCountParam", true);
        gridCellSize     = base.RegisterFloatInput("GridCellSizeInput", "grid_cell_size", new Interval1d(0.001f, 500.0f));
        gridCellSizeRow  = this.gameObject.FindChildByName("GridCellSizeParam", true);

        meshCellCount    = base.RegisterIntInput("MeshCellCountInput", "mesh_cell_count", new Interval1i(4, 2048));
        meshCellCountRow = this.gameObject.FindChildByName("MeshCellCountParam", true);
        meshCellSize     = base.RegisterFloatInput("MeshCellSizeInput", "mesh_cell_size", new Interval1d(0.001f, 500.0f));
        meshCellSizeRow  = this.gameObject.FindChildByName("MeshCellSizeParam", true);

        minComponentSize    = base.RegisterFloatInput("MinComponentSizeInput", "min_component_size", new Interval1d(0.0f, 500.0f));
        minComponentSizeRow = this.gameObject.FindChildByName("MinComponentSizeParam", true);

        replaceInput = base.RegisterToggle("ReplaceInputToggle", "replace_input");

        basicButton = UnityUIUtil.FindButtonAndAddClickHandler(this.gameObject, "BasicToggleButton", on_basic_expert_toggle);
        TabOrder.Add(basicButton.gameObject);
    }
Ejemplo n.º 8
0
        public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, ref bool propertyNotFound)
        {
            string outputFormat = string.Empty;

            if (format == string.Empty)
            {
                outputFormat = "g";
            }

            string lowerPropertyName = propertyName.ToLower();

            if (currentScope == Scope.NoSettings)
            {
                propertyNotFound = true;
                return(PropertyAccess.ContentLocked);
            }
            propertyNotFound = true;

            string result   = string.Empty;
            bool   isPublic = true;

            switch (lowerPropertyName)
            {
            case "tabid":
                propertyNotFound = false;
                result           = (TabID.ToString(outputFormat, formatProvider));
                break;

            case "taborder":
                isPublic         = false;
                propertyNotFound = false;
                result           = (TabOrder.ToString(outputFormat, formatProvider));
                break;

            case "portalid":
                propertyNotFound = false;
                result           = (PortalID.ToString(outputFormat, formatProvider));
                break;

            case "tabname":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(LocalizedTabName, format);
                break;

            case "isvisible":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsVisible, formatProvider));
                break;

            case "parentid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ParentId.ToString(outputFormat, formatProvider));
                break;

            case "level":
                isPublic         = false;
                propertyNotFound = false;
                result           = (Level.ToString(outputFormat, formatProvider));
                break;

            case "iconfile":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(IconFile, format);
                break;

            case "iconfilelarge":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(IconFileLarge, format);
                break;

            case "disablelink":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DisableLink, formatProvider));
                break;

            case "title":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Title, format);
                break;

            case "description":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Description, format);
                break;

            case "keywords":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(KeyWords, format);
                break;

            case "isdeleted":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsDeleted, formatProvider));
                break;

            case "url":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Url, format);
                break;

            case "skinsrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinSrc, format);
                break;

            case "containersrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerSrc, format);
                break;

            case "tabpath":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(TabPath, format);
                break;

            case "startdate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (StartDate.ToString(outputFormat, formatProvider));
                break;

            case "enddate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (EndDate.ToString(outputFormat, formatProvider));
                break;

            case "haschildren":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(HasChildren, formatProvider));
                break;

            case "refreshinterval":
                isPublic         = false;
                propertyNotFound = false;
                result           = (RefreshInterval.ToString(outputFormat, formatProvider));
                break;

            case "pageheadtext":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(PageHeadText, format);
                break;

            case "skinpath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinPath, format);
                break;

            case "skindoctype":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinDoctype, format);
                break;

            case "containerpath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerPath, format);
                break;

            case "issupertab":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsSuperTab, formatProvider));
                break;

            case "fullurl":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(FullUrl, format);
                break;

            case "sitemappriority":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SiteMapPriority.ToString(), format);
                break;
            }
            if (!isPublic && currentScope != Scope.Debug)
            {
                propertyNotFound = true;
                result           = PropertyAccess.ContentLocked;
            }
            return(result);
        }
Ejemplo n.º 9
0
 public void SetTabOrder(TabOrder order)
 {
     Order = order;
     SetTabOrder();
 }
Ejemplo n.º 10
0
 public TabOrderManager(ContainerControl container, TabOrder order)
     :       this(container)
 {
     Order = order;
 }
Ejemplo n.º 11
0
 public TabOrderComparer(TabOrder order)
 {
     m_order = order;
 }
 public void DisposeTabOrder()
 {
     TabOrder.HookTabOrder(this.GetIDesignerHost());
     _tabOrderMode = false;
 }
 public void InvokeTabOrder()
 {
     TabOrder.HookTabOrder(this.GetIDesignerHost());
     _tabOrderMode = true;
 }
 public override string ToString()
 {
     return(Name + " " + TabOrder.ToString());
 }