Browse Source

升级库修改808排版

master
SmallChi(Koike) 5 years ago
parent
commit
74d9a2f8dc
2 changed files with 21 additions and 14 deletions
  1. +5
    -5
      src/JTTools/JTTools.csproj
  2. +16
    -9
      src/JTTools/Pages/JT808Analyze.razor

+ 5
- 5
src/JTTools/JTTools.csproj View File

@@ -7,16 +7,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStrap" Version="1.3.1" />
<PackageReference Include="BlazorStrap" Version="1.3.2" />
<PackageReference Include="JT1078" Version="1.0.2" />
<PackageReference Include="JT808" Version="2.2.10" />
<PackageReference Include="JT808.Protocol.Extensions.JT1078" Version="2.2.9" />
<PackageReference Include="JT808.Protocol.Extensions.JT1078" Version="2.2.9.1" />
<PackageReference Include="JT808.Protocol.Extensions.JTActiveSafety" Version="1.0.4" />
<PackageReference Include="JT809" Version="2.1.4-preview2" />
<PackageReference Include="JT809" Version="2.1.4-preview4" />
<PackageReference Include="JT809.Protocol.Extensions.JT1078" Version="2.1.4-preview1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.2" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.4" />
</ItemGroup>

</Project>

+ 16
- 9
src/JTTools/Pages/JT808Analyze.razor View File

@@ -11,18 +11,26 @@
@inject JT808_JT1078_Config jT808_JT1078_Config
@inject JT808_JTActiveSafety_Config jT808_JTActiveSafety_Config

<select class="form-control" @onchange="@OnSelectProtocolType">
<option value="JT808">国标</option>
<option value="JT808_JT1078">国标扩展JT1078</option>
<option value="JT808_JTAS">国标扩展主动安全(苏标)</option>
</select>

<button class="btn btn-primary" @onclick="Query">分析</button>
<BSBasicForm IsInline="true">
<BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0">
<BSBasicInput Id="exampleFormControlSelect1" @onchange="@OnSelectProtocolType" InputType="InputType.Select" Value="protocolType">
<option value="JT808">国标</option>
<option value="JT808_JT1078">国标扩展JT1078</option>
<option value="JT808_JTAS">国标扩展主动安全(苏标)</option>
</BSBasicInput>
</BSFormGroup>
<BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0">
<BSButton Class="btn btn-primary" ButtonType="ButtonType.Button" @onclick="Query">分析</BSButton>
</BSFormGroup>
</BSBasicForm>
<BSFormGroup>
<BSBasicInput InputType="InputType.TextArea" Name="text" Id="exampleText" Rows="10" @bind-Value="HexData" />
</BSFormGroup>
<BSAlert Color="Color.Danger" IsOpen="@isOpen" IsDismissible="true" OnDismiss="@OnDismiss">
@ErrerMessage
</BSAlert>

<div class="right">
<textarea class="form-control" @bind="HexData" rows="10"></textarea>
<pre>
@Json
</pre>
@@ -74,7 +82,6 @@
{
case "JT808":
Json = Serializer.Analyze(data, options: JTJsonWriterOptions.Instance);

break;
case "JT808_JT1078":
Json = JT1078Serializer.Analyze(data, options: JTJsonWriterOptions.Instance);


Loading…
Cancel
Save