public double CalcSoilVolume(TankShape tankShape, double soilHeight) { ITank tank = GetTank(tankShape, TankProperties); double result = tank.CalcSoilVolume(soilHeight); return(result); }
public ITank GetTank(TankShape tankShape, string str) { Type tankType = ALData.TankTypes[(int)tankShape]; ITank result = (ITank)StringSerializer.Deserialize(tankType, str); return(result); }
public double CalcWaterVolume(TankShape tankShape, double underfillHeight, double soilHeight) { ITank tank = GetTank(tankShape, TankProperties); double result = tank.CalcWaterVolume(underfillHeight, soilHeight); return(result); }
public double CalcTankVolume(TankShape tankShape) { ITank tank = GetTank(tankShape, TankProperties); double result = tank.CalcTankVolume(); return(result); }
public void RefreshProps(TankShape tankShape) { ITank tank = fRecord.GetTank(tankShape, fRecord.TankProperties); TypeDescriptor.AddAttributes(tank, new Attribute[] { new ReadOnlyAttribute(true) }); tank.SetPropNames(); fView.PropsGrid.SelectedObject = tank; RecalcValues(); }
public void EditTank() { if (fRecord == null) { return; } TankShape tankShape = fView.ShapeCombo.GetSelectedTag <TankShape>(); var tank = fRecord.GetTank(tankShape, fRecord.TankProperties); IBrowser browser = fModel.Browser; if (browser.EditTank(tank)) { fRecord.Tank = tank; RefreshProps(tankShape); } }
public double CalcWaterVolume(TankShape tankShape) { return(CalcWaterVolume(tankShape, UnderfillHeight, SoilHeight)); }