rename example
This commit is contained in:
parent
eb723701cf
commit
10e6138756
4 changed files with 28 additions and 22 deletions
|
|
@ -1,21 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>lang_cs</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\servicepoint2-binding-cs\ServicePoint2\ServicePoint2.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\target\debug\libservicepoint2.so" CopyToOutputDirectory="Always">
|
||||
<Link>libservicepoint2.so</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
19
examples/lang_cs/Program.cs
Normal file
19
examples/lang_cs/Program.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using ServicePoint2;
|
||||
|
||||
using var connection = Connection.Open("127.0.0.1:2342");
|
||||
|
||||
connection.Send(Command.Clear());
|
||||
connection.Send(Command.Brightness(128));
|
||||
|
||||
using var pixels = PixelGrid.New(Constants.PixelWidth, Constants.PixelHeight);
|
||||
|
||||
for (var offset = 0; offset < int.MaxValue; offset++)
|
||||
{
|
||||
pixels.Fill(false);
|
||||
|
||||
for (var y = 0; y < pixels.Height; y++)
|
||||
pixels[(y + offset) % Constants.PixelWidth, y] = true;
|
||||
|
||||
connection.Send(Command.BitmapLinearWin(0, 0, pixels.Clone()));
|
||||
Thread.Sleep(14);
|
||||
}
|
||||
27
examples/lang_cs/lang_cs.csproj
Normal file
27
examples/lang_cs/lang_cs.csproj
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>lang_cs</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\servicepoint2-binding-cs\ServicePoint2\ServicePoint2.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<Content Include="..\..\target\debug\libservicepoint2.so" CopyToOutputDirectory="Always">
|
||||
<Link>libservicepoint2.so</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release'">
|
||||
<Content Include="..\..\target\release\libservicepoint2.so" CopyToOutputDirectory="Always">
|
||||
<Link>libservicepoint2.so</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServicePoint2", "ServicePoint2.csproj", "{70EFFA3F-012A-4518-9627-466BEAE4252E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lang-cs", "..\..\examples\lang-cs\lang-cs.csproj", "{DA3B8B6E-993A-47DA-844B-F92AF520FF59}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lang-cs", "..\..\examples\lang_cs\lang_cs.csproj", "{DA3B8B6E-993A-47DA-844B-F92AF520FF59}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
|||
Loading…
Reference in a new issue