Browse Source

Merge branch 'master' of https://github.com/yuzhengyang/Fork

# Conflicts:
#	Azylee.Utils/.vs/Azylee.Utils/v15/Server/sqlite3/storage.ide
#	Azylee.Utils/Azylee.Utils.sln
yuzhengyang 7 years ago
parent
commit
b142e5e38f
33 changed files with 91263 additions and 234 deletions
  1. 1 0
      Azylee.Utils/Azylee.Core/Azylee.Core.csproj
  2. 0 218
      Azylee.Utils/Azylee.Core/IOUtils/ImageUtils/ExifHelper.cs
  3. 225 0
      Azylee.Utils/Azylee.Core/IOUtils/ImageUtils/ExifTagNames.cs
  4. 2 6
      Azylee.Utils/Azylee.Core/ProcessUtils/ProcessTool.cs
  5. 7 6
      Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj
  6. 18 0
      Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/BaiduGPSPointModel.cs
  7. 42 0
      Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSConverter.cs
  8. 0 3
      Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/IPLocationAPI/IPLocationTool.cs
  9. 1 1
      Azylee.Utils/Azylee.YeahWeb/packages.config
  10. 6 0
      Azylee.Utils/Tests/Test.YeahWeb/App.config
  11. 23 0
      Azylee.Utils/Tests/Test.YeahWeb/Program.cs
  12. 36 0
      Azylee.Utils/Tests/Test.YeahWeb/Properties/AssemblyInfo.cs
  13. 57 0
      Azylee.Utils/Tests/Test.YeahWeb/Test.YeahWeb.csproj
  14. 20 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/LICENSE.md
  15. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg
  16. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.dll
  17. 9967 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.xml
  18. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.dll
  19. 9096 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.xml
  20. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.dll
  21. 9296 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.xml
  22. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll
  23. 10912 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml
  24. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.dll
  25. 10619 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.xml
  26. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.dll
  27. 10722 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.xml
  28. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.dll
  29. 10887 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.xml
  30. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
  31. 8707 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml
  32. BIN
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
  33. 10619 0
      Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml

+ 1 - 0
Azylee.Utils/Azylee.Core/Azylee.Core.csproj

@@ -85,6 +85,7 @@
     <Compile Include="IOUtils\ImageUtils\AffineTool.cs" />
     <Compile Include="IOUtils\ImageUtils\BarCodeToHTML.cs" />
     <Compile Include="IOUtils\ImageUtils\CaptchaHelper.cs" />
+    <Compile Include="IOUtils\ImageUtils\ExifTagNames.cs" />
     <Compile Include="IOUtils\ImageUtils\ExifHelper.cs" />
     <Compile Include="IOUtils\ImageUtils\IconTool.cs" />
     <Compile Include="IOUtils\ImageUtils\ImageHelper.cs" />

+ 0 - 218
Azylee.Utils/Azylee.Core/IOUtils/ImageUtils/ExifHelper.cs

@@ -22,224 +22,6 @@ namespace Azylee.Core.IOUtils.ImageUtils
             Image = (Bitmap)Bitmap.FromFile(fileName);
             DefaultValue = defaultValue;
         }
-        public enum TagNames : int
-        {
-            ExifIFD = 0x8769,
-            GpsIFD = 0x8825,
-            NewSubfileType = 0xFE,
-            SubfileType = 0xFF,
-            ImageWidth = 0x100,
-            ImageHeight = 0x101,
-            BitsPerSample = 0x102,
-            Compression = 0x103,
-            PhotometricInterp = 0x106,
-            ThreshHolding = 0x107,
-            CellWidth = 0x108,
-            CellHeight = 0x109,
-            FillOrder = 0x10A,
-            DocumentName = 0x10D,
-            ImageDescription = 0x10E,
-            EquipMake = 0x10F,
-            EquipModel = 0x110,
-            StripOffsets = 0x111,
-            Orientation = 0x112,
-            SamplesPerPixel = 0x115,
-            RowsPerStrip = 0x116,
-            StripBytesCount = 0x117,
-            MinSampleValue = 0x118,
-            MaxSampleValue = 0x119,
-            XResolution = 0x11A,
-            YResolution = 0x11B,
-            PlanarConfig = 0x11C,
-            PageName = 0x11D,
-            XPosition = 0x11E,
-            YPosition = 0x11F,
-            FreeOffset = 0x120,
-            FreeByteCounts = 0x121,
-            GrayResponseUnit = 0x122,
-            GrayResponseCurve = 0x123,
-            T4Option = 0x124,
-            T6Option = 0x125,
-            ResolutionUnit = 0x128,
-            PageNumber = 0x129,
-            TransferFuncition = 0x12D,
-            SoftwareUsed = 0x131,
-            DateTime = 0x132,
-            Artist = 0x13B,
-            HostComputer = 0x13C,
-            Predictor = 0x13D,
-            WhitePoint = 0x13E,
-            PrimaryChromaticities = 0x13F,
-            ColorMap = 0x140,
-            HalftoneHints = 0x141,
-            TileWidth = 0x142,
-            TileLength = 0x143,
-            TileOffset = 0x144,
-            TileByteCounts = 0x145,
-            InkSet = 0x14C,
-            InkNames = 0x14D,
-            NumberOfInks = 0x14E,
-            DotRange = 0x150,
-            TargetPrinter = 0x151,
-            ExtraSamples = 0x152,
-            SampleFormat = 0x153,
-            SMinSampleValue = 0x154,
-            SMaxSampleValue = 0x155,
-            TransferRange = 0x156,
-            JPEGProc = 0x200,
-            JPEGInterFormat = 0x201,
-            JPEGInterLength = 0x202,
-            JPEGRestartInterval = 0x203,
-            JPEGLosslessPredictors = 0x205,
-            JPEGPointTransforms = 0x206,
-            JPEGQTables = 0x207,
-            JPEGDCTables = 0x208,
-            JPEGACTables = 0x209,
-            YCbCrCoefficients = 0x211,
-            YCbCrSubsampling = 0x212,
-            YCbCrPositioning = 0x213,
-            REFBlackWhite = 0x214,
-            ICCProfile = 0x8773,
-            Gamma = 0x301,
-            ICCProfileDescriptor = 0x302,
-            SRGBRenderingIntent = 0x303,
-            ImageTitle = 0x320,
-            Copyright = 0x8298,
-            ResolutionXUnit = 0x5001,
-            ResolutionYUnit = 0x5002,
-            ResolutionXLengthUnit = 0x5003,
-            ResolutionYLengthUnit = 0x5004,
-            PrintFlags = 0x5005,
-            PrintFlagsVersion = 0x5006,
-            PrintFlagsCrop = 0x5007,
-            PrintFlagsBleedWidth = 0x5008,
-            PrintFlagsBleedWidthScale = 0x5009,
-            HalftoneLPI = 0x500A,
-            HalftoneLPIUnit = 0x500B,
-            HalftoneDegree = 0x500C,
-            HalftoneShape = 0x500D,
-            HalftoneMisc = 0x500E,
-            HalftoneScreen = 0x500F,
-            JPEGQuality = 0x5010,
-            GridSize = 0x5011,
-            ThumbnailFormat = 0x5012,
-            ThumbnailWidth = 0x5013,
-            ThumbnailHeight = 0x5014,
-            ThumbnailColorDepth = 0x5015,
-            ThumbnailPlanes = 0x5016,
-            ThumbnailRawBytes = 0x5017,
-            ThumbnailSize = 0x5018,
-            ThumbnailCompressedSize = 0x5019,
-            ColorTransferFunction = 0x501A,
-            ThumbnailData = 0x501B,
-            ThumbnailImageWidth = 0x5020,
-            ThumbnailImageHeight = 0x502,
-            ThumbnailBitsPerSample = 0x5022,
-            ThumbnailCompression = 0x5023,
-            ThumbnailPhotometricInterp = 0x5024,
-            ThumbnailImageDescription = 0x5025,
-            ThumbnailEquipMake = 0x5026,
-            ThumbnailEquipModel = 0x5027,
-            ThumbnailStripOffsets = 0x5028,
-            ThumbnailOrientation = 0x5029,
-            ThumbnailSamplesPerPixel = 0x502A,
-            ThumbnailRowsPerStrip = 0x502B,
-            ThumbnailStripBytesCount = 0x502C,
-            ThumbnailResolutionX = 0x502D,
-            ThumbnailResolutionY = 0x502E,
-            ThumbnailPlanarConfig = 0x502F,
-            ThumbnailResolutionUnit = 0x5030,
-            ThumbnailTransferFunction = 0x5031,
-            ThumbnailSoftwareUsed = 0x5032,
-            ThumbnailDateTime = 0x5033,
-            ThumbnailArtist = 0x5034,
-            ThumbnailWhitePoint = 0x5035,
-            ThumbnailPrimaryChromaticities = 0x5036,
-            ThumbnailYCbCrCoefficients = 0x5037,
-            ThumbnailYCbCrSubsampling = 0x5038,
-            ThumbnailYCbCrPositioning = 0x5039,
-            ThumbnailRefBlackWhite = 0x503A,
-            ThumbnailCopyRight = 0x503B,
-            LuminanceTable = 0x5090,
-            ChrominanceTable = 0x5091,
-            FrameDelay = 0x5100,
-            LoopCount = 0x5101,
-            PixelUnit = 0x5110,
-            PixelPerUnitX = 0x5111,
-            PixelPerUnitY = 0x5112,
-            PaletteHistogram = 0x5113,
-            ExifExposureTime = 0x829A,
-            ExifFNumber = 0x829D,
-            ExifExposureProg = 0x8822,
-            ExifSpectralSense = 0x8824,
-            ExifISOSpeed = 0x8827,
-            ExifOECF = 0x8828,
-            ExifVer = 0x9000,
-            ExifDTOrig = 0x9003,
-            ExifDTDigitized = 0x9004,
-            ExifCompConfig = 0x9101,
-            ExifCompBPP = 0x9102,
-            ExifShutterSpeed = 0x9201,
-            ExifAperture = 0x9202,
-            ExifBrightness = 0x9203,
-            ExifExposureBias = 0x9204,
-            ExifMaxAperture = 0x9205,
-            ExifSubjectDist = 0x9206,
-            ExifMeteringMode = 0x9207,
-            ExifLightSource = 0x9208,
-            ExifFlash = 0x9209,
-            ExifFocalLength = 0x920A,
-            ExifMakerNote = 0x927C,
-            ExifUserComment = 0x9286,
-            ExifDTSubsec = 0x9290,
-            ExifDTOrigSS = 0x9291,
-            ExifDTDigSS = 0x9292,
-            ExifFPXVer = 0xA000,
-            ExifColorSpace = 0xA001,
-            ExifPixXDim = 0xA002,
-            ExifPixYDim = 0xA003,
-            ExifRelatedWav = 0xA004,
-            ExifInterop = 0xA005,
-            ExifFlashEnergy = 0xA20B,
-            ExifSpatialFR = 0xA20C,
-            ExifFocalXRes = 0xA20E,
-            ExifFocalYRes = 0xA20F,
-            ExifFocalResUnit = 0xA210,
-            ExifSubjectLoc = 0xA214,
-            ExifExposureIndex = 0xA215,
-            ExifSensingMethod = 0xA217,
-            ExifFileSource = 0xA300,
-            ExifSceneType = 0xA301,
-            ExifCfaPattern = 0xA302,
-            GpsVer = 0x0,
-            GpsLatitudeRef = 0x1,
-            GpsLatitude = 0x2,
-            GpsLongitudeRef = 0x3,
-            GpsLongitude = 0x4,
-            GpsAltitudeRef = 0x5,
-            GpsAltitude = 0x6,
-            GpsGpsTime = 0x7,
-            GpsGpsSatellites = 0x8,
-            GpsGpsStatus = 0x9,
-            GpsGpsMeasureMode = 0xA,
-            GpsGpsDop = 0xB,
-            GpsSpeedRef = 0xC,
-            GpsSpeed = 0xD,
-            GpsTrackRef = 0xE,
-            GpsTrack = 0xF,
-            GpsImgDirRef = 0x10,
-            GpsImgDir = 0x11,
-            GpsMapDatum = 0x12,
-            GpsDestLatRef = 0x13,
-            GpsDestLat = 0x14,
-            GpsDestLongRef = 0x15,
-            GpsDestLong = 0x16,
-            GpsDestBearRef = 0x17,
-            GpsDestBear = 0x18,
-            GpsDestDistRef = 0x19,
-            GpsDestDist = 0x1A
-        }
-
         public string GetPropertyString(Int32 pid)
         {
             if (IsPropertyDefined(pid))

+ 225 - 0
Azylee.Utils/Azylee.Core/IOUtils/ImageUtils/ExifTagNames.cs

@@ -0,0 +1,225 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.Core.IOUtils.ImageUtils
+{
+    public enum ExifTagNames : int
+    {
+        ExifIFD = 0x8769,
+        GpsIFD = 0x8825,
+        NewSubfileType = 0xFE,
+        SubfileType = 0xFF,
+        ImageWidth = 0x100,
+        ImageHeight = 0x101,
+        BitsPerSample = 0x102,
+        Compression = 0x103,
+        PhotometricInterp = 0x106,
+        ThreshHolding = 0x107,
+        CellWidth = 0x108,
+        CellHeight = 0x109,
+        FillOrder = 0x10A,
+        DocumentName = 0x10D,
+        ImageDescription = 0x10E,
+        EquipMake = 0x10F,
+        EquipModel = 0x110,
+        StripOffsets = 0x111,
+        Orientation = 0x112,
+        SamplesPerPixel = 0x115,
+        RowsPerStrip = 0x116,
+        StripBytesCount = 0x117,
+        MinSampleValue = 0x118,
+        MaxSampleValue = 0x119,
+        XResolution = 0x11A,
+        YResolution = 0x11B,
+        PlanarConfig = 0x11C,
+        PageName = 0x11D,
+        XPosition = 0x11E,
+        YPosition = 0x11F,
+        FreeOffset = 0x120,
+        FreeByteCounts = 0x121,
+        GrayResponseUnit = 0x122,
+        GrayResponseCurve = 0x123,
+        T4Option = 0x124,
+        T6Option = 0x125,
+        ResolutionUnit = 0x128,
+        PageNumber = 0x129,
+        TransferFuncition = 0x12D,
+        SoftwareUsed = 0x131,
+        DateTime = 0x132,
+        Artist = 0x13B,
+        HostComputer = 0x13C,
+        Predictor = 0x13D,
+        WhitePoint = 0x13E,
+        PrimaryChromaticities = 0x13F,
+        ColorMap = 0x140,
+        HalftoneHints = 0x141,
+        TileWidth = 0x142,
+        TileLength = 0x143,
+        TileOffset = 0x144,
+        TileByteCounts = 0x145,
+        InkSet = 0x14C,
+        InkNames = 0x14D,
+        NumberOfInks = 0x14E,
+        DotRange = 0x150,
+        TargetPrinter = 0x151,
+        ExtraSamples = 0x152,
+        SampleFormat = 0x153,
+        SMinSampleValue = 0x154,
+        SMaxSampleValue = 0x155,
+        TransferRange = 0x156,
+        JPEGProc = 0x200,
+        JPEGInterFormat = 0x201,
+        JPEGInterLength = 0x202,
+        JPEGRestartInterval = 0x203,
+        JPEGLosslessPredictors = 0x205,
+        JPEGPointTransforms = 0x206,
+        JPEGQTables = 0x207,
+        JPEGDCTables = 0x208,
+        JPEGACTables = 0x209,
+        YCbCrCoefficients = 0x211,
+        YCbCrSubsampling = 0x212,
+        YCbCrPositioning = 0x213,
+        REFBlackWhite = 0x214,
+        ICCProfile = 0x8773,
+        Gamma = 0x301,
+        ICCProfileDescriptor = 0x302,
+        SRGBRenderingIntent = 0x303,
+        ImageTitle = 0x320,
+        Copyright = 0x8298,
+        ResolutionXUnit = 0x5001,
+        ResolutionYUnit = 0x5002,
+        ResolutionXLengthUnit = 0x5003,
+        ResolutionYLengthUnit = 0x5004,
+        PrintFlags = 0x5005,
+        PrintFlagsVersion = 0x5006,
+        PrintFlagsCrop = 0x5007,
+        PrintFlagsBleedWidth = 0x5008,
+        PrintFlagsBleedWidthScale = 0x5009,
+        HalftoneLPI = 0x500A,
+        HalftoneLPIUnit = 0x500B,
+        HalftoneDegree = 0x500C,
+        HalftoneShape = 0x500D,
+        HalftoneMisc = 0x500E,
+        HalftoneScreen = 0x500F,
+        JPEGQuality = 0x5010,
+        GridSize = 0x5011,
+        ThumbnailFormat = 0x5012,
+        ThumbnailWidth = 0x5013,
+        ThumbnailHeight = 0x5014,
+        ThumbnailColorDepth = 0x5015,
+        ThumbnailPlanes = 0x5016,
+        ThumbnailRawBytes = 0x5017,
+        ThumbnailSize = 0x5018,
+        ThumbnailCompressedSize = 0x5019,
+        ColorTransferFunction = 0x501A,
+        ThumbnailData = 0x501B,
+        ThumbnailImageWidth = 0x5020,
+        ThumbnailImageHeight = 0x502,
+        ThumbnailBitsPerSample = 0x5022,
+        ThumbnailCompression = 0x5023,
+        ThumbnailPhotometricInterp = 0x5024,
+        ThumbnailImageDescription = 0x5025,
+        ThumbnailEquipMake = 0x5026,
+        ThumbnailEquipModel = 0x5027,
+        ThumbnailStripOffsets = 0x5028,
+        ThumbnailOrientation = 0x5029,
+        ThumbnailSamplesPerPixel = 0x502A,
+        ThumbnailRowsPerStrip = 0x502B,
+        ThumbnailStripBytesCount = 0x502C,
+        ThumbnailResolutionX = 0x502D,
+        ThumbnailResolutionY = 0x502E,
+        ThumbnailPlanarConfig = 0x502F,
+        ThumbnailResolutionUnit = 0x5030,
+        ThumbnailTransferFunction = 0x5031,
+        ThumbnailSoftwareUsed = 0x5032,
+        ThumbnailDateTime = 0x5033,
+        ThumbnailArtist = 0x5034,
+        ThumbnailWhitePoint = 0x5035,
+        ThumbnailPrimaryChromaticities = 0x5036,
+        ThumbnailYCbCrCoefficients = 0x5037,
+        ThumbnailYCbCrSubsampling = 0x5038,
+        ThumbnailYCbCrPositioning = 0x5039,
+        ThumbnailRefBlackWhite = 0x503A,
+        ThumbnailCopyRight = 0x503B,
+        LuminanceTable = 0x5090,
+        ChrominanceTable = 0x5091,
+        FrameDelay = 0x5100,
+        LoopCount = 0x5101,
+        PixelUnit = 0x5110,
+        PixelPerUnitX = 0x5111,
+        PixelPerUnitY = 0x5112,
+        PaletteHistogram = 0x5113,
+        ExifExposureTime = 0x829A,
+        ExifFNumber = 0x829D,
+        ExifExposureProg = 0x8822,
+        ExifSpectralSense = 0x8824,
+        ExifISOSpeed = 0x8827,
+        ExifOECF = 0x8828,
+        ExifVer = 0x9000,
+        ExifDTOrig = 0x9003,
+        ExifDTDigitized = 0x9004,
+        ExifCompConfig = 0x9101,
+        ExifCompBPP = 0x9102,
+        ExifShutterSpeed = 0x9201,
+        ExifAperture = 0x9202,
+        ExifBrightness = 0x9203,
+        ExifExposureBias = 0x9204,
+        ExifMaxAperture = 0x9205,
+        ExifSubjectDist = 0x9206,
+        ExifMeteringMode = 0x9207,
+        ExifLightSource = 0x9208,
+        ExifFlash = 0x9209,
+        ExifFocalLength = 0x920A,
+        ExifMakerNote = 0x927C,
+        ExifUserComment = 0x9286,
+        ExifDTSubsec = 0x9290,
+        ExifDTOrigSS = 0x9291,
+        ExifDTDigSS = 0x9292,
+        ExifFPXVer = 0xA000,
+        ExifColorSpace = 0xA001,
+        ExifPixXDim = 0xA002,
+        ExifPixYDim = 0xA003,
+        ExifRelatedWav = 0xA004,
+        ExifInterop = 0xA005,
+        ExifFlashEnergy = 0xA20B,
+        ExifSpatialFR = 0xA20C,
+        ExifFocalXRes = 0xA20E,
+        ExifFocalYRes = 0xA20F,
+        ExifFocalResUnit = 0xA210,
+        ExifSubjectLoc = 0xA214,
+        ExifExposureIndex = 0xA215,
+        ExifSensingMethod = 0xA217,
+        ExifFileSource = 0xA300,
+        ExifSceneType = 0xA301,
+        ExifCfaPattern = 0xA302,
+        GpsVer = 0x0,
+        GpsLatitudeRef = 0x1,
+        GpsLatitude = 0x2,
+        GpsLongitudeRef = 0x3,
+        GpsLongitude = 0x4,
+        GpsAltitudeRef = 0x5,
+        GpsAltitude = 0x6,
+        GpsGpsTime = 0x7,
+        GpsGpsSatellites = 0x8,
+        GpsGpsStatus = 0x9,
+        GpsGpsMeasureMode = 0xA,
+        GpsGpsDop = 0xB,
+        GpsSpeedRef = 0xC,
+        GpsSpeed = 0xD,
+        GpsTrackRef = 0xE,
+        GpsTrack = 0xF,
+        GpsImgDirRef = 0x10,
+        GpsImgDir = 0x11,
+        GpsMapDatum = 0x12,
+        GpsDestLatRef = 0x13,
+        GpsDestLat = 0x14,
+        GpsDestLongRef = 0x15,
+        GpsDestLong = 0x16,
+        GpsDestBearRef = 0x17,
+        GpsDestBear = 0x18,
+        GpsDestDistRef = 0x19,
+        GpsDestDist = 0x1A
+    }
+}

+ 2 - 6
Azylee.Utils/Azylee.Core/ProcessUtils/ProcessTool.cs

@@ -159,12 +159,8 @@ namespace Azylee.Core.ProcessUtils
         {
             Task.Factory.StartNew(() =>
             {
-                try
-                {
-                    Sleep.S(second);
-                    process?.Kill();
-                }
-                catch { }
+                Sleep.S(second);
+                try { process?.Kill(); } catch { }
             });
         }
         /// <summary>

+ 7 - 6
Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj

@@ -30,8 +30,8 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -43,6 +43,8 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="BaiDuWebAPI\GPSAPI\BaiduGPSPointModel.cs" />
+    <Compile Include="BaiDuWebAPI\GPSAPI\GPSConverter.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationModel.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationWebModel.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />
@@ -60,14 +62,13 @@
     <Compile Include="SocketUtils\SocketTool.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
     <ProjectReference Include="..\Azylee.Core\Azylee.Core.csproj">
       <Project>{88dc61fa-95f0-41b7-9d7d-ab0f3cbd169c}</Project>
       <Name>Azylee.Core</Name>
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 18 - 0
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/BaiduGPSPointModel.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.BaiDuWebAPI.GPSAPI
+{
+    public class BaiduGPSPointModel
+    {
+        public int status { get; set; }
+        public IList<Result> result { get; set; }
+    }
+    public class Result
+    {
+        public double x { get; set; }
+        public double y { get; set; }
+    }
+}

+ 42 - 0
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/GPSAPI/GPSConverter.cs

@@ -0,0 +1,42 @@
+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 GPSConverter
+    {
+        /// <summary>
+        /// 设备GPS定位转换为BaiduGPS信息
+        /// </summary>
+        /// <param name="ak"></param>
+        /// <param name="longitude">经度(东经西经,纵向)</param>
+        /// <param name="latitude">纬度(北纬南纬,横向)</param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        /// <returns></returns>
+        public static bool DeviceGPSToBaiduGPS(string ak, double longitude, double latitude, out double x, out double y)
+        {
+            x = 0;
+            y = 0;
+            try
+            {
+                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);
+                if (rsobj != null && ListTool.HasElements(rsobj.result))
+                {
+                    x = rsobj.result[0].x;
+                    y = rsobj.result[0].y;
+                    return true;
+                }
+            }
+            catch { }
+            return false;
+        }
+    }
+}

+ 0 - 3
Azylee.Utils/Azylee.YeahWeb/BaiDuWebAPI/IPLocationAPI/IPLocationTool.cs

@@ -1,10 +1,7 @@
 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
 {

+ 1 - 1
Azylee.Utils/Azylee.YeahWeb/packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net40" />
+  <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net40" />
 </packages>

+ 6 - 0
Azylee.Utils/Tests/Test.YeahWeb/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 23 - 0
Azylee.Utils/Tests/Test.YeahWeb/Program.cs

@@ -0,0 +1,23 @@
+using Azylee.YeahWeb.BaiDuWebAPI.GPSAPI;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Test.YeahWeb
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            if (GPSConverter.DeviceGPSToBaiduGPS("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 120.379235583333, 36.19172925, out double x, out double y))
+            {
+                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
+            Console.ReadLine();
+        }
+    }
+}

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

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

+ 57 - 0
Azylee.Utils/Tests/Test.YeahWeb/Test.YeahWeb.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>{0213B9D4-1B4A-4BDE-9CE9-228C68A9A522}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Test.YeahWeb</RootNamespace>
+    <AssemblyName>Test.YeahWeb</AssemblyName>
+    <TargetFrameworkVersion>v4.5</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.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\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>

+ 20 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/LICENSE.md

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2007 James Newton-King
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 9967 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 9096 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 9296 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 10912 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 10619 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 10722 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 10887 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 8707 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml


BIN
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 10619 - 0
Azylee.Utils/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml