Skip to content

Commit 6a53ee0

Browse files
authored
Work on SimpleWPF sample (#329)
***NO_CI***
1 parent e3db928 commit 6a53ee0

32 files changed

+150
-21
lines changed

samples/Graphics/SimpleWpf/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ This contains an animated graphical menu with allows the selection of pages that
99
- Free drawing panel
1010

1111
Requires the GPIO pins numbers to be defined for the Left, Right, Up, Down & Select keys, see Program.cs
12+
13+
- [🌶️🌶️ - Simple WPF](./SimpleWpf/)
14+
- [🌶️🌶️ - Simple WPF] for ESP32 devices](./SimpleWpf.Esp32/)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("CSharp.BlankApplication")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("CSharp.BlankApplication")]
13+
[assembly: AssemblyCopyright("Copyright © 2023")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// Version information for an assembly consists of the following four values:
23+
//
24+
// Major Version
25+
// Minor Version
26+
// Build Number
27+
// Revision
28+
//
29+
// You can specify all the values or you can default the Build and Revision Numbers
30+
// by using the '*' as shown below:
31+
// [assembly: AssemblyVersion("1.0.*")]
32+
[assembly: AssemblyVersion("1.0.0.0")]
33+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
5+
</PropertyGroup>
6+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
7+
<PropertyGroup>
8+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
11+
<ProjectGuid>a0798abe-45fe-4797-9565-8bb08962bc0c</ProjectGuid>
12+
<OutputType>Exe</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<FileAlignment>512</FileAlignment>
15+
<RootNamespace>SimpleWpf</RootNamespace>
16+
<AssemblyName>SimpleWpf</AssemblyName>
17+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<DefineConstants>$(DefineConstants);ESP32;</DefineConstants>
19+
</PropertyGroup>
20+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
21+
<ItemGroup>
22+
<Compile Include="..\SimpleWpf\GpioButtonInputProvider.cs">
23+
<Link>GpioButtonInputProvider.cs</Link>
24+
</Compile>
25+
<Compile Include="..\SimpleWpf\Program.cs">
26+
<Link>Program.cs</Link>
27+
</Compile>
28+
<Compile Include="..\SimpleWpf\SimpleWPFApplication.cs">
29+
<Link>SimpleWPFApplication.cs</Link>
30+
</Compile>
31+
<Compile Include="Properties\AssemblyInfo.cs" />
32+
</ItemGroup>
33+
<ItemGroup>
34+
<Reference Include="mscorlib">
35+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
36+
</Reference>
37+
<Reference Include="nanoFramework.Graphics">
38+
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
39+
</Reference>
40+
<Reference Include="nanoFramework.Graphics.Core">
41+
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
42+
</Reference>
43+
<Reference Include="nanoFramework.Hardware.Esp32">
44+
<HintPath>..\packages\nanoFramework.Hardware.Esp32.1.6.8\lib\nanoFramework.Hardware.Esp32.dll</HintPath>
45+
</Reference>
46+
<Reference Include="nanoFramework.ResourceManager">
47+
<HintPath>..\packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
48+
</Reference>
49+
<Reference Include="nanoFramework.Runtime.Events">
50+
<HintPath>..\packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
51+
</Reference>
52+
<Reference Include="nanoFramework.Runtime.Native">
53+
<HintPath>..\packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
54+
</Reference>
55+
<Reference Include="System.Device.Gpio">
56+
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
57+
</Reference>
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Compile Include="..\SimpleWpf\Resource.Designer.cs">
61+
<DesignTime>True</DesignTime>
62+
<AutoGen>True</AutoGen>
63+
<DependentUpon>Resource.resx</DependentUpon>
64+
</Compile>
65+
</ItemGroup>
66+
<ItemGroup>
67+
<EmbeddedResource Include="..\SimpleWpf\Resource.resx" Link="Resource.resx" />
68+
</ItemGroup>
69+
<ItemGroup>
70+
<None Include="packages.config" />
71+
</ItemGroup>
72+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
73+
<ProjectExtensions>
74+
<ProjectCapabilities>
75+
<ProjectConfigurationsDeclaredAsItems />
76+
</ProjectCapabilities>
77+
</ProjectExtensions>
78+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnano1.0" />
4+
<package id="nanoFramework.Graphics" version="1.1.37" targetFramework="netnano1.0" />
5+
<package id="nanoFramework.Hardware.Esp32" version="1.6.8" targetFramework="netnano1.0" />
6+
<package id="nanoFramework.ResourceManager" version="1.2.13" targetFramework="netnano1.0" />
7+
<package id="nanoFramework.Runtime.Events" version="1.11.6" targetFramework="netnano1.0" />
8+
<package id="nanoFramework.Runtime.Native" version="1.6.6" targetFramework="netnano1.0" />
9+
<package id="nanoFramework.System.Device.Gpio" version="1.1.28" targetFramework="netnano1.0" />
10+
</packages>

samples/Graphics/SimpleWpf/SimpleWpf.sln

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.1259
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.7.34221.43
54
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf", "SimpleWpf.nfproj", "{FFE43682-F092-423A-AA8C-5D0C143CB9CC}"
5+
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf", "SimpleWpf\SimpleWpf.nfproj", "{FFE43682-F092-423A-AA8C-5D0C143CB9CC}"
6+
EndProject
7+
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf.Esp32", "SimpleWpf.Esp32\SimpleWpf.Esp32.nfproj", "{A0798ABE-45FE-4797-9565-8BB08962BC0C}"
78
EndProject
89
Global
910
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -17,6 +18,12 @@ Global
1718
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
1819
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.Build.0 = Release|Any CPU
1920
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
21+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
24+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.Deploy.0 = Release|Any CPU
2027
EndGlobalSection
2128
GlobalSection(SolutionProperties) = preSolution
2229
HideSolutionNode = FALSE

samples/Graphics/SimpleWpf/Program.cs renamed to samples/Graphics/SimpleWpf/SimpleWpf/Program.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
// !!!----------- SAMPLE - ENSURE YOU CHOOSE THE CORRECT TARGET HERE --------------!!!
5-
#define STM32F769I_DISCO
6-
// !!!-----------------------------------------------------------------------------!!!
7-
84
using nanoFramework.Presentation;
95
using nanoFramework.UI;
106
using nanoFramework.UI.Input;
117
using SimpleWPF;
128
using System;
139
using System.Threading;
10+
#if ESP32
11+
using nanoFramework.Hardware.Esp32;
12+
#endif
1413

1514
namespace SimpleWpf
1615
{

samples/Graphics/SimpleWpf/Resource.Designer.cs renamed to samples/Graphics/SimpleWpf/SimpleWpf/Resource.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Graphics/SimpleWpf/SimpleWpf.nfproj renamed to samples/Graphics/SimpleWpf/SimpleWpf/SimpleWpf.nfproj

+11-12
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<RootNamespace>SimpleWpf</RootNamespace>
1616
<AssemblyName>SimpleWpf</AssemblyName>
1717
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<DefineConstants>$(DefineConstants);STM32F769I_DISCO;</DefineConstants>
1819
</PropertyGroup>
1920
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
2021
<ItemGroup>
@@ -56,35 +57,33 @@
5657
</ItemGroup>
5758
<ItemGroup>
5859
<Reference Include="mscorlib, Version=1.14.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
59-
<HintPath>packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
60+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
6061
<Private>True</Private>
6162
</Reference>
62-
<Reference Include="nanoFramework.Graphics, Version=1.1.37.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
63-
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
64-
<Private>True</Private>
63+
<Reference Include="nanoFramework.Graphics">
64+
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
6565
</Reference>
66-
<Reference Include="nanoFramework.Graphics.Core, Version=1.1.37.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
67-
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
68-
<Private>True</Private>
66+
<Reference Include="nanoFramework.Graphics.Core">
67+
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
6968
</Reference>
7069
<Reference Include="nanoFramework.ResourceManager, Version=1.2.13.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
71-
<HintPath>packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
70+
<HintPath>..\packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
7271
<Private>True</Private>
7372
</Reference>
7473
<Reference Include="nanoFramework.Runtime.Events, Version=1.11.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
75-
<HintPath>packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
74+
<HintPath>..\packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
7675
<Private>True</Private>
7776
</Reference>
7877
<Reference Include="nanoFramework.Runtime.Native, Version=1.6.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
79-
<HintPath>packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
78+
<HintPath>..\packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
8079
<Private>True</Private>
8180
</Reference>
8281
<Reference Include="nanoFramework.System.Collections, Version=1.5.18.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
83-
<HintPath>packages\nanoFramework.System.Collections.1.5.18\lib\nanoFramework.System.Collections.dll</HintPath>
82+
<HintPath>..\packages\nanoFramework.System.Collections.1.5.18\lib\nanoFramework.System.Collections.dll</HintPath>
8483
<Private>True</Private>
8584
</Reference>
8685
<Reference Include="System.Device.Gpio, Version=1.1.28.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
87-
<HintPath>packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
86+
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
8887
<Private>True</Private>
8988
</Reference>
9089
</ItemGroup>
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)