Skip to content

Commit

Permalink
Work on SimpleWPF sample (#329)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored Oct 31, 2023
1 parent e3db928 commit 6a53ee0
Show file tree
Hide file tree
Showing 32 changed files with 150 additions and 21 deletions.
3 changes: 3 additions & 0 deletions samples/Graphics/SimpleWpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ This contains an animated graphical menu with allows the selection of pages that
- Free drawing panel

Requires the GPIO pins numbers to be defined for the Left, Right, Up, Down & Select keys, see Program.cs

- [🌶️🌶️ - Simple WPF](./SimpleWpf/)
- [🌶️🌶️ - Simple WPF] for ESP32 devices](./SimpleWpf.Esp32/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharp.BlankApplication")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharp.BlankApplication")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
78 changes: 78 additions & 0 deletions samples/Graphics/SimpleWpf/SimpleWpf.Esp32/SimpleWpf.Esp32.nfproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>a0798abe-45fe-4797-9565-8bb08962bc0c</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<RootNamespace>SimpleWpf</RootNamespace>
<AssemblyName>SimpleWpf</AssemblyName>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<DefineConstants>$(DefineConstants);ESP32;</DefineConstants>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="..\SimpleWpf\GpioButtonInputProvider.cs">
<Link>GpioButtonInputProvider.cs</Link>
</Compile>
<Compile Include="..\SimpleWpf\Program.cs">
<Link>Program.cs</Link>
</Compile>
<Compile Include="..\SimpleWpf\SimpleWPFApplication.cs">
<Link>SimpleWPFApplication.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Graphics">
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Graphics.Core">
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Hardware.Esp32">
<HintPath>..\packages\nanoFramework.Hardware.Esp32.1.6.8\lib\nanoFramework.Hardware.Esp32.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.ResourceManager">
<HintPath>..\packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Runtime.Events">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Runtime.Native">
<HintPath>..\packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
</Reference>
<Reference Include="System.Device.Gpio">
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SimpleWpf\Resource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\SimpleWpf\Resource.resx" Link="Resource.resx" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
</ProjectCapabilities>
</ProjectExtensions>
</Project>
10 changes: 10 additions & 0 deletions samples/Graphics/SimpleWpf/SimpleWpf.Esp32/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnano1.0" />
<package id="nanoFramework.Graphics" version="1.1.37" targetFramework="netnano1.0" />
<package id="nanoFramework.Hardware.Esp32" version="1.6.8" targetFramework="netnano1.0" />
<package id="nanoFramework.ResourceManager" version="1.2.13" targetFramework="netnano1.0" />
<package id="nanoFramework.Runtime.Events" version="1.11.6" targetFramework="netnano1.0" />
<package id="nanoFramework.Runtime.Native" version="1.6.6" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Device.Gpio" version="1.1.28" targetFramework="netnano1.0" />
</packages>
15 changes: 11 additions & 4 deletions samples/Graphics/SimpleWpf/SimpleWpf.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1259
# Visual Studio Version 17
VisualStudioVersion = 17.7.34221.43
MinimumVisualStudioVersion = 10.0.40219.1
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf", "SimpleWpf.nfproj", "{FFE43682-F092-423A-AA8C-5D0C143CB9CC}"
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf", "SimpleWpf\SimpleWpf.nfproj", "{FFE43682-F092-423A-AA8C-5D0C143CB9CC}"
EndProject
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "SimpleWpf.Esp32", "SimpleWpf.Esp32\SimpleWpf.Esp32.nfproj", "{A0798ABE-45FE-4797-9565-8BB08962BC0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -17,6 +18,12 @@ Global
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.Build.0 = Release|Any CPU
{FFE43682-F092-423A-AA8C-5D0C143CB9CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.Build.0 = Release|Any CPU
{A0798ABE-45FE-4797-9565-8BB08962BC0C}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// !!!----------- SAMPLE - ENSURE YOU CHOOSE THE CORRECT TARGET HERE --------------!!!
#define STM32F769I_DISCO
// !!!-----------------------------------------------------------------------------!!!

using nanoFramework.Presentation;
using nanoFramework.UI;
using nanoFramework.UI.Input;
using SimpleWPF;
using System;
using System.Threading;
#if ESP32
using nanoFramework.Hardware.Esp32;
#endif

namespace SimpleWpf
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<RootNamespace>SimpleWpf</RootNamespace>
<AssemblyName>SimpleWpf</AssemblyName>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<DefineConstants>$(DefineConstants);STM32F769I_DISCO;</DefineConstants>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
Expand Down Expand Up @@ -56,35 +57,33 @@
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.14.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
<HintPath>..\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nanoFramework.Graphics, Version=1.1.37.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
<Private>True</Private>
<Reference Include="nanoFramework.Graphics">
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.Graphics.Core, Version=1.1.37.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
<Private>True</Private>
<Reference Include="nanoFramework.Graphics.Core">
<HintPath>..\packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
</Reference>
<Reference Include="nanoFramework.ResourceManager, Version=1.2.13.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
<HintPath>..\packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nanoFramework.Runtime.Events, Version=1.11.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
<HintPath>..\packages\nanoFramework.Runtime.Events.1.11.6\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nanoFramework.Runtime.Native, Version=1.6.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
<HintPath>..\packages\nanoFramework.Runtime.Native.1.6.6\lib\nanoFramework.Runtime.Native.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nanoFramework.System.Collections, Version=1.5.18.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.System.Collections.1.5.18\lib\nanoFramework.System.Collections.dll</HintPath>
<HintPath>..\packages\nanoFramework.System.Collections.1.5.18\lib\nanoFramework.System.Collections.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Device.Gpio, Version=1.1.28.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.1.28\lib\System.Device.Gpio.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.

0 comments on commit 6a53ee0

Please sign in to comment.