//============================================================================* // Copy() //============================================================================* public override void Copy(cGear Gear) { if (Gear.GearType != eGearTypes.Scope) { return; } base.Copy(Gear); cScope Scope = (cScope)Gear; m_strPower = Scope.m_strPower; m_strObjective = Scope.m_strObjective; m_nTubeSize = Scope.m_nTubeSize; m_eTubeMeasurement = Scope.m_eTubeMeasurement; m_eTurretType = Scope.m_eTurretType; m_dTurretClick = Scope.m_dTurretClick; m_strBattery = Scope.m_strBattery; m_dEyeRelief = Scope.m_dEyeRelief; FixTubeSize(); }
//============================================================================* // TubeMeasurementString Property //============================================================================* public static string TubeMeasurementString(eTubeMeasurements eTubeMeasurement) { switch (eTubeMeasurement) { case eTubeMeasurements.Inch: return("in"); case eTubeMeasurements.Millimeter: return("mm"); } return(""); }
//============================================================================* // FixTubeSize() //============================================================================* public void FixTubeSize() { if (m_nTubeSize == 0) { if (m_eTubeSize == 0) { m_nTubeSize = 1; m_eTubeMeasurement = eTubeMeasurements.Inch; } else { m_nTubeSize = 30; m_eTubeMeasurement = eTubeMeasurements.Millimeter; } } }