public clsProduct(clsUnit.eSystem UnitSystem_In, clsDB DB_In) //============================================================ { //PB 23JAN13. At the time of instantiation of this object, the Bearing Type & Bearing Design, EndConfig [0,1] Types are //....known. Hence, instantiate mBearing & mEndConfig [0,1] using the above info. To be done in the future. // Initialize. // ----------- // //....Unit System. mUnit = new clsUnit(); //....Default unit = English (automatically). mUnit.System = UnitSystem_In; //....Bearing. mBearing = new clsBearing_Radial_FP(mUnit.System, clsBearing_Radial.eDesign.Flexure_Pivot, this); //....End Plates: clsEndPlate.eType[] pEndPlate = new clsEndPlate.eType[2]; for (int i = 0; i < pEndPlate.Length; i++) { pEndPlate[i] = clsEndPlate.eType.Seal; //....Default cofigs = [Seal, Seal] } mEndPlate = new clsEndPlate[2]; for (int i = 0; i < 2; i++) { mEndPlate[i] = new clsSeal(mUnit.System, this); } }
public clsDrainHoles(clsSeal CurrentSeal_In, clsProduct CurrentProduct_In) //======================================================================== { mCurrentProduct = CurrentProduct_In; mCurrent_Seal = CurrentSeal_In; //....Initialize: Default Values. mAnnulus.Ratio_L_H = 2.0F; mAngExit = 45.0F; }
private void Import_Analytical_Data() //=================================== { string pExcelFileName = ""; ////openFileDialog1.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; openFileDialog1.Filter = "XLRadial files|*.xls;*.xlsx"; openFileDialog1.FilterIndex = 1; openFileDialog1.InitialDirectory = modMain.gFiles.File_InputPath; //"C:\\"; openFileDialog1.Title = "Open"; openFileDialog1.FileName = " "; if (openFileDialog1.ShowDialog() == DialogResult.OK) { Cursor = Cursors.WaitCursor; pExcelFileName = openFileDialog1.FileName; //....EndConfig: Seal clsSeal[] mEndSeal = new clsSeal[2]; for (int i = 0; i < 2; i++) { if (modMain.gProject.Product.EndPlate[i].Type == clsEndPlate.eType.Seal) { mEndSeal[i] = (clsSeal)((clsSeal)(modMain.gProject.Product.EndPlate[i])).Clone(); } } modMain.gFiles.Retrieve_Params_XLRadial(pExcelFileName, mProject.PNR.Unit.System, mOpCond, (clsBearing_Radial_FP)modMain.gProject.Product.Bearing, mEndSeal); for (int i = 0; i < 2; i++) { if (modMain.gProject.Product.EndPlate[i].Type == clsEndPlate.eType.Seal) { modMain.gProject.Product.EndPlate[i] = (clsSeal)mEndSeal[i].Clone(); } } modMain.gOpCond = (clsOpCond)mOpCond.Clone(); Cursor = Cursors.Default; DisplayData(); } }
private void Import_Analytical_Data() //=================================== { string pExcelFileName = ""; openFileDialog1.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; openFileDialog1.FilterIndex = 1; openFileDialog1.InitialDirectory = "C:\\"; openFileDialog1.Title = "Open"; openFileDialog1.FileName = " "; if (openFileDialog1.ShowDialog() == DialogResult.OK) { Cursor = Cursors.WaitCursor; pExcelFileName = openFileDialog1.FileName; //....EndConfig: Seal clsSeal[] mEndSeal = new clsSeal[2]; for (int i = 0; i < 2; i++) { if (modMain.gProject.Product.EndPlate[i].Type == clsEndPlate.eType.Seal) { mEndSeal[i] = (clsSeal)((clsSeal)(modMain.gProject.Product.EndPlate[i])).Clone(); } } ////modMain.gEXCEL_Analysis.Retrieve_Params_XLRadial(pExcelFileName, mOpCond, (clsBearing_Radial_FP)modMain.gProject.Product.Bearing, mEndSeal); for (int i = 0; i < 2; i++) { if (modMain.gProject.Product.EndPlate[i].Type == clsEndPlate.eType.Seal) { modMain.gProject.Product.EndPlate[i] = (clsSeal)mEndSeal[i].Clone(); } } Cursor = Cursors.Default; //SqlConnection pConnection = new SqlConnection(); //string pstrQuery = "Select * from " + TableName_In; //SqlDataReader pDR = modMain.gDB.GetDataReader(pstrQuery, ref pConnection); //List<string> pParameterName = new List<string>(); //List<string> pExcelSheetName = new List<string>(); //List<string> pCellName = new List<string>(); //List<string> pCellRange_Start = new List<string>(); //List<string> pCellRange_End = new List<string>(); //while (pDR.Read()) //{ // pParameterName.Add(Convert.ToString(pDR["fldParameter"])); // pExcelSheetName.Add(Convert.ToString(pDR["fldWorkSheet"])); // pCellName.Add(Convert.ToString(pDR["fldCellNo"])); // pCellRange_Start.Add(Convert.ToString(pDR["fldCellNo_Start"])); // pCellRange_End.Add(Convert.ToString(pDR["fldCellNo_End"])); //} //pDR.Close(); //if (mblnCmd_XLKMC) //{ // modMain.gEXCEL_Analysis.Retrieve_Params_XLKMC(pExcelFileName, pParameterName, pExcelSheetName, pCellName, pCellRange_Start, pCellRange_End, // mOpCond, (clsBearing_Radial_FP)modMain.gProject.Product.Bearing); //} //int pEndConfig_Pos = 0; //if (mblnCmd_XLThrust_Front) //{ // pEndConfig_Pos = 0; // modMain.gEXCEL_Analysis.Retrieve_Params_XLTHRUST(pExcelFileName, pParameterName, pExcelSheetName, pCellName, pCellRange_Start, pCellRange_End, // mOpCond, pEndConfig_Pos, (clsBearing_Thrust_TL)modMain.gProject.Product.EndConfig[pEndConfig_Pos]); //} //else if (mblnCmd_XLThrust_Back) //{ // pEndConfig_Pos = 1; // modMain.gEXCEL_Analysis.Retrieve_Params_XLTHRUST(pExcelFileName, pParameterName, pExcelSheetName, pCellName, pCellRange_Start, pCellRange_End, // mOpCond, pEndConfig_Pos, (clsBearing_Thrust_TL)modMain.gProject.Product.EndConfig[pEndConfig_Pos]); //} DisplayData(); } }