Browse Source

添加百度GPS信息接口

yuzhengyang 7 years ago
parent
commit
061424f6ea

BIN
Azylee.Utils/.vs/Azylee.Utils/v15/Server/sqlite3/storage.ide


+ 6 - 6
Azylee.Utils/Azylee.Utils.sln

@@ -27,7 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{9351FC10
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.ProcessTool", "Tests\Test.ProcessTool\Test.ProcessTool.csproj", "{5FB93D25-8855-4A80-9E08-131BC728B7F4}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Qrcode", "Tests\Test.Qrcode\Test.Qrcode.csproj", "{79BE6AF9-1C83-4168-A97D-96D336F228B1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.YeahWeb", "Tests\Test.YeahWeb\Test.YeahWeb.csproj", "{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -75,10 +75,10 @@ Global
 		{5FB93D25-8855-4A80-9E08-131BC728B7F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{5FB93D25-8855-4A80-9E08-131BC728B7F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5FB93D25-8855-4A80-9E08-131BC728B7F4}.Release|Any CPU.Build.0 = Release|Any CPU
-		{79BE6AF9-1C83-4168-A97D-96D336F228B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{79BE6AF9-1C83-4168-A97D-96D336F228B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{79BE6AF9-1C83-4168-A97D-96D336F228B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{79BE6AF9-1C83-4168-A97D-96D336F228B1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -93,7 +93,7 @@ Global
 		{D280C16F-FDE2-4647-BD76-3514F673426D} = {927325CD-24FD-4B85-A982-543D4F58A47C}
 		{CCF7A654-B442-4DB1-BB3B-0F8014C3237F} = {927325CD-24FD-4B85-A982-543D4F58A47C}
 		{5FB93D25-8855-4A80-9E08-131BC728B7F4} = {9351FC10-E8D0-41BB-A813-0B5B3EA90605}
-		{79BE6AF9-1C83-4168-A97D-96D336F228B1} = {9351FC10-E8D0-41BB-A813-0B5B3EA90605}
+		{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522} = {9351FC10-E8D0-41BB-A813-0B5B3EA90605}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {3A021A3E-4C98-47CD-B4E8-912E12611C2E}

+ 4 - 1
Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj

@@ -43,8 +43,11 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="BaiDuWebAPI\GPSAPI\BaiduGPSPointModel.cs" />
+    <Compile Include="BaiDuWebAPI\GPSAPI\GPSInfoModel.cs" />
+    <Compile Include="BaiDuWebAPI\GPSAPI\GPSInfoWebModel.cs" />
+    <Compile Include="BaiDuWebAPI\GPSAPI\GPSPointWebModel.cs" />
     <Compile Include="BaiDuWebAPI\GPSAPI\GPSConverter.cs" />
+    <Compile Include="BaiDuWebAPI\GPSAPI\GPSInfoTool.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationModel.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationWebModel.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />

+ 1 - 1
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSConverter.cs

@@ -27,7 +27,7 @@ namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
             {
                 string url = $"http://api.map.baidu.com/geoconv/v1/?coords={longitude},{latitude}&from=1&to=5&ak={ak}";
                 string rs = HttpTool.Get(url);
-                BaiduGPSPointModel rsobj = JsonConvert.DeserializeObject<BaiduGPSPointModel>(rs);
+                GPSPointWebModel rsobj = JsonConvert.DeserializeObject<GPSPointWebModel>(rs);
                 if (rsobj != null && ListTool.HasElements(rsobj.result))
                 {
                     x = rsobj.result[0].x;

+ 27 - 0
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSInfoModel.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
+{
+    public class GPSInfoModel
+    {
+        public string Country { get; set; }
+        public string Province { get; set; }
+        public string City { get; set; }
+        public string District { get; set; }
+        public string Street { get; set; }
+        public string Address { get; set; }
+
+        public override string ToString()
+        {
+            return $"Country: {Country}, " +
+                 $"Province: {Province}, " +
+                 $"City: {City}, " +
+                 $"District: {District}, " +
+                 $"Street: {Street}, " +
+                 $"Address: {Address}";
+        }
+    }
+}

+ 26 - 0
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSInfoTool.cs

@@ -0,0 +1,26 @@
+using Azylee.Core.DataUtils.CollectionUtils;
+using Azylee.YeahWeb.HttpUtils;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
+{
+    public class GPSInfoTool
+    {
+        public static GPSInfoWebModel GetInfo(string ak, double longitude, double latitude )
+        {
+            try
+            {
+                string url = $"http://api.map.baidu.com/geocoder/v2/?location={latitude},{longitude}&coordtype=wgs84ll&output=json&ak={ak}";
+                string rs = HttpTool.Get(url);
+                GPSInfoWebModel obj = JsonConvert.DeserializeObject<GPSInfoWebModel>(rs);
+                if (obj != null) return obj;
+            }
+            catch { }
+            return null;
+        }
+    }
+}

+ 66 - 0
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSInfoWebModel.cs

@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
+{
+    public class GPSInfoWebModel
+    {
+        public int status { get; set; }
+        public BaiduGPSInfoWebResult result { get; set; }
+        public GPSInfoModel ToGPSInfoModel()
+        {
+            GPSInfoModel model = null;
+            if (result != null && result .addressComponent!= null)
+            {
+                model = new GPSInfoModel();
+                model.Country = result.addressComponent.country;
+                model.Province = result.addressComponent.province;
+                model.City = result.addressComponent.city;
+                model.District = result.addressComponent.district;
+                model.Street = result.addressComponent.street;
+                model.Address = result.formatted_address;
+            }  
+            return model;
+        }
+    }
+
+    public class BaiduGPSInfoWebResult
+    {
+        public Location location { get; set; }
+        public string formatted_address { get; set; }
+        public string business { get; set; }
+        public AddressComponent addressComponent { get; set; }
+        public IList<object> pois { get; set; }
+        public IList<object> roads { get; set; }
+        public IList<object> poiRegions { get; set; }
+        public string sematic_description { get; set; }
+        public int cityCode { get; set; }
+    }
+    public class Location
+    {
+        public double lng { get; set; }
+        public double lat { get; set; }
+    }
+
+    public class AddressComponent
+    {
+        public string country { get; set; }
+        public int country_code { get; set; }
+        public string country_code_iso { get; set; }
+        public string country_code_iso2 { get; set; }
+        public string province { get; set; }
+        public string city { get; set; }
+        public int city_level { get; set; }
+        public string district { get; set; }
+        public string town { get; set; }
+        public string adcode { get; set; }
+        public string street { get; set; }
+        public string street_number { get; set; }
+        public string direction { get; set; }
+        public string distance { get; set; }
+    }
+
+
+}

+ 3 - 3
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/BaiduGPSPointModel.cs

@@ -5,12 +5,12 @@ using System.Text;
 
 namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
 {
-    public class BaiduGPSPointModel
+    public class GPSPointWebModel
     {
         public int status { get; set; }
-        public IList<Result> result { get; set; }
+        public IList<BaiduGPSPointWebResult> result { get; set; }
     }
-    public class Result
+    public class BaiduGPSPointWebResult
     {
         public double x { get; set; }
         public double y { get; set; }

+ 0 - 110
Azylee.Utils/Tests/Test.Qrcode/Form1.Designer.cs

@@ -1,110 +0,0 @@
-namespace Test.Qrcode
-{
-    partial class Form1
-    {
-        /// <summary>
-        /// 必需的设计器变量。
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// 清理所有正在使用的资源。
-        /// </summary>
-        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows 窗体设计器生成的代码
-
-        /// <summary>
-        /// 设计器支持所需的方法 - 不要修改
-        /// 使用代码编辑器修改此方法的内容。
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.button1 = new System.Windows.Forms.Button();
-            this.button2 = new System.Windows.Forms.Button();
-            this.button3 = new System.Windows.Forms.Button();
-            this.button4 = new System.Windows.Forms.Button();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // pictureBox1
-            // 
-            this.pictureBox1.Location = new System.Drawing.Point(56, 49);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(357, 303);
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            // 
-            // button1
-            // 
-            this.button1.Location = new System.Drawing.Point(561, 49);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
-            this.button1.TabIndex = 1;
-            this.button1.Text = "button1";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            // 
-            // button2
-            // 
-            this.button2.Location = new System.Drawing.Point(561, 112);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(75, 23);
-            this.button2.TabIndex = 2;
-            this.button2.Text = "button2";
-            this.button2.UseVisualStyleBackColor = true;
-            // 
-            // button3
-            // 
-            this.button3.Location = new System.Drawing.Point(586, 232);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(75, 23);
-            this.button3.TabIndex = 3;
-            this.button3.Text = "button3";
-            this.button3.UseVisualStyleBackColor = true;
-            // 
-            // button4
-            // 
-            this.button4.Location = new System.Drawing.Point(586, 303);
-            this.button4.Name = "button4";
-            this.button4.Size = new System.Drawing.Size(75, 23);
-            this.button4.TabIndex = 4;
-            this.button4.Text = "button4";
-            this.button4.UseVisualStyleBackColor = true;
-            // 
-            // Form1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
-            this.Controls.Add(this.button4);
-            this.Controls.Add(this.button3);
-            this.Controls.Add(this.button2);
-            this.Controls.Add(this.button1);
-            this.Controls.Add(this.pictureBox1);
-            this.Name = "Form1";
-            this.Text = "Form1";
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.PictureBox pictureBox1;
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.Button button2;
-        private System.Windows.Forms.Button button3;
-        private System.Windows.Forms.Button button4;
-    }
-}
-

+ 0 - 39
Azylee.Utils/Tests/Test.Qrcode/Form1.cs

@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using ZXing;
-using ZXing.QrCode;
-
-namespace Test.Qrcode
-{
-    public partial class Form1 : Form
-    {
-        public Form1()
-        {
-            InitializeComponent();
-        }
-
-        private void button1_Click(object sender, EventArgs e)
-        {
-            BarcodeWriter writer = new BarcodeWriter();
-            writer.Format = BarcodeFormat.QR_CODE;
-            QrCodeEncodingOptions options = new QrCodeEncodingOptions()
-            {
-                DisableECI = true,
-                CharacterSet = "UTF-8",
-                Width = pictureBox1.Width,
-                Height = pictureBox1.Height,
-                Margin = 1
-            };
-
-            writer.Options = options;
-            Bitmap map = writer.Write("生成二维码测试");
-            pictureBox1.Image = map;
-        }
-    }
-}

+ 0 - 120
Azylee.Utils/Tests/Test.Qrcode/Form1.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 21
Azylee.Utils/Tests/Test.Qrcode/Program.cs

@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Forms;
-
-namespace Test.Qrcode
-{
-    static class Program
-    {
-        /// <summary>
-        /// 应用程序的主入口点。
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Form1());
-        }
-    }
-}

+ 0 - 36
Azylee.Utils/Tests/Test.Qrcode/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Test.Qrcode")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Test.Qrcode")]
-[assembly: AssemblyCopyright("Copyright ©  2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("79be6af9-1c83-4168-a97d-96d336f228b1")]
-
-// 程序集的版本信息由下列四个值组成: 
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
-// 方法是按如下所示使用“*”: :
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 71
Azylee.Utils/Tests/Test.Qrcode/Properties/Resources.Designer.cs

@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本: 4.0.30319.42000
-//
-//     对此文件的更改可能导致不正确的行为,如果
-//     重新生成代码,则所做更改将丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Test.Qrcode.Properties
-{
-
-
-    /// <summary>
-    ///   强类型资源类,用于查找本地化字符串等。
-    /// </summary>
-    // 此类是由 StronglyTypedResourceBuilder
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
-        private static global::System.Resources.ResourceManager resourceMan;
-
-        private static global::System.Globalization.CultureInfo resourceCulture;
-
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
-        }
-
-        /// <summary>
-        ///   返回此类使用的缓存 ResourceManager 实例。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test.Qrcode.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-
-        /// <summary>
-        ///   覆盖当前线程的 CurrentUICulture 属性
-        ///   使用此强类型的资源类的资源查找。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
-                return resourceCulture;
-            }
-            set
-            {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 117
Azylee.Utils/Tests/Test.Qrcode/Properties/Resources.resx

@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 30
Azylee.Utils/Tests/Test.Qrcode/Properties/Settings.Designer.cs

@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Test.Qrcode.Properties
-{
-
-
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
Azylee.Utils/Tests/Test.Qrcode/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 0 - 84
Azylee.Utils/Tests/Test.Qrcode/Test.Qrcode.csproj

@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{79BE6AF9-1C83-4168-A97D-96D336F228B1}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <RootNamespace>Test.Qrcode</RootNamespace>
-    <AssemblyName>Test.Qrcode</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Deployment" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml" />
-    <Reference Include="zxing, Version=0.16.4.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\ZXing.Net.0.16.4\lib\net40\zxing.dll</HintPath>
-    </Reference>
-    <Reference Include="zxing.presentation, Version=0.16.4.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\ZXing.Net.0.16.4\lib\net40\zxing.presentation.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Form1.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="Form1.Designer.cs">
-      <DependentUpon>Form1.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <EmbeddedResource Include="Form1.resx">
-      <DependentUpon>Form1.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 4
Azylee.Utils/Tests/Test.Qrcode/packages.config

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="ZXing.Net" version="0.16.4" targetFramework="net40" />
-</packages>

+ 8 - 1
Azylee.Utils/Tests/Test.YeahWeb/Program.cs

@@ -16,7 +16,14 @@ namespace Test.YeahWeb
                 Console.WriteLine($"120.379235583333 - 36.19172925");
                 Console.WriteLine($"{x} - {y}");
             }
-            http://api.map.baidu.com/geocoder/v2/?location=36.1981373852607,120.390842831702&output=json&ak=iAe652kYOgleRHUYQkW1E8MIHEptnMb5
+
+          
+            GPSInfoWebModel model = GPSInfoTool.GetInfo("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 40.039669, 252.129464);
+            if (model != null)
+            {
+                GPSInfoModel info = model.ToGPSInfoModel();
+                Console.WriteLine(info);
+            }
             Console.ReadLine();
         }
     }