예제 #1
0
        /// <summary>
        /// Helper
        /// </summary>
        /// <returns></returns>
        private bool SetOpeningProperty(string strProperty, object property)
        {
            switch (strProperty)
            {
            case HelloWallViewProperties.OPENING_UI_IS_ENABLED:
            {
                _gbOpening.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_IS_ENABLED:
            {
                _cbOpening.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_SETTINGS_ARE_ENABLED:
            {
                bool bOpeningSettingsAreEnabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                _rbOpeningExtrudedPolygon.Enabled = bOpeningSettingsAreEnabled;
                _rbOpeningBRep.Enabled            = bOpeningSettingsAreEnabled;
                _cbOpeningBoundingBox.Enabled     = bOpeningSettingsAreEnabled;
                _tbOpeningName.Enabled            = bOpeningSettingsAreEnabled;
                _tbOpeningXOffset.Enabled         = bOpeningSettingsAreEnabled;
                _tbOpeningZOffset.Enabled         = bOpeningSettingsAreEnabled;
                _tbOpeningHeight.Enabled          = bOpeningSettingsAreEnabled;
                _tbOpeningWidth.Enabled           = bOpeningSettingsAreEnabled;

                return(true);
            }

            case HelloWallViewProperties.OPENING_NAME:
            {
                _tbOpeningName.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_BODY_REPRESENTATION:
            {
                IfcBodyRepresentation representation = HelloWallViewProperties.ConvertProperty <IfcBodyRepresentation>(strProperty, property);
                if (representation == IfcBodyRepresentation.ExtrudedPolygon)
                {
                    _rbOpeningExtrudedPolygon.Checked = true;
                }
                else
                {
                    _rbOpeningBRep.Checked = true;
                }

                return(true);
            }

            case HelloWallViewProperties.OPENING_EXTRUDED_POLYGON_IS_ENABLED:
            {
                _rbOpeningExtrudedPolygon.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_BOUNDING_BOX:
            {
                _cbOpeningBoundingBox.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_BOUNDING_BOX_IS_ENABLED:
            {
                _cbOpeningBoundingBox.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_X_OFFSET:
            {
                _tbOpeningXOffset.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_Z_OFFSET:
            {
                _tbOpeningZOffset.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_HEIGHT:
            {
                _tbOpeningHeight.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.OPENING_WIDTH:
            {
                _tbOpeningWidth.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }
            } // switch (strProperty)

            return(false);
        }
예제 #2
0
        /// <summary>
        /// Helper
        /// </summary>
        /// <returns></returns>
        private bool SetWindowProperty(string strProperty, object property)
        {
            switch (strProperty)
            {
            case HelloWallViewProperties.WINDOW_UI_IS_ENABLED:
            {
                _gbWindow.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_IS_ENABLED:
            {
                _cbWindow.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_SETTINGS_ARE_ENABLED:
            {
                bool bWindowSettingsAreEnabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                _rbWindowExtrudedPolygon.Enabled = bWindowSettingsAreEnabled;
                _rbWindowBRep.Enabled            = bWindowSettingsAreEnabled;
                _cbWindowBoundingBox.Enabled     = bWindowSettingsAreEnabled;
                _tbWindowName.Enabled            = bWindowSettingsAreEnabled;
                _tbWindowThickness.Enabled       = bWindowSettingsAreEnabled;
                _tbWindowYOffset.Enabled         = bWindowSettingsAreEnabled;
                _tbWindowHeight.Enabled          = bWindowSettingsAreEnabled;
                _tbWindowWidth.Enabled           = bWindowSettingsAreEnabled;

                return(true);
            }

            case HelloWallViewProperties.WINDOW_NAME:
            {
                _tbWindowName.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_BODY_REPRESENTATION:
            {
                IfcBodyRepresentation representation = HelloWallViewProperties.ConvertProperty <IfcBodyRepresentation>(strProperty, property);
                if (representation == IfcBodyRepresentation.ExtrudedPolygon)
                {
                    _rbWindowExtrudedPolygon.Checked = true;
                }
                else
                {
                    _rbWindowBRep.Checked = true;
                }

                return(true);
            }

            case HelloWallViewProperties.WINDOW_EXTRUDED_POLYGON_IS_ENABLED:
            {
                _rbWindowExtrudedPolygon.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_BOUNDING_BOX:
            {
                _cbWindowBoundingBox.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_THICKNESS:
            {
                _tbWindowThickness.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_Y_OFFSET:
            {
                _tbWindowYOffset.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_DIMENSIONS_UI_IS_ENABLED:
            {
                _tbWindowHeight.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);
                _tbWindowWidth.Enabled  = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_HEIGHT:
            {
                _tbWindowHeight.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WINDOW_WIDTH:
            {
                _tbWindowWidth.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }
            } // switch (strProperty)

            return(false);
        }
예제 #3
0
        /// <summary>
        /// Helper
        /// </summary>
        /// <returns></returns>
        private bool SetWallProperty(string strProperty, object property)
        {
            switch (strProperty)
            {
            case HelloWallViewProperties.WALL_IS_ENABLED:
            {
                _cbWall.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_SETTINGS_ARE_ENABLED:
            {
                bool bWallSettingsAreEnabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                _rbWallExtrudedPolygon.Enabled = bWallSettingsAreEnabled;
                _rbWallBRep.Enabled            = bWallSettingsAreEnabled;
                _cbWallBoundingBox.Enabled     = bWallSettingsAreEnabled;
                _tbWallName.Enabled            = bWallSettingsAreEnabled;
                _tbWallThickness.Enabled       = bWallSettingsAreEnabled;
                _tbWallHeight.Enabled          = bWallSettingsAreEnabled;
                _tbWallWidth.Enabled           = bWallSettingsAreEnabled;

                return(true);
            }

            case HelloWallViewProperties.WALL_NAME:
            {
                _tbWallName.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_BODY_REPRESENTATION:
            {
                IfcBodyRepresentation representation = HelloWallViewProperties.ConvertProperty <IfcBodyRepresentation>(strProperty, property);
                if (representation == IfcBodyRepresentation.ExtrudedPolygon)
                {
                    _rbWallExtrudedPolygon.Checked = true;
                }
                else
                {
                    _rbWallBRep.Checked = true;
                }

                return(true);
            }

            case HelloWallViewProperties.WALL_EXTRUDED_POLYGON_IS_ENABLED:
            {
                _rbWallExtrudedPolygon.Enabled = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_BOUNDING_BOX:
            {
                _cbWallBoundingBox.Checked = HelloWallViewProperties.ConvertProperty <bool>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_THICKNESS:
            {
                _tbWallThickness.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_HEIGHT:
            {
                _tbWallHeight.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }

            case HelloWallViewProperties.WALL_WIDTH:
            {
                _tbWallWidth.Text = HelloWallViewProperties.ConvertProperty <string>(strProperty, property);

                return(true);
            }
            } // switch (strProperty)

            return(false);
        }