ソースを参照

添加百度IP获取位置接口

yuzhengyang 8 年 前
コミット
0b730c3dc6

BIN
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


+ 13 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/CustomTitle/BigIconForm.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.BigIconFormPNHead = new System.Windows.Forms.Panel();
             this.BigIconFormPNHeadTitle = new System.Windows.Forms.Panel();
             this.BigIconFormLBHeadTitle = new System.Windows.Forms.Label();
@@ -38,6 +39,8 @@
             this.BigIconFormPNHeadIcon = new System.Windows.Forms.Panel();
             this.BigIconFormPBHeadIcon = new System.Windows.Forms.PictureBox();
             this.BigIconFormPNContainer = new System.Windows.Forms.Panel();
+            this.TMRefresh = new System.Windows.Forms.Timer(this.components);
+            this.TTMain = new System.Windows.Forms.ToolTip(this.components);
             this.BigIconFormPNHead.SuspendLayout();
             this.BigIconFormPNHeadTitle.SuspendLayout();
             this.BigIconFormPNHeadButton.SuspendLayout();
@@ -104,6 +107,7 @@
             this.BigIconFormBTFormMinBox.Size = new System.Drawing.Size(32, 26);
             this.BigIconFormBTFormMinBox.TabIndex = 2;
             this.BigIconFormBTFormMinBox.Text = "-";
+            this.TTMain.SetToolTip(this.BigIconFormBTFormMinBox, "最小化");
             this.BigIconFormBTFormMinBox.UseVisualStyleBackColor = true;
             this.BigIconFormBTFormMinBox.Click += new System.EventHandler(this.BigIconFormBTFormMinBox_Click);
             // 
@@ -118,6 +122,7 @@
             this.BigIconFormBTFormMaxBox.Size = new System.Drawing.Size(32, 26);
             this.BigIconFormBTFormMaxBox.TabIndex = 1;
             this.BigIconFormBTFormMaxBox.Text = "□";
+            this.TTMain.SetToolTip(this.BigIconFormBTFormMaxBox, "最大化");
             this.BigIconFormBTFormMaxBox.UseVisualStyleBackColor = true;
             this.BigIconFormBTFormMaxBox.Click += new System.EventHandler(this.BigIconFormBTFormMaxBox_Click);
             // 
@@ -132,6 +137,7 @@
             this.BigIconFormBTFormCloseBox.Size = new System.Drawing.Size(32, 26);
             this.BigIconFormBTFormCloseBox.TabIndex = 0;
             this.BigIconFormBTFormCloseBox.Text = "×";
+            this.TTMain.SetToolTip(this.BigIconFormBTFormCloseBox, "关闭");
             this.BigIconFormBTFormCloseBox.UseVisualStyleBackColor = true;
             this.BigIconFormBTFormCloseBox.Click += new System.EventHandler(this.BigIconFormBTFormCloseBox_Click);
             // 
@@ -163,6 +169,11 @@
             this.BigIconFormPNContainer.Size = new System.Drawing.Size(971, 461);
             this.BigIconFormPNContainer.TabIndex = 6;
             // 
+            // TMRefresh
+            // 
+            this.TMRefresh.Interval = 1000;
+            this.TMRefresh.Tick += new System.EventHandler(this.TMRefresh_Tick);
+            // 
             // BigIconForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -195,5 +206,7 @@
         public System.Windows.Forms.Button BigIconFormBTFormMinBox;
         public System.Windows.Forms.Button BigIconFormBTFormMaxBox;
         public System.Windows.Forms.Button BigIconFormBTFormCloseBox;
+        private System.Windows.Forms.Timer TMRefresh;
+        private System.Windows.Forms.ToolTip TTMain;
     }
 }

+ 37 - 2
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/CustomTitle/BigIconForm.cs

@@ -1,5 +1,6 @@
 using Azylee.WinformSkin.APIUtils;
 using Azylee.WinformSkin.FormUI.NoTitle;
+using Azylee.WinformSkin.FormUI.Toast;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -91,6 +92,16 @@ namespace Azylee.WinformSkin.FormUI.CustomTitle
         {
             SetBorder();
             BigIconFormPNHead.Height = BigIconFormHeadHeight;
+            TMRefresh.Enabled = true;
+
+            if (WindowState == FormWindowState.Maximized || WindowState == FormWindowState.Normal)
+            {
+                if (Visible && Opacity > 0)
+                {
+                    TMRefreshStart();
+                    //ToastForm.Display("test", $"窗口显示,且为正常大小状态,透明度{Opacity}", 'i', 5000);
+                }
+            }
         }
         /// <summary>
         /// 最小化
@@ -138,8 +149,32 @@ namespace Azylee.WinformSkin.FormUI.CustomTitle
         {
             Close();
         }
-        #endregion
-
 
+        #endregion
+        #region 窗口显示优化
+        /// <summary>
+        /// 重绘窗口计时器,防止win10出现部分区域透明
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void TMRefreshStart()
+        {
+            TMRefresh.Interval = 200;
+            TMRefresh.Enabled = true;
+        }
+        private void TMRefresh_Tick(object sender, EventArgs e)
+        {
+            int maxInterval = 200 + 6;
+            if (TMRefresh.Interval > maxInterval)
+            {
+                TMRefresh.Enabled = false;
+            }
+            else
+            {
+                Refresh();
+                TMRefresh.Interval = TMRefresh.Interval + 1;
+            }
+        }
+        #endregion
     }
 }

+ 6 - 0
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/CustomTitle/BigIconForm.resx

@@ -117,4 +117,10 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="TTMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>132, 17</value>
+  </metadata>
+  <metadata name="TMRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 3 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj

@@ -43,6 +43,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationModel.cs" />
+    <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationWebModel.cs" />
+    <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />
     <Compile Include="FTPUtils\FTPTool.cs" />
     <Compile Include="HttpUtils\HttpTool.cs" />
     <Compile Include="HttpUtils\HttpToolPlus.cs" />

+ 56 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/IPLocationAPI/IPLocationModel.cs

@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.IPLocationAPI
+{
+    public class IPLocationModel
+    {
+        /// <summary>
+        /// 经度(东经西经,纵向)
+        /// </summary>
+        public double Longitude { get; set; }
+        /// <summary>
+        /// 纬度(北纬南纬,横向)
+        /// </summary>
+        public double Latitude { get; set; }
+        /// <summary>
+        /// 结构化地址信息
+        /// </summary>
+        public string FormattedAddress { get; set; }
+        /// <summary>
+        /// 所在商圈信息
+        /// </summary>
+        public string  Business { get; set; }
+        /// <summary>
+        /// 结合POI的语义化结果描述
+        /// </summary>
+        public string SematicDescription { get; set; }
+        public Component Component { get; set; }
+        public FirstPOI FirstPOI { get; set; }
+    }
+    /// <summary>
+    /// 地址组成
+    /// </summary>
+    public class Component
+    {
+        public string Country { get; set; }
+        public string Province { get; set; }
+        public string City { get; set; }
+        public string District { get; set; }
+        public string Town { get; set; }
+        public string AdCode { get; set; }
+        public string Street { get; set; }
+        public string StreetNumber { get; set; }
+        public string Direction { get; set; }
+        public string Distance { get; set; }
+    }
+    /// <summary>
+    /// 首选信息点
+    /// </summary>
+    public class FirstPOI {
+        public string Address { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 24 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/IPLocationAPI/IPLocationTool.cs

@@ -0,0 +1,24 @@
+using Azylee.YeahWeb.HttpUtils;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.IPLocationAPI
+{
+    public static class IPLocationTool
+    {
+        const string URL = "http://map.baidu.com/?qt=ipLocation";
+        public static IPLocationModel GetLocation()
+        {
+            IPLocationWebModel model = null;
+            CookieCollection cookie = new CookieCollection();
+            string rss1 = HttpToolPlus.Get(URL, ref cookie);//第一次请求以获取Cookie
+            string rss2 = HttpToolPlus.Get(URL, ref cookie);//携带第一次的Cookie获取数据
+            model = JsonConvert.DeserializeObject<IPLocationWebModel>(rss2);
+            return model.ToIPLocationModel();
+        }
+    }
+}

+ 379 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/IPLocationAPI/IPLocationWebModel.cs

@@ -0,0 +1,379 @@
+using Azylee.Core.DataUtils.CollectionUtils;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.IPLocationAPI
+{
+    public class IPLocationWebModel
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public IpLoc ipLoc { get; set; }
+        /// <summary>
+        /// 
+        /// </summary>
+        public Rgc rgc { get; set; }
+        public IPLocationModel ToIPLocationModel()
+        {
+            IPLocationModel model = null;
+            try
+            {
+                if (rgc != null)
+                {
+                    model = new IPLocationModel();
+                    model.FirstPOI = new FirstPOI();
+                    model.Component = new Component();
+                    if (rgc.result != null)
+                    {
+                        model.FormattedAddress = rgc.result.formatted_address;
+                        model.Business = rgc.result.business;
+                        model.SematicDescription = rgc.result.sematic_description;
+                        if (rgc.result.location != null)
+                        {
+                            model.Latitude = rgc.result.location.lat;
+                            model.Longitude = rgc.result.location.lng;
+                        }
+                        if (ListTool.HasElements(rgc.result.pois))
+                        {
+                            model.FirstPOI.Address = rgc.result.pois[0].addr;
+                            model.FirstPOI.Name = rgc.result.pois[0].name;
+                        }
+                        if (rgc.result.addressComponent != null)
+                        {
+                            model.Component.Country = rgc.result.addressComponent.country;
+                            model.Component.Province = rgc.result.addressComponent.province;
+                            model.Component.City = rgc.result.addressComponent.city;
+                            model.Component.District = rgc.result.addressComponent.district;
+                            model.Component.Town = rgc.result.addressComponent.town;
+                            model.Component.AdCode = rgc.result.addressComponent.adcode;
+                            model.Component.Street = rgc.result.addressComponent.street;
+                            model.Component.StreetNumber = rgc.result.addressComponent.street_number;
+                            model.Component.Direction = rgc.result.addressComponent.direction;
+                            model.Component.Distance = rgc.result.addressComponent.distance;
+                        }
+                    }
+                }
+            }
+            catch { }
+            return model;
+        }
+        public class IpLoc
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public Content content { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public IPResult result { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string status { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string message { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int code { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int time { get; set; }
+        }
+        public class Content
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public IPLocation location { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string locid { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int radius { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int confidence { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int ip_type { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public IPPoint point { get; set; }
+        }
+        public class IPResult
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public int error { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string loc_time { get; set; }
+        }
+        public class IPLocation
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public int lat { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int lng { get; set; }
+        }
+        public class IPPoint
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public int x { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int y { get; set; }
+        }
+        public class Rgc
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public string status { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public Result result { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int code { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string message { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int time { get; set; }
+        }
+        public class Result
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public Location location { get; set; }
+            /// <summary>
+            /// 山东省青岛市城阳区
+            /// </summary>
+            public string formatted_address { get; set; }
+            /// <summary>
+            /// 棘洪滩
+            /// </summary>
+            public string business { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public AddressComponent addressComponent { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public List<PoisItem> pois { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public List<string> roads { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public List<string> poiRegions { get; set; }
+            /// <summary>
+            /// 中车青岛四方机车车辆股份有限公司西北296米
+            /// </summary>
+            public string sematic_description { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int cityCode { get; set; }
+        }
+        public class Location
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public double lng { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public double lat { get; set; }
+        }
+        public class AddressComponent
+        {
+            /// <summary>
+            /// 中国
+            /// </summary>
+            public string country { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int country_code { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string country_code_iso { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string country_code_iso2 { get; set; }
+            /// <summary>
+            /// 山东省
+            /// </summary>
+            public string province { get; set; }
+            /// <summary>
+            /// 青岛市
+            /// </summary>
+            public string city { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public int city_level { get; set; }
+            /// <summary>
+            /// 城阳区
+            /// </summary>
+            public string district { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string town { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string adcode { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string street { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string street_number { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string direction { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string distance { get; set; }
+        }
+
+        public class Point
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public double x { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public double y { get; set; }
+        }
+
+        public class Parent_poi
+        {
+            /// <summary>
+            /// 
+            /// </summary>
+            public string name { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string tag { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string addr { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public Point point { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string direction { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string distance { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string uid { get; set; }
+        }
+
+        public class PoisItem
+        {
+            /// <summary>
+            /// 山东省青岛市城阳区棘洪滩街道锦宏东路88号
+            /// </summary>
+            public string addr { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string cp { get; set; }
+            /// <summary>
+            /// 西北
+            /// </summary>
+            public string direction { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string distance { get; set; }
+            /// <summary>
+            /// 中车青岛四方机车车辆股份有限公司
+            /// </summary>
+            public string name { get; set; }
+            /// <summary>
+            /// 公司企业
+            /// </summary>
+            public string poiType { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public Point point { get; set; }
+            /// <summary>
+            /// 公司企业;公司
+            /// </summary>
+            public string tag { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string tel { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string uid { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string zip { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public Parent_poi parent_poi { get; set; }
+        }
+    }
+}

+ 8 - 6
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/HttpTool.cs

@@ -41,20 +41,22 @@ namespace Azylee.YeahWeb.HttpUtils
             try
             {
                 Encoding myEncoding = Encoding.GetEncoding(encoding);
-                byte[] byteArray = myEncoding.GetBytes(param); //转化
                 HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(new Uri(url));
                 webReq.Method = "POST";
                 webReq.ContentType = "application/x-www-form-urlencoded";
-                webReq.ContentLength = byteArray.Length;
-                Stream newStream = webReq.GetRequestStream();
-                newStream.Write(byteArray, 0, byteArray.Length);//写入参数
-                newStream.Close();
+                if (!string.IsNullOrWhiteSpace(param))
+                {
+                    byte[] byteArray = myEncoding.GetBytes(param); //转化
+                    webReq.ContentLength = byteArray.Length;
+                    Stream newStream = webReq.GetRequestStream();
+                    newStream.Write(byteArray, 0, byteArray.Length);//写入参数
+                    newStream.Close();
+                }
                 HttpWebResponse response = (HttpWebResponse)webReq.GetResponse();
                 StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.Default);
                 result = sr.ReadToEnd();
                 sr.Close();
                 response.Close();
-                newStream.Close();
             }
             catch (Exception ex)
             { }

+ 11 - 0
Fork.Net/Fork.Net.sln

@@ -77,6 +77,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azylee.Core.Plus", "Azylee.
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.SystemSleep", "Test\Test.SystemSleep\Test.SystemSleep.csproj", "{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.BaiDuWebAPI", "Test\Test.BaiDuWebAPI\Test.BaiDuWebAPI.csproj", "{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -341,6 +343,14 @@ Global
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|Any CPU.Build.0 = Release|Any CPU
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|x86.ActiveCfg = Release|Any CPU
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|x86.Build.0 = Release|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|x86.Build.0 = Debug|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|x86.ActiveCfg = Release|Any CPU
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -377,6 +387,7 @@ Global
 		{76F92BAE-8C9C-42AA-85E8-51F2EA8A0C91} = {C34A95B5-5F83-46E3-868A-56BDDA2D0B87}
 		{915AE524-7EFD-4ECC-B731-DE1D1F5558F0} = {C34A95B5-5F83-46E3-868A-56BDDA2D0B87}
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28} = {A89FC45A-A907-4487-8719-114530A62684}
+		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC} = {A89FC45A-A907-4487-8719-114530A62684}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5436696D-5F55-490A-AB40-050B54BE2AB4}

+ 17 - 0
Fork.Net/Test/Test.BaiDuWebAPI/Program.cs

@@ -0,0 +1,17 @@
+using Azylee.YeahWeb.BaiDuWebAPI.IPLocationAPI;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Test.BaiDuWebAPI
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            var loc = IPLocationTool.GetLocation();
+            Console.WriteLine("");
+        }
+    }
+}

+ 36 - 0
Fork.Net/Test/Test.BaiDuWebAPI/Properties/AssemblyInfo.cs

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

+ 57 - 0
Fork.Net/Test/Test.BaiDuWebAPI/Test.BaiDuWebAPI.csproj

@@ -0,0 +1,57 @@
+<?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>{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Test.BaiDuWebAPI</RootNamespace>
+    <AssemblyName>Test.BaiDuWebAPI</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.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Azylee.Utils\Azylee.Core\Azylee.Core.csproj">
+      <Project>{88dc61fa-95f0-41b7-9d7d-ab0f3cbd169c}</Project>
+      <Name>Azylee.Core</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Azylee.Utils\Azylee.YeahWeb\Azylee.YeahWeb.csproj">
+      <Project>{ccf7a654-b442-4db1-bb3b-0f8014c3237f}</Project>
+      <Name>Azylee.YeahWeb</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>