Skip to content

Commit fa46119

Browse files
committed
move 2 .NET Core 3.1
1 parent e05ac67 commit fa46119

11 files changed

Lines changed: 35 additions & 397 deletions

LighthouseV2PowerControl.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30523.141
4+
VisualStudioVersion = 16.0.31019.35
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LighthouseV2PowerControl", "LighthouseV2PowerControl\LighthouseV2PowerControl.csproj", "{34E0F0F2-5475-4464-B7FB-213675891FB4}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LighthouseV2PowerControl", "LighthouseV2PowerControl\LighthouseV2PowerControl.csproj", "{2CEE8BD4-AF72-4FEF-AE85-25FEC4A0A516}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{34E0F0F2-5475-4464-B7FB-213675891FB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{34E0F0F2-5475-4464-B7FB-213675891FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{34E0F0F2-5475-4464-B7FB-213675891FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{34E0F0F2-5475-4464-B7FB-213675891FB4}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{2CEE8BD4-AF72-4FEF-AE85-25FEC4A0A516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{2CEE8BD4-AF72-4FEF-AE85-25FEC4A0A516}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{2CEE8BD4-AF72-4FEF-AE85-25FEC4A0A516}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{2CEE8BD4-AF72-4FEF-AE85-25FEC4A0A516}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {E20B20E0-B2A4-4291-A25B-86767F7E5E0A}
23+
SolutionGuid = {E9CDBD90-70AD-4A22-B2DF-042786A46F6E}
2424
EndGlobalSection
2525
EndGlobal

LighthouseV2PowerControl/App.config

Lines changed: 0 additions & 6 deletions
This file was deleted.

LighthouseV2PowerControl/Form1.Designer.cs

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LighthouseV2PowerControl/Form1.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
35
using System.Drawing;
6+
using System.Linq;
7+
using System.Text;
48
using System.Text.RegularExpressions;
59
using System.Threading.Tasks;
610
using System.Windows.Forms;
@@ -9,6 +13,7 @@
913
using Windows.Devices.Enumeration;
1014
using Windows.Storage.Streams;
1115

16+
1217
namespace LighthouseV2PowerControl
1318
{
1419
public partial class Form1 : Form
@@ -24,8 +29,8 @@ public partial class Form1 : Form
2429
public Form1(string[] args)
2530
{
2631
InitializeComponent();
27-
btnStart.Click += (obj,e) => SendOnLighthouseAsync(activateByte);
28-
btnStop.Click += (obj,e) => SendOnLighthouseAsync(deactivateByte);
32+
btnStart.Click += (obj, e) => SendOnLighthouseAsync(activateByte);
33+
btnStop.Click += (obj, e) => SendOnLighthouseAsync(deactivateByte);
2934
if (args.Length > 0)
3035
{
3136
UseArgumentsAsync(args);
@@ -41,7 +46,7 @@ private async void UseArgumentsAsync(string[] args)
4146
await GetGattCharacteristicsAsync();
4247
for (int i = 0; i < args.Length; ++i)
4348
{
44-
Log(args[i] + " " + listGattCharacteristics.Count.ToString());
49+
Log(args[i] + " " + listGattCharacteristics.Count.ToString());
4550
if (args[i] == "--powerOn")
4651
{
4752
await SendOnLighthouseAsync(activateByte);
@@ -66,7 +71,7 @@ private async Task GetGattCharacteristicsAsync()
6671
DeviceInformationCollection GatDevices = await DeviceInformation.FindAllAsync(GattDeviceService.GetDeviceSelectorFromUuid(service));
6772
for (int id = 0; id < GatDevices.Count; ++id)
6873
{
69-
if(!regex.IsMatch(GatDevices[id].Name)) continue;
74+
if (!regex.IsMatch(GatDevices[id].Name)) continue;
7075

7176
BluetoothLEDevice bluetoothLeDevice = await BluetoothLEDevice.FromIdAsync(GatDevices[id].Id);
7277
GattDeviceServicesResult result = await bluetoothLeDevice.GetGattServicesAsync();
Lines changed: 10 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,20 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{34E0F0F2-5475-4464-B7FB-213675891FB4}</ProjectGuid>
84
<OutputType>WinExe</OutputType>
9-
<RootNamespace>LighthouseV2PowerControl</RootNamespace>
10-
<AssemblyName>LighthouseV2PowerControl</AssemblyName>
11-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12-
<FileAlignment>512</FileAlignment>
13-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14-
<Deterministic>true</Deterministic>
15-
<NuGetPackageImportStamp>
16-
</NuGetPackageImportStamp>
17-
<PublishUrl>publish\</PublishUrl>
18-
<Install>true</Install>
19-
<InstallFrom>Disk</InstallFrom>
20-
<UpdateEnabled>false</UpdateEnabled>
21-
<UpdateMode>Foreground</UpdateMode>
22-
<UpdateInterval>7</UpdateInterval>
23-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24-
<UpdatePeriodically>false</UpdatePeriodically>
25-
<UpdateRequired>false</UpdateRequired>
26-
<MapFileExtensions>true</MapFileExtensions>
27-
<ApplicationRevision>0</ApplicationRevision>
28-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29-
<IsWebBootstrapper>false</IsWebBootstrapper>
30-
<UseApplicationTrust>false</UseApplicationTrust>
31-
<BootstrapperEnabled>true</BootstrapperEnabled>
32-
</PropertyGroup>
33-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
34-
<PlatformTarget>AnyCPU</PlatformTarget>
35-
<DebugSymbols>true</DebugSymbols>
36-
<DebugType>full</DebugType>
37-
<Optimize>false</Optimize>
38-
<OutputPath>bin\Debug\</OutputPath>
39-
<DefineConstants>DEBUG;TRACE</DefineConstants>
40-
<ErrorReport>prompt</ErrorReport>
41-
<WarningLevel>4</WarningLevel>
42-
</PropertyGroup>
43-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44-
<PlatformTarget>AnyCPU</PlatformTarget>
45-
<DebugType>pdbonly</DebugType>
46-
<Optimize>true</Optimize>
47-
<OutputPath>bin\Release\</OutputPath>
48-
<DefineConstants>TRACE</DefineConstants>
49-
<ErrorReport>prompt</ErrorReport>
50-
<WarningLevel>4</WarningLevel>
51-
</PropertyGroup>
52-
<PropertyGroup>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<UseWindowsForms>true</UseWindowsForms>
537
<ApplicationIcon>newIcon.ico</ApplicationIcon>
548
</PropertyGroup>
9+
5510
<ItemGroup>
56-
<Reference Include="System" />
57-
<Reference Include="System.Core" />
58-
<Reference Include="System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
59-
<SpecificVersion>False</SpecificVersion>
60-
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll</HintPath>
11+
<Reference Include="System.Runtime.WindowsRuntime">
12+
<HintPath>..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll</HintPath>
6113
</Reference>
62-
<Reference Include="System.Xml.Linq" />
63-
<Reference Include="System.Data.DataSetExtensions" />
64-
<Reference Include="Microsoft.CSharp" />
65-
<Reference Include="System.Data" />
66-
<Reference Include="System.Deployment" />
67-
<Reference Include="System.Drawing" />
68-
<Reference Include="System.Net.Http" />
69-
<Reference Include="System.Windows.Forms" />
70-
<Reference Include="System.Xml" />
7114
<Reference Include="Windows">
72-
<HintPath>..\..\..\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd</HintPath>
15+
<HintPath>E:\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd</HintPath>
16+
<IsWinMDFile>true</IsWinMDFile>
7317
</Reference>
7418
</ItemGroup>
75-
<ItemGroup>
76-
<Compile Include="Form1.cs">
77-
<SubType>Form</SubType>
78-
</Compile>
79-
<Compile Include="Form1.Designer.cs">
80-
<DependentUpon>Form1.cs</DependentUpon>
81-
</Compile>
82-
<Compile Include="Program.cs" />
83-
<Compile Include="Properties\AssemblyInfo.cs" />
84-
<EmbeddedResource Include="Form1.resx">
85-
<DependentUpon>Form1.cs</DependentUpon>
86-
</EmbeddedResource>
87-
<EmbeddedResource Include="Properties\Resources.resx">
88-
<Generator>ResXFileCodeGenerator</Generator>
89-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
90-
<SubType>Designer</SubType>
91-
</EmbeddedResource>
92-
<Compile Include="Properties\Resources.Designer.cs">
93-
<AutoGen>True</AutoGen>
94-
<DependentUpon>Resources.resx</DependentUpon>
95-
</Compile>
96-
<None Include="Properties\Settings.settings">
97-
<Generator>SettingsSingleFileGenerator</Generator>
98-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
99-
</None>
100-
<Compile Include="Properties\Settings.Designer.cs">
101-
<AutoGen>True</AutoGen>
102-
<DependentUpon>Settings.settings</DependentUpon>
103-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
104-
</Compile>
105-
</ItemGroup>
106-
<ItemGroup>
107-
<None Include="App.config" />
108-
</ItemGroup>
109-
<ItemGroup>
110-
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
111-
<Visible>False</Visible>
112-
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 и x64%29</ProductName>
113-
<Install>true</Install>
114-
</BootstrapperPackage>
115-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
116-
<Visible>False</Visible>
117-
<ProductName>.NET Framework 3.5 SP1</ProductName>
118-
<Install>false</Install>
119-
</BootstrapperPackage>
120-
</ItemGroup>
121-
<ItemGroup>
122-
<Content Include="newIcon.ico" />
123-
</ItemGroup>
124-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
19+
12520
</Project>

LighthouseV2PowerControl/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
@@ -8,9 +8,13 @@ namespace LighthouseV2PowerControl
88
{
99
static class Program
1010
{
11+
/// <summary>
12+
/// The main entry point for the application.
13+
/// </summary>
1114
[STAThread]
1215
static void Main(string[] args)
1316
{
17+
Application.SetHighDpiMode(HighDpiMode.SystemAware);
1418
Application.EnableVisualStyles();
1519
Application.SetCompatibleTextRenderingDefault(false);
1620
Application.Run(new Form1(args));

LighthouseV2PowerControl/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

LighthouseV2PowerControl/Properties/Resources.Designer.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)