Esempio n. 1
0
        public static double GetSlope(string strShoulderSlope, CorridorState rwState, ShoulderSubbaseType shoulderSubbaseType, bool blnInsertLeft)
        {
            //IL_0050: Unknown result type (might be due to invalid IL or missing references)
            //IL_0055: Unknown result type (might be due to invalid IL or missing references)
            //IL_005b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0060: Unknown result type (might be due to invalid IL or missing references)
            //IL_006c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0074: Unknown result type (might be due to invalid IL or missing references)
            //IL_007a: Expected O, but got Unknown
            if (rwState == null)
            {
                throw new ArgumentNullException("rwState");
            }
            if (Versioned.IsNumeric(strShoulderSlope))
            {
                return(Conversion.Val(strShoulderSlope) / 100.0);
            }
            ObjectId  alignmentId = (!(rwState.CurrentAlignmentIsOffsetAlignment & rwState.CurrentAssemblyOffsetIsFixed)) ? rwState.CurrentAlignmentId : rwState.CurrentBaselineId;
            Alignment alignment   = HostApplicationServices.WorkingDatabase.TransactionManager.GetObject(alignmentId, 0, false);
            string    sTempSlope  = Strings.UCase(strShoulderSlope);

            switch (shoulderSubbaseType)
            {
            case ShoulderSubbaseType.Shoulder:
                if (blnInsertLeft)
                {
                    if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 2, true));
                    }
                    if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 0, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 3, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 1, true));
                    }
                }
                else
                {
                    if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 258, true));
                    }
                    if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 256, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 259, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 257, true));
                    }
                }
                break;

            case ShoulderSubbaseType.Subbase:
                if (blnInsertLeft)
                {
                    if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 2, true));
                    }
                    if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 0, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 3, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 1, true));
                    }
                }
                else
                {
                    if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 258, true));
                    }
                    if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 256, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 259, true));
                    }
                    if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0)
                    {
                        return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 257, true));
                    }
                }
                break;
            }
            double GetSlope = default(double);

            return(GetSlope);
        }