コード例 #1
0
        public CCantileverBeam(string filename)
        {
            if (File.Exists(filename))
            {
                this._Name = filename;
                FileInfo f = new FileInfo(filename);
                using (FileStream fs = f.Open(FileMode.Open, FileAccess.Read, FileShare.Read))
                {
                    using (BinaryReader br = new BinaryReader(fs))
                    {
                        this._L         = br.ReadDouble();
                        this._P         = br.ReadDouble();
                        this._AllowDelt = br.ReadDouble();

                        _BeamH = br.ReadDouble();
                        _BeamB = br.ReadDouble();

                        _VarParameters    = new CVar[2];
                        _VarParameters[0] = new CVar("Высота сечения балки", hMin, hMax, _BeamH);
                        _VarParameters[1] = new CVar("Ширина сечения балки", bMin, bMax, _BeamB);
                    }
                }
            }
            else
            {
                Console.WriteLine("Файл не найден");
                return;
            }
        }
コード例 #2
0
 public CCantileverBeam(string filename, double beamLength, double load, double allowdelt)
 {
     this._L           = beamLength;
     this._P           = load * g;
     this._AllowDelt   = allowdelt;
     this._Name        = filename;
     _VarParameters    = new CVar[2];
     _VarParameters[0] = new CVar("Высота сечения балки", hMin, hMax, _BeamH);
     _VarParameters[1] = new CVar("Ширина сечения балки", bMin, bMax, _BeamB);
 }