예제 #1
0
        /// <summary>
        /// This method parses the extension of a resource location or
        /// path and creates the new NadTable type.
        /// </summary>
        /// <param name="location"></param>
        /// <param name="embedded"></param>
        /// <returns></returns>
        public static NadTable FromSourceName(string location, bool embedded)
        {
            NadTable result = null;
            string   ext    = Path.GetExtension(location).ToLower();

            switch (ext)
            {
            case ".lla":
                result = new LlaNadTable(location, embedded);
                break;

            case ".gsb":
                result = new GsbNadTable(location, 0, embedded);
                break;

            case ".dat":
                result = new DatNadTable(location, embedded);
                break;

            case ".los":
                result = new LasLosNadTable(location, embedded);
                break;
            }
            if (result != null)
            {
                result.ReadHeader();
            }
            return(result);
        }
예제 #2
0
 /// <summary>
 /// This method parses the extension of a resource location or
 /// path and creates the new NadTable type.
 /// </summary>
 /// <param name="location"></param>
 /// <param name="embedded"></param>
 /// <returns></returns>
 public static NadTable FromSourceName(string location, bool embedded)
 {
     NadTable result = null;
     string ext = Path.GetExtension(location).ToLower();
     switch (ext)
     {
         case ".lla":
             result = new LlaNadTable(location, embedded);
             break;
         case ".gsb":
             result = new GsbNadTable(location, 0, embedded);
             break;
         case ".dat":
             result = new DatNadTable(location, embedded);
             break;
         case ".los":
             result = new LasLosNadTable(location, embedded);
             break;
     }
     if (result != null) result.ReadHeader();
     return result;
 }