Exemplo n.º 1
0
        private void Set_ZoneLength2()
        {
            //getting large diameter
            EDiameters valueLD   = (EDiameters)global.GDMPage04.DataModelRadial1.SelectedIndexLargeDiameter; //TODO - check this strict dependency to the index in the list. Maybe add in tag a reference?
            var        BSShapeLD = global.GDMPage12.DataModelShapesCollection.Where(x => x.Reference == valueLD).SingleOrDefault();

            if (BSShapeLD == null)
            {
                throw new Exception("Diameter Value " + Enum.GetName(typeof(EDiameters), valueLD) + " is not added in DataModelShapesCollection");
            }
            int nominalSizeLargeDiameter = BSShapeLD.NominalSize;

            //getting edge circular diameter
            EDiameters        valueEC   = (EDiameters)global.GDMPage04.DataModelCircularGeneral.SelectedDiameterEdgeCirculars; //TODO - check this strict dependency to the index in the list. Maybe add in tag a reference?
            DataModelBSShapes BSShapeEC = global.GDMPage12.DataModelShapesCollection.Where(x => x.Reference == valueEC).SingleOrDefault();

            if (BSShapeEC == null)
            {
                throw new Exception("Diameter Value " + Enum.GetName(typeof(EDiameters), valueEC) + " is not added in DataModelShapesCollection");
            }
            int nominalSizeEdgeCircular = BSShapeEC.NominalSize;

            //TODO : Alex - simplify formula???
            ZoneLength2 = global.GDMPage01.DataModel_Global_Formwork.DFoundation / 2 - EdgeOffset2
                          - (global.GDMPage01.DataModel_Global_Formwork.DTowerBase / 2 - global.GDMPage01.DataModel_Global_Formwork.EdgeCover)
                          - nominalSizeLargeDiameter - nominalSizeEdgeCircular - ZoneLength1;
        }
Exemplo n.º 2
0
            //TODO : Helper function to be made global
            public int GetNominalDiameterSize(int selectedIndex)
            {
                EDiameters        ediameter = (EDiameters)selectedIndex; //TODO : Check this dependency on index
                DataModelBSShapes shape     = DataModelShapesCollection.Where(x => x.Reference == ediameter).SingleOrDefault();

                if (shape == null)
                {
                    throw new Exception("Selected diameter is not found in the shape collection");
                }
                return(shape.NominalSize);
            }