Skip to content

Commit

Permalink
Upgrade to netcoreapp3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoona committed Dec 7, 2019
1 parent cbec36c commit 9b66dc4
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 119 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<NetfxLegacyTargetFramework>net45</NetfxLegacyTargetFramework>
<NetfxCurrentTargetFramework>net48</NetfxCurrentTargetFramework>
<NetcoreCurrentTargetFramework>netcoreapp3.0</NetcoreCurrentTargetFramework>
<NetcoreCurrentTargetFramework>netcoreapp3.1</NetcoreCurrentTargetFramework>
<NetstandardCurrentTargetFramework>netstandard2.0</NetstandardCurrentTargetFramework>

<DefaultExeTargetFrameworks>$(NetcoreCurrentTargetFramework)</DefaultExeTargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetcoreCurrentTargetFramework)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\GeothermalResearchInstitute\GeothermalResearchInstitute.Grpc\GeothermalResearchInstitute.Grpc.csproj" />
<ProjectReference Include="..\..\third_party\CRC32C.NET\Crc32C.NET\Crc32C.NET.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.1" />
<PackageReference Include="Overby.Extensions.AsyncBinaryReaderWriter" Version="1.0.39" />
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetcoreCurrentTargetFramework)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\GeothermalResearchInstitute\GeothermalResearchInstitute.Grpc\GeothermalResearchInstitute.Grpc.csproj" />
<ProjectReference Include="..\..\third_party\CRC32C.NET\Crc32C.NET\Crc32C.NET.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.1" />
<PackageReference Include="Overby.Extensions.AsyncBinaryReaderWriter" Version="1.0.39" />
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information.
// </copyright>

using System;
using System.Threading.Tasks;
using GeothermalResearchInstitute.v2;
using System;
using System.Threading.Tasks;
using GeothermalResearchInstitute.v2;
using Google.Protobuf.WellKnownTypes;
using Prism.Commands;
using Prism.Mvvm;
Expand All @@ -18,7 +18,7 @@ public class DeviceControlViewModel : BindableBase
private Switch switchInfo;
private Metric metric;
private DeviceService.DeviceServiceClient client;


public DeviceControlViewModel(DeviceService.DeviceServiceClient client)
{
this.client = client ?? throw new ArgumentNullException(nameof(client));
Expand All @@ -27,7 +27,7 @@ public DeviceControlViewModel(DeviceService.DeviceServiceClient client)
}

public DelegateCommand<object> SwitchOnClickCommand { get; }


public DelegateCommand<object> SwitchOffClickCommand { get; }

public ViewModelContext ViewModelContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="1" To="0"
<DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="1" To="0"
Duration="0:0:1" AutoReverse="True" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
Expand All @@ -153,7 +153,7 @@
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="1" To="0"
<DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="1" To="0"
Duration="0:0:1" AutoReverse="True" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
Expand Down Expand Up @@ -255,7 +255,7 @@
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</DataTrigger>
</Style.Triggers>

</Style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information.
// </copyright>

using System.Threading.Tasks;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using GeothermalResearchInstitute.v2;
Expand Down
16 changes: 8 additions & 8 deletions codelab/ProtocolLab/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application
x:Class="ProtocolLab.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ProtocolLab"
Startup="Application_Startup">
<Application.Resources />
</Application>
<Application
x:Class="ProtocolLab.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ProtocolLab"
Startup="Application_Startup">
<Application.Resources />
</Application>
102 changes: 51 additions & 51 deletions codelab/ProtocolLab/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<Window
x:Class="ProtocolLab.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProtocolLab"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="800"
Height="450"
Loaded="Window_Loaded"
Unloaded="Window_Unloaded"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<DockPanel>
<StackPanel
VerticalAlignment="Stretch"
DockPanel.Dock="Top"
Orientation="Vertical">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="15,5" />
</Style>
</StackPanel.Resources>
<Button
Click="Connect_Click"
Content="发送 Connect 命令"
ToolTip="当 PLC 通过 TCP 连接到服务端时,服务端会立刻向 PLC 发送 Connect 命令" />
<Button
Click="GetMetric_Click"
Content="发送 GetMetric 命令"
ToolTip="服务端会定期向保持连接的 PLC 发送 GetMetric 命令收集数据" />
<Button
Click="UpdateSwitch_Click"
Content="发送 UpdateSwitch 命令"
ToolTip="按下任何开关时会发送 UpdateSwitch 命令,此处发送内容以开启热泵风扇为例" />
</StackPanel>
<FlowDocumentScrollViewer Margin="5">
<FlowDocument
x:Name="LogDocument"
FontFamily="Calibre, Microsoft YaHei UI"
FontSize="9pt" />
</FlowDocumentScrollViewer>
</DockPanel>
</Grid>
</Window>
<Window
x:Class="ProtocolLab.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProtocolLab"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="800"
Height="450"
Loaded="Window_Loaded"
Unloaded="Window_Unloaded"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<DockPanel>
<StackPanel
VerticalAlignment="Stretch"
DockPanel.Dock="Top"
Orientation="Vertical">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="15,5" />
</Style>
</StackPanel.Resources>
<Button
Click="Connect_Click"
Content="发送 Connect 命令"
ToolTip="当 PLC 通过 TCP 连接到服务端时,服务端会立刻向 PLC 发送 Connect 命令" />
<Button
Click="GetMetric_Click"
Content="发送 GetMetric 命令"
ToolTip="服务端会定期向保持连接的 PLC 发送 GetMetric 命令收集数据" />
<Button
Click="UpdateSwitch_Click"
Content="发送 UpdateSwitch 命令"
ToolTip="按下任何开关时会发送 UpdateSwitch 命令,此处发送内容以开启热泵风扇为例" />
</StackPanel>
<FlowDocumentScrollViewer Margin="5">
<FlowDocument
x:Name="LogDocument"
FontFamily="Calibre, Microsoft YaHei UI"
FontSize="9pt" />
</FlowDocumentScrollViewer>
</DockPanel>
</Grid>
</Window>
34 changes: 17 additions & 17 deletions codelab/ProtocolLab/ProtocolLab.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\GeothermalResearchInstitute\GeothermalResearchInstitute.PlcClient\GeothermalResearchInstitute.Plc.csproj" />
</ItemGroup>

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(NetcoreCurrentTargetFramework)</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\GeothermalResearchInstitute\GeothermalResearchInstitute.PlcClient\GeothermalResearchInstitute.Plc.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion codelab/TcpServerLab/TcpServerLab.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand Down
26 changes: 13 additions & 13 deletions codelab/TplLab/TplLab.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetcoreCurrentTargetFramework)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetcoreCurrentTargetFramework)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" />
</ItemGroup>

</Project>

0 comments on commit 9b66dc4

Please sign in to comment.