Example #1
0
        private void defineFields()
        {
            int    diam  = Block.GetPropValue <int>(PropNameDiam);
            int    len   = Block.GetPropValue <int>(PropNameLength);
            int    t     = Block.GetPropValue <int>(PropNameThickness);
            string wuAtr = Block.GetPropValue <string>(PropNameWeightUnit);

            //double wu = double.Parse(wuAtr);
            //string mark = Block.GetPropValue<string>(PropNameMark);
            Tube = new Tube(diam, t, len, this);
            Tube.Calc();
        }
Example #2
0
        public override void Calculate()
        {
            string mark   = Block.GetPropValue <string>(propMark);
            double diam   = Block.GetPropValue <double>(propDiam);
            double depth  = Block.GetPropValue <double>(propDepth);
            int    length = Block.GetPropValue <int>(propLength);
            string role   = SlabService.GetRole(Block);
            string desc   = Block.GetPropValue <string>(propDesc, false);

            sleeve = new SlabSleeve(mark, diam, depth, length, role, desc, this);
            AddElement(sleeve);

            //double weightUnit = Block.GetPropValue<double>(propWeightUnit, isRequired:false);
            tube      = new Tube(diam, depth, length, this);
            tube.Mark = mark;
            tube.Calc();
            AddElement(tube);
        }