Esempio n. 1
0
        public bool Compare(ref clsAccessories Accessories_In)
        //====================================================
        {
            bool mblnVal_Changed = false;
            int  pRetValue       = 0;

            if (modMain.CompareVar(Accessories_In.TempSensor.Supplied,
                                   mTempSensor.Supplied, pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.TempSensor.Name.ToString(),
                                   mTempSensor.Name.ToString(), pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.TempSensor.Count,
                                   mTempSensor.Count, pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.TempSensor.Type.ToString(),
                                   mTempSensor.Type.ToString(), pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.WireClip.Supplied,
                                   mWireClip.Supplied, pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.WireClip.Count,
                                   mWireClip.Count, pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            if (modMain.CompareVar(Accessories_In.WireClip.Size.ToString(),
                                   mWireClip.Size.ToString(), pRetValue) > 0)
            {
                mblnVal_Changed = true;
            }

            return(mblnVal_Changed);
        }
Esempio n. 2
0
        //....Class Constructor
        //public clsProduct(clsUnit.eSystem UnitSystem_In, clsBearing.eType Type_In, clsBearing_Radial_FP.eDesign Design_In,
        //                  clsEndConfig.eType [] EndConfigType_In, clsDB DB_In)
        ////================================================================================================================
        //{
        //    mUnit.System = UnitSystem_In;

        //    //Main Component.
        //    //---------------
        //    //
        //    if (Type_In == clsBearing.eType.Radial)
        //    {
        //        if (Design_In == clsBearing_Radial.eDesign.Flexure_Pivot)
        //        {
        //            mBearing = new clsBearing_Radial_FP(UnitSystem_In, Type_In, Design_In, DB_In, this);
        //        }
        //    }


        //    //End Configurations:
        //    //-------------------
        //    //
        //    mEndConfig = new clsEndConfig[2];
        //    for (int i = 0; i < 2; i++)
        //    {
        //        if (EndConfigType_In [i]== clsEndConfig.eType.Seal)                                 //....End Seal.
        //        {
        //            mEndConfig[i] = new clsSeal (UnitSystem_In, EndConfigType_In [i], DB_In, this);
        //        }
        //        else if (EndConfigType_In[i] == clsEndConfig.eType.Thrust_Bearing_TL)               //....End TB.
        //        {
        //            mEndConfig[i] = new clsBearing_Thrust_TL (UnitSystem_In, EndConfigType_In [i], DB_In, this);
        //        }
        //    }


        //    //Accessories.
        //    //---------------
        //    //
        //    mAccessories = new clsAccessories();
        //}


        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(clsUnit.eSystem.English, clsBearing.eType.Radial,
            //                                    clsBearing_Radial.eDesign.Flexure_Pivot, DB_In, this);

            mBearing = new clsBearing_Radial_FP(mUnit.System, clsBearing.eType.Radial,
                                                clsBearing_Radial.eDesign.Flexure_Pivot, DB_In, this);

            //....End Configurations:
            clsEndConfig.eType[] pEndConfig = new clsEndConfig.eType[2];

            for (int i = 0; i < pEndConfig.Length; i++)
            {
                pEndConfig[i] = clsEndConfig.eType.Seal;        //....Default cofigs = [Seal, Seal]
            }
            mEndConfig = new clsEndConfig[2];

            for (int i = 0; i < 2; i++)
            {
                mEndConfig[i] = new clsSeal(mUnit.System, pEndConfig[i], DB_In, this);
            }


            //....Accessories.
            mAccessories = new clsAccessories();
        }
Esempio n. 3
0
 private void SetLocalObject()
 //===========================
 {
     mAccessories = (clsAccessories)modMain.gProject.Product.Accessories.Clone();
 }