diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj new file mode 100644 index 0000000..611dc49 --- /dev/null +++ b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj @@ -0,0 +1,210 @@ + + + + + Debug + AnyCPU + {1BDFF028-C103-487B-B86A-8490EF948961} + WinExe + SubCabinetSolution + SubCabinetSolution + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj new file mode 100644 index 0000000..611dc49 --- /dev/null +++ b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj @@ -0,0 +1,210 @@ + + + + + Debug + AnyCPU + {1BDFF028-C103-487B-B86A-8490EF948961} + WinExe + SubCabinetSolution + SubCabinetSolution + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SubCabinetSolution/Utils/HttpRequestHandler.cs b/SubCabinetSolution/Utils/HttpRequestHandler.cs new file mode 100644 index 0000000..75fdf8f --- /dev/null +++ b/SubCabinetSolution/Utils/HttpRequestHandler.cs @@ -0,0 +1,56 @@ +using System.IO; +using System.Net; + +namespace SubCabinetSolution.Utils +{ + public static class HttpRequestHandler + { + private static WebRequest _webRequest; + private static string _content; + private const int ConnectTimeout = 30 * 1000; + + public static string GetPublicKey(string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Get(string header, string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Headers.Add("token", header); + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Post() + { + return ""; + } + + private static string HandleResponse(WebResponse response) + { + HttpStatusCode status = ((HttpWebResponse) response).StatusCode; + if (status == HttpStatusCode.OK) + { + using (Stream dataStream = response.GetResponseStream()) + { + _content = new StreamReader(dataStream).ReadToEnd(); + } + + response.Close(); + return _content; + } + + response.Close(); + return ""; + } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj new file mode 100644 index 0000000..611dc49 --- /dev/null +++ b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj @@ -0,0 +1,210 @@ + + + + + Debug + AnyCPU + {1BDFF028-C103-487B-B86A-8490EF948961} + WinExe + SubCabinetSolution + SubCabinetSolution + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SubCabinetSolution/Utils/HttpRequestHandler.cs b/SubCabinetSolution/Utils/HttpRequestHandler.cs new file mode 100644 index 0000000..75fdf8f --- /dev/null +++ b/SubCabinetSolution/Utils/HttpRequestHandler.cs @@ -0,0 +1,56 @@ +using System.IO; +using System.Net; + +namespace SubCabinetSolution.Utils +{ + public static class HttpRequestHandler + { + private static WebRequest _webRequest; + private static string _content; + private const int ConnectTimeout = 30 * 1000; + + public static string GetPublicKey(string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Get(string header, string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Headers.Add("token", header); + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Post() + { + return ""; + } + + private static string HandleResponse(WebResponse response) + { + HttpStatusCode status = ((HttpWebResponse) response).StatusCode; + if (status == HttpStatusCode.OK) + { + using (Stream dataStream = response.GetResponseStream()) + { + _content = new StreamReader(dataStream).ReadToEnd(); + } + + response.Close(); + return _content; + } + + response.Close(); + return ""; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Utils/LocalConstant.cs b/SubCabinetSolution/Utils/LocalConstant.cs new file mode 100644 index 0000000..3051ea5 --- /dev/null +++ b/SubCabinetSolution/Utils/LocalConstant.cs @@ -0,0 +1,7 @@ +namespace SubCabinetSolution.Utils +{ + public static class LocalConstant + { + public const string BaseHttpUrl = "http://111.198.10.15:11311"; + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj new file mode 100644 index 0000000..611dc49 --- /dev/null +++ b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj @@ -0,0 +1,210 @@ + + + + + Debug + AnyCPU + {1BDFF028-C103-487B-B86A-8490EF948961} + WinExe + SubCabinetSolution + SubCabinetSolution + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SubCabinetSolution/Utils/HttpRequestHandler.cs b/SubCabinetSolution/Utils/HttpRequestHandler.cs new file mode 100644 index 0000000..75fdf8f --- /dev/null +++ b/SubCabinetSolution/Utils/HttpRequestHandler.cs @@ -0,0 +1,56 @@ +using System.IO; +using System.Net; + +namespace SubCabinetSolution.Utils +{ + public static class HttpRequestHandler + { + private static WebRequest _webRequest; + private static string _content; + private const int ConnectTimeout = 30 * 1000; + + public static string GetPublicKey(string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Get(string header, string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Headers.Add("token", header); + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Post() + { + return ""; + } + + private static string HandleResponse(WebResponse response) + { + HttpStatusCode status = ((HttpWebResponse) response).StatusCode; + if (status == HttpStatusCode.OK) + { + using (Stream dataStream = response.GetResponseStream()) + { + _content = new StreamReader(dataStream).ReadToEnd(); + } + + response.Close(); + return _content; + } + + response.Close(); + return ""; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Utils/LocalConstant.cs b/SubCabinetSolution/Utils/LocalConstant.cs new file mode 100644 index 0000000..3051ea5 --- /dev/null +++ b/SubCabinetSolution/Utils/LocalConstant.cs @@ -0,0 +1,7 @@ +namespace SubCabinetSolution.Utils +{ + public static class LocalConstant + { + public const string BaseHttpUrl = "http://111.198.10.15:11311"; + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs index e737348..a54218b 100644 --- a/SubCabinetSolution/ViewModel/MainViewModel.cs +++ b/SubCabinetSolution/ViewModel/MainViewModel.cs @@ -2,6 +2,9 @@ using System.Windows; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; +using Newtonsoft.Json; +using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -45,23 +48,32 @@ /// public MainViewModel() { + this.LoginToMainCommand = new RelayCommand(Login); - VersionName = "版本号 Ver " + Application.ResourceAssembly.GetName().Version; + this.VersionName = "版本号 Ver " + Application.ResourceAssembly.GetName().Version; } private void Login() { if (string.IsNullOrWhiteSpace(userName)) { - MessageBox.Show("请输入用户名","错误",MessageBoxButton.OK,MessageBoxImage.Error); + MessageBox.Show("请输入用户名", "错误", MessageBoxButton.OK, MessageBoxImage.Error); return; } + if (string.IsNullOrWhiteSpace(userPassword)) { - MessageBox.Show("请输入密码","错误",MessageBoxButton.OK,MessageBoxImage.Error); + MessageBox.Show("请输入密码", "错误", MessageBoxButton.OK, MessageBoxImage.Error); return; } - Trace.WriteLine(userName+"<----->"+userPassword); + + // 显示Loading对话框 + // 前期可能是单机版本,连接数据库登录 + // string publicKey = HttpRequestHandler.GetPublicKey(LocalConstant.BaseHttpUrl + "/config/baseConfig"); + // PublicKeyModel keyModel = JsonConvert.DeserializeObject(publicKey); + // Debug.WriteLine(keyModel.data.publicKey); + + } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx b/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx deleted file mode 100644 index f8da1ee..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/441a458a-ddf3-4651-b034-3cde38d32bad.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx new file mode 100644 index 0000000..8215540 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/60f96239-a4ce-4baf-8c6c-4ec562af8357.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx deleted file mode 100644 index c0ea77f..0000000 --- a/.vs/SubCabinetSolution/FileContentIndex/9d8ea798-31aa-46d0-b427-c7bdea196458.vsidx +++ /dev/null Binary files differ diff --git a/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx new file mode 100644 index 0000000..c573253 --- /dev/null +++ b/.vs/SubCabinetSolution/FileContentIndex/9e0e7f83-5214-44fe-a97a-f4e7901c523c.vsidx Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index abf7ad0..f236e9b 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/PublicKeyModel.cs b/SubCabinetSolution/Model/PublicKeyModel.cs new file mode 100644 index 0000000..0fca010 --- /dev/null +++ b/SubCabinetSolution/Model/PublicKeyModel.cs @@ -0,0 +1,48 @@ +namespace SubCabinetSolution.Model +{ + public class PublicKeyModel + { + /// + /// + /// + public int code { get; set; } + + /// + /// + /// + public KeyData data { get; set; } + + /// + /// 请求成功 + /// + public string message { get; set; } + + /// + /// + /// + public string success { get; set; } + } + + public class KeyData + { + /// + /// + /// + public string appKaptcha { get; set; } + + /// + /// + /// + public string kaptcha { get; set; } + + /// + /// + /// + public string publicKey { get; set; } + + /// + /// + /// + public string sid { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index d9d37b8..cb5532c 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -50,9 +50,67 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll True + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True + + + + ..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll + True + + + ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll + True + + + ..\packages\SQLitePCLRaw.bundle_green.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll + True + + + ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + True + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + True + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + True + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + True + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + True + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + True + ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll True @@ -70,6 +128,9 @@ MSBuild:Compile Designer + + + @@ -109,5 +170,15 @@ Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj new file mode 100644 index 0000000..611dc49 --- /dev/null +++ b/SubCabinetSolution/SubCabinetSolution_mfdmh5k3_wpftmp.csproj @@ -0,0 +1,210 @@ + + + + + Debug + AnyCPU + {1BDFF028-C103-487B-B86A-8490EF948961} + WinExe + SubCabinetSolution + SubCabinetSolution + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SubCabinetSolution/Utils/HttpRequestHandler.cs b/SubCabinetSolution/Utils/HttpRequestHandler.cs new file mode 100644 index 0000000..75fdf8f --- /dev/null +++ b/SubCabinetSolution/Utils/HttpRequestHandler.cs @@ -0,0 +1,56 @@ +using System.IO; +using System.Net; + +namespace SubCabinetSolution.Utils +{ + public static class HttpRequestHandler + { + private static WebRequest _webRequest; + private static string _content; + private const int ConnectTimeout = 30 * 1000; + + public static string GetPublicKey(string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Get(string header, string url, string contentType = "application/json; charset=UTF-8") + { + _webRequest = WebRequest.Create(url); + _webRequest.Credentials = CredentialCache.DefaultCredentials; + _webRequest.Headers.Add("token", header); + _webRequest.Method = WebRequestMethods.Http.Get; + _webRequest.ContentType = contentType; + _webRequest.Timeout = ConnectTimeout; + return HandleResponse(_webRequest.GetResponse()); + } + + public static string Post() + { + return ""; + } + + private static string HandleResponse(WebResponse response) + { + HttpStatusCode status = ((HttpWebResponse) response).StatusCode; + if (status == HttpStatusCode.OK) + { + using (Stream dataStream = response.GetResponseStream()) + { + _content = new StreamReader(dataStream).ReadToEnd(); + } + + response.Close(); + return _content; + } + + response.Close(); + return ""; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Utils/LocalConstant.cs b/SubCabinetSolution/Utils/LocalConstant.cs new file mode 100644 index 0000000..3051ea5 --- /dev/null +++ b/SubCabinetSolution/Utils/LocalConstant.cs @@ -0,0 +1,7 @@ +namespace SubCabinetSolution.Utils +{ + public static class LocalConstant + { + public const string BaseHttpUrl = "http://111.198.10.15:11311"; + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs index e737348..a54218b 100644 --- a/SubCabinetSolution/ViewModel/MainViewModel.cs +++ b/SubCabinetSolution/ViewModel/MainViewModel.cs @@ -2,6 +2,9 @@ using System.Windows; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; +using Newtonsoft.Json; +using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -45,23 +48,32 @@ /// public MainViewModel() { + this.LoginToMainCommand = new RelayCommand(Login); - VersionName = "版本号 Ver " + Application.ResourceAssembly.GetName().Version; + this.VersionName = "版本号 Ver " + Application.ResourceAssembly.GetName().Version; } private void Login() { if (string.IsNullOrWhiteSpace(userName)) { - MessageBox.Show("请输入用户名","错误",MessageBoxButton.OK,MessageBoxImage.Error); + MessageBox.Show("请输入用户名", "错误", MessageBoxButton.OK, MessageBoxImage.Error); return; } + if (string.IsNullOrWhiteSpace(userPassword)) { - MessageBox.Show("请输入密码","错误",MessageBoxButton.OK,MessageBoxImage.Error); + MessageBox.Show("请输入密码", "错误", MessageBoxButton.OK, MessageBoxImage.Error); return; } - Trace.WriteLine(userName+"<----->"+userPassword); + + // 显示Loading对话框 + // 前期可能是单机版本,连接数据库登录 + // string publicKey = HttpRequestHandler.GetPublicKey(LocalConstant.BaseHttpUrl + "/config/baseConfig"); + // PublicKeyModel keyModel = JsonConvert.DeserializeObject(publicKey); + // Debug.WriteLine(keyModel.data.publicKey); + + } } } \ No newline at end of file diff --git a/SubCabinetSolution/packages.config b/SubCabinetSolution/packages.config index e25c158..a7b6845 100644 --- a/SubCabinetSolution/packages.config +++ b/SubCabinetSolution/packages.config @@ -1,6 +1,20 @@  + + + + + + + + + + + + + + \ No newline at end of file