public AnalizedLensPage(computeLensRequestDTO computeLensRequest, computeLensResponseDTO computeLensResponse)
        {
            InitializeComponent();

            this.computeLensRequest  = computeLensRequest;
            this.computeLensResponse = computeLensResponse;
        }
        private async void ComputeLens()
        {
            IsBusy = true;

            computeLensRequestDTO request = null;

            switch (Design)
            {
            case LensType.Digit:
                request = new computeDigitLensRequestDTO()
                {
                    far              = FarZone,
                    farSpecified     = true,
                    near             = NearZone,
                    nearSpecified    = true,
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Punctual:
                request = new computePunctualLensRequestDTO()
                {
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Vario:
                request = new computeVarioLensRequestDTO()
                {
                    far              = FarZone,
                    farSpecified     = true,
                    near             = NearZone,
                    nearSpecified    = true,
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Iflex:
                request = new computeIflexLensRequestDTO()
                {
                    far              = FarZone,
                    farSpecified     = true,
                    near             = NearZone,
                    nearSpecified    = true,
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Iprof:
                request = new computeIprofLensRequestDTO()
                {
                    near             = NearZone,
                    nearSpecified    = true,
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Iprog:
                request = new computeIprogLensRequestDTO()
                {
                    near             = NearZone,
                    nearSpecified    = true,
                    channel          = Channel,
                    channelSpecified = true
                };
                break;

            case LensType.Magic:
                request = new computeMagicLensRequestDTO();
                break;

            case LensType.Office:
                request = new computeOfficeLensRequestDTO();
                break;

            case LensType.Fantasy:
                request = new computeFantasyLensRequestDTO();
                break;
            }

            request.preview                                   = false;
            request.previewSpecified                          = true;
            request.verticalPrismThinning                     = true;
            request.verticalPrismThinningSpecified            = true;
            request.horizontalPrismThinning                   = false;
            request.horizontalPrismThinningSpecified          = true;
            request.horizontalPrismThinningHeight             = 0;
            request.horizontalPrismThinningHeightSpecified    = true;
            request.prismThinningCompensation                 = false;
            request.prismThinningCompensationSpecified        = true;
            request.maximumPrismThinningCompensation          = 0;
            request.maximumPrismThinningCompensationSpecified = true;
            request.atoric                      = false;
            request.atoricSpecified             = true;
            request.pantoscopicAngle            = 9;
            request.pantoscopicAngleSpecified   = true;
            request.wrappingAngle               = 6;
            request.wrappingAngleSpecified      = true;
            request.backVertexDistance          = 13;
            request.backVertexDistanceSpecified = true;
            request.eyeDiameter                 = 26;
            request.eyeDiameterSpecified        = true;
            request.readDistance                = 330;
            request.readDistanceSpecified       = true;

            request.left = new computeLensRequestSideDTO()
            {
                sphere                               = LeftSphere,
                sphereSpecified                      = true,
                cylinder                             = LeftCylinder,
                cylinderSpecified                    = true,
                cylinderAxis                         = LeftCylinderAxis,
                cylinderAxisSpecified                = true,
                addiction                            = LeftAddiction,
                addictionSpecified                   = true,
                horizontalDiameter                   = 70,
                horizontalDiameterSpecified          = true,
                verticalDiameter                     = 70,
                verticalDiameterSpecified            = true,
                refractiveIndex                      = RefractionIndex.Value,
                refractiveIndexSpecified             = true,
                toolRealBase                         = LeftToolRealBase,
                toolRealBaseSpecified                = true,
                toolIndex                            = 1.498,
                toolIndexSpecified                   = true,
                prescriptedPrism                     = 0,
                prescriptedPrismSpecified            = true,
                prescriptedPrismBase                 = 0,
                prescriptedPrismBaseSpecified        = true,
                secondaryPrism                       = 0,
                secondaryPrismSpecified              = true,
                secondaryPrismBase                   = 0,
                secondaryPrismBaseSpecified          = true,
                minimalCentralThickness              = 2,
                minimalCentralThicknessSpecified     = true,
                minimalSideThickness                 = 2,
                minimalSideThicknessSpecified        = true,
                horizontalDecentralization           = 0,
                horizontalDecentralizationSpecified  = true,
                verticalDecentralization             = 0,
                verticalDecentralizationSpecified    = true,
                monocularCentrationDistance          = 32,
                monocularCentrationDistanceSpecified = true,
                inset          = 2.2,
                insetSpecified = true
            };
            request.right = new computeLensRequestSideDTO()
            {
                sphere                               = RightSphere,
                sphereSpecified                      = true,
                cylinder                             = RightCylinder,
                cylinderSpecified                    = true,
                cylinderAxis                         = RightCylinderAxis,
                cylinderAxisSpecified                = true,
                addiction                            = RightAddiction,
                addictionSpecified                   = true,
                horizontalDiameter                   = 70,
                horizontalDiameterSpecified          = true,
                verticalDiameter                     = 70,
                verticalDiameterSpecified            = true,
                refractiveIndex                      = RefractionIndex.Value,
                refractiveIndexSpecified             = true,
                toolRealBase                         = RightToolRealBase,
                toolRealBaseSpecified                = true,
                toolIndex                            = 1.498,
                toolIndexSpecified                   = true,
                prescriptedPrism                     = 0,
                prescriptedPrismSpecified            = true,
                prescriptedPrismBase                 = 0,
                prescriptedPrismBaseSpecified        = true,
                secondaryPrism                       = 0,
                secondaryPrismSpecified              = true,
                secondaryPrismBase                   = 0,
                secondaryPrismBaseSpecified          = true,
                minimalCentralThickness              = 2,
                minimalCentralThicknessSpecified     = true,
                minimalSideThickness                 = 2,
                minimalSideThicknessSpecified        = true,
                horizontalDecentralization           = 0,
                horizontalDecentralizationSpecified  = true,
                verticalDecentralization             = 0,
                verticalDecentralizationSpecified    = true,
                monocularCentrationDistance          = 32,
                monocularCentrationDistanceSpecified = true,
                inset          = 2.2,
                insetSpecified = true
            };

            computeLensResponseDTO response = await Task.Run(() => computeSoapClient.computeLens(request)) as computeLensResponseDTO;

            if (!(response is null))
            {
                ResponseComputed.Invoke(this, Tuple.Create(request, response));
            }

            IsBusy = false;
        }