예제 #1
0
 public Cylinder(double radius, double height, Shapetype.Material mtype) : base(mtype)
 {
     _shape = Shapetype.Geometry.CYLINDER;
     Radius = radius;
     Height = height;
     _amount++;
 }
예제 #2
0
 public Pyramid(double side, double height, Shapetype.Material mtype) : base(mtype)
 {
     _shape = Shapetype.Geometry.PYRAMID;
     Side   = side;
     Height = height;
     _amount++;
 }
예제 #3
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string material = comboBox1.SelectedItem.ToString();

            _mtype        = MaterialTable.MarerialType(material);
            textBox1.Text = MaterialTable.Density(material).ToString();
        }
예제 #4
0
 public static double Density(Shapetype.Material mtype)
 {
     foreach (var e in element)
     {
         if (e.MaterialType == mtype)
         {
             return(e.Density);
         }
     }
     return(0);
 }
예제 #5
0
 public Shape3D(Shapetype.Material mtype)
 {
     _material = mtype;
     _amount++;
 }
예제 #6
0
 public Shape3D()
 {
     _material = Shapetype.Material.UNKNOWN;
     _amount++;
 }
예제 #7
0
 public Ball(double radius, Shapetype.Material mtype) : base(mtype)
 {
     _shape = Shapetype.Geometry.BALL;
     Radius = radius;
     _amount++;
 }
예제 #8
0
 public Cube(double side, Shapetype.Material mtype) : base(mtype)
 {
     _shape = Shapetype.Geometry.CUBE;
     Side   = side;
     _amount++;
 }
예제 #9
0
 public Element(Shapetype.Material mtype, string name, double density)
 {
     MaterialType = mtype;
     Name         = name;
     Density      = density;
 }