Example #1
0
        private void RedrawCabinetElements()
        {
            Logger.Info("RedrawCabinetElements in Cabinet");
            _leftSide.SetDescription(_leftSide.ChangeDescription ? _leftSide.Description : "Bok Lewy", false);
            _leftSide.SetHeight(_leftSide.ChangeHeight ? _leftSide.Height : _height, false);
            _leftSide.SetWidth(_leftSide.ChangeWidth ? _leftSide.Width : _sizeElement, false);
            _leftSide.SetDepth(_leftSide.ChangeDepth ? _leftSide.Depth : _depth, false);
            _leftSide.SetX(_leftSide.ChangeX ? _leftSide.X : 0, false);
            _leftSide.SetY(_leftSide.ChangeY ? _leftSide.Y : 0, false);
            _leftSide.SetZ(_leftSide.ChangeZ ? _leftSide.Z : SwitchBack.ValueAxisZbyBackTypeAndSize(this), false);
            _leftSide.SetEnumName(EnumCabinetElement.Leftside);
            _leftSide.SetHorizontal(false);

            _rightSide.SetDescription(_rightSide.ChangeDescription ? _rightSide.Description : "Bok Prawy", false);
            _rightSide.SetHeight(_rightSide.ChangeHeight ? _rightSide.Height : _height, false);
            _rightSide.SetWidth(_rightSide.ChangeWidth ? _rightSide.Width : _sizeElement, false);
            _rightSide.SetDepth(_rightSide.ChangeDepth ? _rightSide.Depth : _depth, false);
            _rightSide.SetX(_rightSide.ChangeX ? _rightSide.X : _width - _rightSide.Width, false);
            _rightSide.SetY(_rightSide.ChangeY ? _rightSide.Y : 0, false);
            _rightSide.SetZ(_rightSide.ChangeZ ? _rightSide.Z : SwitchBack.ValueAxisZbyBackTypeAndSize(this), false);
            _rightSide.SetEnumName(EnumCabinetElement.Rightside);
            _rightSide.SetHorizontal(false);

            _bottom.SetDescription(_bottom.ChangeDescription ? _bottom.Description : "Spód", false);
            _bottom.SetHeight(_bottom.ChangeHeight ? _bottom.Height : _width - _leftSide.Width - _rightSide.Width, false);
            _bottom.SetWidth(_bottom.ChangeWidth ? _bottom.Width : _sizeElement, false);
            _bottom.SetDepth(_bottom.ChangeDepth ? _bottom.Depth : _depth, false);
            _bottom.SetX(_bottom.ChangeX ? _bottom.X : _leftSide.Width, false);
            _bottom.SetY(_bottom.ChangeY ? _bottom.Y : 0, false);
            _bottom.SetZ(_bottom.ChangeZ ? _bottom.Z : SwitchBack.ValueAxisZbyBackTypeAndSize(this), false);
            _bottom.SetEnumName(EnumCabinetElement.Bottom);
            _bottom.SetHorizontal(true);

            _top.SetDescription(_top.ChangeDescription ? _top.Description : "Góra", false);
            _top.SetHeight(_top.ChangeHeight ? _top.Height : _width - _leftSide.Width - _rightSide.Width, false);
            _top.SetWidth(_top.ChangeWidth ? _top.Width : _sizeElement, false);
            _top.SetDepth(_top.ChangeDepth ? _top.Depth : _depth, false);
            _top.SetX(_top.ChangeX ? _top.X : _leftSide.Width, false);
            _top.SetY(_top.ChangeY ? _top.Y : _height - _top.Width, false);
            _top.SetZ(_top.ChangeZ ? _top.Z : SwitchBack.ValueAxisZbyBackTypeAndSize(this), false);
            _top.SetEnumName(EnumCabinetElement.Top);
            _top.SetHorizontal(true);
        }
Example #2
0
        private void GlobalCabinetElement()
        {
            Logger.Trace("Start GlobalCabinetElements");
            switch (CabinetType)
            {
            case EnumCabinetType.Standard:

                _leftSide = new ElementModel(
                    description: "Bok Lewy",
                    height: _height,
                    width: _sizeElement,
                    depth: _depth,
                    x: 0,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Leftside,
                    horizontal: false);

                _rightSide = new ElementModel(
                    description: "Bok Prawy",
                    height: _height,
                    width: _sizeElement,
                    depth: _depth,
                    x: _width - _sizeElement,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Rightside,
                    horizontal: false);

                _bottom = new ElementModel(
                    description: "Spód",
                    height: _width - 2 * _sizeElement,
                    width: _sizeElement,
                    depth: _depth,
                    x: _sizeElement,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Bottom,
                    horizontal: true);

                _top = new ElementModel(
                    description: "Góra",
                    height: _width - 2 * _sizeElement,
                    width: _sizeElement,
                    depth: _depth,
                    x: _sizeElement,
                    y: _height - _sizeElement,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Top,
                    horizontal: true);

                break;

            case EnumCabinetType.odwrotna:
                break;

            case EnumCabinetType.duzy_spod:
                break;

            case EnumCabinetType.duza_gora:
                break;

            default:

                _leftSide = new ElementModel(
                    description: "Bok Lewy",
                    height: _height,
                    width: _sizeElement,
                    depth: _depth,
                    x: 0,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Leftside,
                    horizontal: false);
                _rightSide = new ElementModel(
                    description: "Bok Prawy",
                    height: _height,
                    width: _sizeElement,
                    depth: _depth,
                    x: _width - _sizeElement,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Rightside,
                    horizontal: false);
                _bottom = new ElementModel(
                    description: "Spód",
                    height: _width - 2 * _sizeElement,
                    width: _sizeElement,
                    depth: _depth,
                    x: _sizeElement,
                    y: 0,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Bottom,
                    horizontal: true);
                _top = new ElementModel(
                    description: "Góra",
                    height: _width - 2 * _sizeElement,
                    width: _sizeElement,
                    depth: _depth,
                    x: _sizeElement,
                    y: _height - _sizeElement,
                    z: SwitchBack.ValueAxisZbyBackTypeAndSize(this),
                    enumCabinet: EnumCabinetElement.Top,
                    horizontal: true);

                break;
            }
            Logger.Trace("Start ChangeCabinetElement in GlobalCabinetElements");

            ChangeCabinetElement(EnumCabinetElement.Leftside, _leftSide);
            ChangeCabinetElement(EnumCabinetElement.Rightside, _rightSide);
            ChangeCabinetElement(EnumCabinetElement.Bottom, _bottom);
            ChangeCabinetElement(EnumCabinetElement.Top, _top);

            Logger.Trace("Stop ChangeCabinetElement in GlobalCabinetElements");
            Logger.Trace("Start GlobalCabinetElements");
        }