示例#1
0
 /// <summary>
 /// Access to a specific result
 /// </summary>
 /// <param name="type">Result type</param>
 /// <returns>Formatted result value</returns>
 public double this[ResultTypeSurface type]
 {
     get { return(data[(int)type]); }
     set
     {
         if (Double.IsNaN(value))
         {
             throw new ArgumentOutOfRangeException(type.ToString() + "Cannot be NAN");
         }
         data[(int)type] = value;
     }
 }
示例#2
0
        /// <summary>
        /// Returns UI descriptions depends to element type and results type.
        /// </summary>
        /// <param name="elementType">Typ of element</param>
        /// <param name="result">Results.</param>
        /// <returns>Description that can be displayed on the maps and in the table.</returns>
        private string ResultDescription(ElementType elementType, ResultTypeSurface result)
        {
            string description = string.Empty;

            switch (result)
            {
            case ResultTypeSurface.AxxBottom:
            case ResultTypeSurface.AxxTop:
            case ResultTypeSurface.AyyBottom:
            case ResultTypeSurface.AyyTop:
                description = Resources.ResourceManager.GetString(elementType.ToString() + result.ToString());
                break;

            default:
                description = Resources.ResourceManager.GetString(result.ToString());
                break;
            }
            if (null == description)
            {
                description = result.ToString();
            }
            return(description);
        }