Skip to content

Commit

Permalink
Merge pull request #5 from TimothyMeadows/beta2-dev
Browse files Browse the repository at this point in the history
Remove support for winforms, add support for .NET MAUI with Windows, and Mac support
  • Loading branch information
TimothyMeadows authored Dec 30, 2022
2 parents 89ec822 + 23608c6 commit 36bc355
Show file tree
Hide file tree
Showing 44 changed files with 1,484 additions and 4,689 deletions.
Binary file added .DS_Store
Binary file not shown.
52 changes: 27 additions & 25 deletions GUvrs.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUvrs", "GUvrs\GUvrs.csproj", "{5A460E1F-289B-44E1-876A-6CA1A21BBEA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5A460E1F-289B-44E1-876A-6CA1A21BBEA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A460E1F-289B-44E1-876A-6CA1A21BBEA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A460E1F-289B-44E1-876A-6CA1A21BBEA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A460E1F-289B-44E1-876A-6CA1A21BBEA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3C71B9E2-C463-44BE-BC54-BDC1DA268F57}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GUvrs", "GUvrs\GUvrs.csproj", "{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Release|Any CPU.Build.0 = Release|Any CPU
{160D7FAB-C213-4ECC-B43F-38A9AC620D4E}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
EndGlobal
Binary file added GUvrs/.DS_Store
Binary file not shown.
14 changes: 14 additions & 0 deletions GUvrs/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:GUvrs"
x:Class="GUvrs.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
11 changes: 11 additions & 0 deletions GUvrs/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace GUvrs;

public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new AppShell();
}
}
14 changes: 14 additions & 0 deletions GUvrs/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="GUvrs.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:GUvrs"
Shell.FlyoutBehavior="Disabled">

<ShellContent
Shell.NavBarIsVisible="False"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />

</Shell>
14 changes: 14 additions & 0 deletions GUvrs/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace GUvrs;

public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}

protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
{
return base.MeasureOverride(100, 100);
}
}
91 changes: 75 additions & 16 deletions GUvrs/GUvrs.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,75 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>

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

<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>GUvrs</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<WindowsPackageType>None</WindowsPackageType>

<!-- Display name -->
<ApplicationTitle>GUvrs</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>timothymeadows.guvrs</ApplicationId>
<ApplicationIdGuid>4b2d63d1-6e06-4c42-9585-9f9bd363dc26</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Resources\Images\**" />
<EmbeddedResource Remove="Resources\Images\**" />
<MauiCss Remove="Resources\Images\**" />
<MauiXaml Remove="Resources\Images\**" />
<None Remove="Resources\Images\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<None Remove="Modules\" />
<None Remove="Resources\Images\" />
<None Remove="Models\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Modules\" />
<Folder Include="Models\" />
</ItemGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<DefineConstants>WINDOWS</DefineConstants>
</PropertyGroup>
</Project>
137 changes: 137 additions & 0 deletions GUvrs/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="GUvrs.MainPage">

<ScrollView BackgroundColor="White">
<VerticalStackLayout
VerticalOptions="Start"
HorizontalOptions="Center">

<StackLayout
Spacing="0"
Padding="30,0">

<Label
Padding="25"/>

<StackLayout Orientation="Horizontal"
Spacing="5">
<Label
Text="Player Name: "
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />

<Label
x:Name="PlayerName"
Text=""
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />
</StackLayout>

<StackLayout Orientation="Horizontal"
Spacing="5">
<Label
Text="Player ID: "
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />

<Label
x:Name="PlayerID"
Text=""
FontSize="18"
TextColor="Blue"
TextDecorations="Underline"
HorizontalOptions="Center">

<Label.GestureRecognizers>
<PointerGestureRecognizer PointerEntered="OnShowHandPointer"
PointerExited="OnHideHandPointer" />
</Label.GestureRecognizers>
</Label>
</StackLayout>

<Label
Padding="15" />

<Button
x:Name="Reset"
MinimumWidthRequest="200"
Text="Reset"
TextColor="White"
BorderColor="White"
BackgroundColor="Black"
Clicked="OnResetClick"
HorizontalOptions="Center">

<Button.GestureRecognizers>
<PointerGestureRecognizer PointerEntered="OnShowHandPointer"
PointerExited="OnHideHandPointer" />
</Button.GestureRecognizers>
</Button>

<Label
Padding="15"/>

<StackLayout Orientation="Horizontal"
Spacing="5">
<Label
Text="Opponent Name: "
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />

<Label
x:Name="OpponentName"
Text=""
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />
</StackLayout>

<StackLayout Orientation="Horizontal"
Spacing="5">
<Label
Text="Opponent ID: "
FontSize="18"
TextColor="Black"
HorizontalOptions="Center" />

<Label
x:Name="OpponentID"
Text=""
FontSize="18"
TextColor="Blue"
TextDecorations="Underline"
HorizontalOptions="Center">

<Label.GestureRecognizers>
<PointerGestureRecognizer PointerEntered="OnShowHandPointer"
PointerExited="OnHideHandPointer" />
</Label.GestureRecognizers>
</Label>
</StackLayout>

<Label
Padding="15"/>

<Label
MaximumWidthRequest="310"
HorizontalOptions="Center">
<Label.FormattedText>
<FormattedString>
<Span Text="Warning: This is a BETA edition. It may be subject to errors, or issues. Please report any you find to github."
TextColor="Black"
FontSize="14"
FontAttributes="Italic"/>
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</VerticalStackLayout>
</ScrollView>

</ContentPage>
Loading

0 comments on commit 36bc355

Please sign in to comment.