Esempio n. 1
0
 protected RectangleSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.PreCastConcreteGirderU) : base(app, material, name, type)
 {
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shell{T}" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 protected Shell(
     ApiCSiApplication app,
     Materials.Materials material,
     string name) : base(app, material, name)
 {
     _sectionProperties = new T();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Wall" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 protected Wall(
     ApiCSiApplication app,
     Materials.Materials material,
     string name)
     : base(app, material, name)
 {
 }
Esempio n. 4
0
 protected ColdHatSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.ColdHat) : base(app, material, name, type)
 {
 }
 protected RectangleSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.BuiltUpUHybrid) : base(app, material, name, type)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameSection" /> class.
 /// </summary>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 protected FrameSection(
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.All)
     : base(material, name, type)
 {
     _sectionProperties = new T();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameSection" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 protected FrameSection(ApiCSiApplication app,
                        Materials.Materials material,
                        string name,
                        eFrameSectionType type = eFrameSectionType.All)
     : base(app, material, name, type)
 {
     _sectionProperties = new T();
 }
 /// <summary>
 /// Adds the specified application.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="uniqueName">Name of the unique.</param>
 /// <param name="properties">The properties.</param>
 /// <returns>TeeSection.</returns>
 internal static SteelTeeSection Add(
     ApiCSiApplication app,
     Materials.Materials material,
     string uniqueName,
     SteelTeeSectionProperties properties)
 {
     setApi(getApiFrameSection(app), uniqueName, properties);
     return(Factory(app, material, uniqueName, properties));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AreaSection" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 protected AreaSection(ApiCSiApplication app,
                       Materials.Materials material,
                       string name,
                       eAreaSectionType type = eAreaSectionType.All)
     : base(app, material, name)
 {
     _sectionProperties = new T();
     AreaType           = type;
 }
Esempio n. 10
0
        internal new static RectangleSection Factory(
            ApiCSiApplication app, 
            Materials.Materials material,
            string uniqueName)
        {
            RectangleSection frameSection = new RectangleSection(app, material, uniqueName);
            frameSection.FillData();

            return frameSection;
        }
Esempio n. 11
0
 /// <summary>
 /// Adds the specified application.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="uniqueName">Name of the unique.</param>
 /// <param name="properties">The properties.</param>
 /// <returns>Wall.</returns>
 internal static Wall Add(
     ApiCSiApplication app,
     Materials.Materials material,
     string uniqueName,
     WallProperties properties)
 {
     if (properties == null) return null;
     setApi(getApiAreaSection(app), uniqueName, properties);
     return Factory(app, material, uniqueName, properties);
 }
Esempio n. 12
0
        internal new static ColdHatSection Factory(
            ApiCSiApplication app,
            Materials.Materials material,
            string uniqueName)
        {
            ColdHatSection frameSection = new ColdHatSection(app, material, uniqueName);

            frameSection.FillData();

            return(frameSection);
        }
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static SteelAngleSection Factory(
            Materials.Materials material,
            string uniqueName,
            SteelAngleSectionProperties properties = null)
        {
            SteelAngleSection frameSection = new SteelAngleSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 14
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>ConcreteLSection.</returns>
        internal static ConcreteLSection Factory(
            Materials.Materials material,
            string uniqueName,
            ConcreteLSectionProperties properties = null)
        {
            ConcreteLSection frameSection = new ConcreteLSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 15
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Slab Factory(
            Materials.Materials material,
            string uniqueName,
            SlabProperties properties = null)
        {
            Slab areaSection = new Slab(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(areaSection);
        }
Esempio n. 16
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Wall Factory(
            Materials.Materials material,
            string uniqueName,
            WallProperties properties = null)
        {
            Wall areaSection = new Wall(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(areaSection);
        }
Esempio n. 17
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Plane Factory(
            Materials.Materials material,
            string uniqueName,
            PlaneProperties properties = null)
        {
            Plane areaSection = new Plane(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(areaSection);
        }
Esempio n. 18
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>CircleSection.</returns>
        internal static RodSection Factory(
            Materials.Materials material,
            string uniqueName,
            CircleSectionProperties properties = null)
        {
            RodSection frameSection = new RodSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 19
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static ASolid Factory(
            Materials.Materials material,
            string uniqueName,
            ASolidProperties properties = null)
        {
            ASolid areaSection = new ASolid(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(areaSection);
        }
Esempio n. 20
0
        /// <summary>
        /// Returns a new cross-section.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Unique name.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>TubeSection.</returns>
        internal static HybridUSection Factory(
            Materials.Materials material,
            string uniqueName,
            HybridUSectionProperties properties = null)
        {
            HybridUSection frameSection = new HybridUSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 21
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Deck Factory(
            Materials.Materials material,
            string uniqueName,
            DeckProperties properties = null)
        {
            Deck areaSection = new Deck(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(areaSection);
        }
        /// <summary>
        /// Returns a new cross-section.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Unique name.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>TubeSection.</returns>
        internal static PrecastUSection Factory(
            Materials.Materials material,
            string uniqueName,
            PrecastUSectionProperties properties = null)
        {
            PrecastUSection frameSection = new PrecastUSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>GeneralSection.</returns>
        internal static GeneralSection Factory(
            Materials.Materials material,
            string uniqueName,
            GeneralSectionProperties properties = null)
        {
            GeneralSection frameSection = new GeneralSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 24
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>DoubleChannelSection.</returns>
        internal static DoubleChannelSection Factory(
            Materials.Materials material,
            string uniqueName,
            DoubleChannelSectionProperties properties = null)
        {
            DoubleChannelSection frameSection = new DoubleChannelSection(material, uniqueName)
            {
                _sectionProperties = properties
            };

            return(frameSection);
        }
Esempio n. 25
0
 /// <summary>
 /// Adds the specified application.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="uniqueName">Name of the unique.</param>
 /// <param name="properties">The properties.</param>
 /// <returns>Plane.</returns>
 internal static Plane Add(
     ApiCSiApplication app,
     Materials.Materials material,
     string uniqueName,
     PlaneProperties properties)
 {
     if (properties == null)
     {
         return(null);
     }
     setApi(getApiAreaSection(app), uniqueName, properties);
     return(Factory(app, material, uniqueName, properties));
 }
Esempio n. 26
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Wall Factory(
            ApiCSiApplication app,
            Materials.Materials material,
            string uniqueName,
            WallProperties properties = null)
        {
            Wall areaSection = new Wall(app, material, uniqueName) { _sectionProperties = properties };
            if (properties == null)
            {
                areaSection.FillData();
            }

            return areaSection;
        }
Esempio n. 27
0
        public static Dictionary <string, Materials.Materials> loadCSVile()
        {
            Dictionary <string, Materials.Materials> materialsDictionary = new Dictionary <string, Materials.Materials>();

            try
            {
                using (var sr = new System.IO.StreamReader(@"Material.csv"))
                {
                    while (!sr.EndOfStream)
                    {
                        var line   = sr.ReadLine();
                        var values = line.Split(',');
                        Materials.Materials materials = new Materials.Materials(
                            values[0], Convert.ToInt32(values[1]), Convert.ToInt32(values[2]),
                            Convert.ToInt32(values[3]), Convert.ToInt32(values[4]), Convert.ToInt32(values[5]),
                            Convert.ToInt32(values[6]), Convert.ToInt32(values[7]), Convert.ToInt32(values[8]));
                        materialsDictionary = Materials.MaterialUpdateUtil.updateMaterialsDictionary(materialsDictionary, materials);
                    }
                }
            }
            catch (System.Exception e)
            {
                throw new Exception(e.ToString());
            }

            /*
             * using (MaterialsLogDBContex context = new MaterialsLogDBContex())
             * {
             *  Models.MaterialsLog materialsLog;
             *  foreach(Materials.Materials materials in materialsDictionary.Values)
             *  {
             *      materialsLog = new Models.MaterialsLog();
             *      materialsLog.InsertDate = materials.Date;
             *      materialsLog.Fuel = materials.Fuel;
             *      materialsLog.Ammunition = materials.Ammunition;
             *      materialsLog.Steel = materials.Steel;
             *      materialsLog.Bauxite = materials.Bauxite;
             *      materialsLog.DevelopmentMaterials = materials.DevelopmentMaterials;
             *      materialsLog.InstantRepairMaterials = materials.InstantRepairMaterials;
             *      materialsLog.InstantBuildMaterials = materials.InstantBuildMaterials;
             *      materialsLog.ImprovementMaterials = materials.ImprovementMaterials;
             *      context.MaterialsLogs.Add(materialsLog);
             *  }
             *  context.SaveChanges();
             * }
             */
            return(materialsDictionary);
        }
Esempio n. 28
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static Plane Factory(
            ApiCSiApplication app,
            Materials.Materials material,
            string uniqueName,
            PlaneProperties properties = null)
        {
            Plane areaSection = new Plane(app, material, uniqueName)
            {
                _sectionProperties = properties
            };

            if (properties == null)
            {
                areaSection.FillData();
            }

            return(areaSection);
        }
Esempio n. 29
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>AngleSection.</returns>
        internal static ASolid Factory(
            ApiCSiApplication app,
            Materials.Materials material,
            string uniqueName,
            ASolidProperties properties = null)
        {
            ASolid areaSection = new ASolid(app, material, uniqueName)
            {
                _sectionProperties = properties
            };

            if (properties == null)
            {
                areaSection.FillData();
            }

            return(areaSection);
        }
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="material">The material.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="properties">The properties.</param>
        /// <returns>TeeSection.</returns>
        internal static SteelTeeSection Factory(
            ApiCSiApplication app,
            Materials.Materials material,
            string uniqueName,
            SteelTeeSectionProperties properties = null)
        {
            SteelTeeSection frameSection = new SteelTeeSection(app, material, uniqueName)
            {
                _sectionProperties = properties
            };

            if (properties == null)
            {
                frameSection.FillData();
            }

            return(frameSection);
        }