| | |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Sockets; |
| | | using System.Reflection; |
| | | using System.Runtime.InteropServices; |
| | | using System.Runtime.Serialization; |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取本机IP |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static string GetLocalIP() |
| | | { |
| | | var host = Dns.GetHostEntry(Dns.GetHostName()); |
| | | foreach (var ip in host.AddressList) |
| | | { |
| | | if (ip.AddressFamily == AddressFamily.InterNetwork) |
| | | { |
| | | return ip.ToString(); |
| | | } |
| | | } |
| | | |
| | | return GetSetting("localIP"); |
| | | } |
| | | |
| | | [DllImport("ReadLas.dll")] |
| | | public extern static int get_las_cs(string file_name); |
| | | } |