Skip to content

Commit b13ac22

Browse files
committed
Add project files.
1 parent 1787d8c commit b13ac22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1205
-0
lines changed

MyFinance.sln

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34714.143
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFinance", "MyFinance\MyFinance.csproj", "{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{1DD99D1A-E75C-4AFA-94F3-9004EE278C03}.Release|Any CPU.Deploy.0 = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(SolutionProperties) = preSolution
22+
HideSolutionNode = FALSE
23+
EndGlobalSection
24+
GlobalSection(ExtensibilityGlobals) = postSolution
25+
SolutionGuid = {D9167898-835A-460D-8F37-547AAA2141E4}
26+
EndGlobalSection
27+
EndGlobal

MyFinance/App.cs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace MyFinance;
2+
3+
public partial class App : Application
4+
{
5+
public App(IServiceProvider services)
6+
{
7+
this
8+
.Resources(AppStyles.Default)
9+
.MainPage(services.GetService<AppShell>());
10+
}
11+
}

MyFinance/AppShell.cs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace MyFinance;
2+
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell(IServiceProvider serviceProvider)
6+
{
7+
this
8+
.FlyoutBehavior(FlyoutBehavior.Disabled)
9+
.Items(
10+
new ShellContent()
11+
.Title("")
12+
.ContentTemplate(() => new StartedPage())
13+
.Route("StartedPage"),
14+
15+
new ShellContent()
16+
.Title("")
17+
.ContentTemplate(() => serviceProvider.GetService<LoginPage>())
18+
.Route("LoginPage")
19+
);
20+
}
21+
}

MyFinance/HotReloadHandler.cs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[assembly: System.Reflection.Metadata.MetadataUpdateHandler(typeof(HotReloadHandler))]
2+
namespace MyFinance
3+
{
4+
public static class HotReloadHandler
5+
{
6+
#pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
7+
public static event Action<Type[]?>? UpdateApplicationEvent;
8+
#pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
9+
10+
internal static void ClearCache(Type[]? types) { }
11+
internal static void UpdateApplication(Type[]? types)
12+
{
13+
UpdateApplicationEvent?.Invoke(types);
14+
}
15+
}
16+
}

MyFinance/Imports.cs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// .NET MAUI Toolkit
2+
global using CommunityToolkit.Maui;
3+
global using CommunityToolkit.Maui.Behaviors;
4+
global using CommunityToolkit.Maui.Converters;
5+
// .NET MAUI Markup
6+
global using CommunityToolkit.Maui.Views;
7+
// MVVM Toolkit
8+
global using CommunityToolkit.Mvvm.ComponentModel;
9+
global using CommunityToolkit.Mvvm.Input;
10+
global using CommunityToolkit.Mvvm.Messaging;
11+
// Markup FmgLib
12+
global using FmgLib.MauiMarkup;
13+
global using MyFinance;
14+
global using MyFinance.ViewModels;
15+
global using MyFinance.Views;
16+
global using UraniumUI.Material.Controls;
17+
global using static Microsoft.Maui.Controls.FontAttributes;
18+
global using static Microsoft.Maui.Controls.LayoutAlignment;
19+
global using static Microsoft.Maui.Graphics.Colors;
20+
21+
global using MC = Microsoft.Maui.Controls;

MyFinance/MauiProgram.cs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using Microsoft.Extensions.Logging;
2+
using UraniumUI;
3+
4+
namespace MyFinance;
5+
6+
7+
[MauiMarkup(typeof(StatusBarBehavior), typeof(ShellContent), typeof(TextField), typeof(InputField))]
8+
public static class MauiProgram
9+
{
10+
public static MauiApp CreateMauiApp()
11+
{
12+
var builder = MauiApp.CreateBuilder();
13+
builder
14+
.UseMauiApp<App>()
15+
.UseUraniumUI()
16+
.UseUraniumUIMaterial()
17+
.UseMauiCommunityToolkit()
18+
.ConfigureFonts(fonts =>
19+
{
20+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
21+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
22+
});
23+
24+
builder.Logging.AddDebug();
25+
26+
builder.Services
27+
.AddSingleton<App>()
28+
.AddSingleton<AppShell>()
29+
.AddScopedWithShellRoute<MainPage, MainPageViewModel>($"//{nameof(MainPage)}")
30+
.AddScopedWithShellRoute<LoginPage, LoginPageViewModel>($"//{nameof(LoginPage)}")
31+
.AddScoped<StartedPage>();
32+
33+
return builder.Build();
34+
}
35+
}

MyFinance/MyFinance.csproj

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6+
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
8+
9+
<!-- Note for MacCatalyst:
10+
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
11+
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
12+
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
13+
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
14+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
15+
16+
<OutputType>Exe</OutputType>
17+
<RootNamespace>MyFinance</RootNamespace>
18+
<UseMaui>true</UseMaui>
19+
<SingleProject>true</SingleProject>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
22+
23+
<!-- Display name -->
24+
<ApplicationTitle>MyFinance</ApplicationTitle>
25+
26+
<!-- App Identifier -->
27+
<ApplicationId>com.companyname.myfinance</ApplicationId>
28+
<ApplicationIdGuid>41f25317-9560-453b-be83-64356c8680e1</ApplicationIdGuid>
29+
30+
<!-- Versions -->
31+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
32+
<ApplicationVersion>1</ApplicationVersion>
33+
34+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
35+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
36+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
37+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
38+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
39+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
40+
</PropertyGroup>
41+
42+
<ItemGroup>
43+
<!-- App Icon -->
44+
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
45+
46+
<!-- Splash Screen -->
47+
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
48+
49+
<!-- Images -->
50+
<MauiImage Include="Resources\Images\*" />
51+
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
52+
53+
<!-- Custom Fonts -->
54+
<MauiFont Include="Resources\Fonts\*" />
55+
56+
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
57+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
58+
</ItemGroup>
59+
60+
<ItemGroup>
61+
<None Remove="Resources\Images\getstarted.png" />
62+
</ItemGroup>
63+
64+
<ItemGroup>
65+
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.0" />
66+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
67+
<PackageReference Include="FmgLib.MauiMarkup" Version="8.*" />
68+
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.21" />
69+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.21" />
70+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
71+
<PackageReference Include="UraniumUI.Material" Version="2.8.1" />
72+
</ItemGroup>
73+
74+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
4+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
5+
namespace MyFinance
6+
{
7+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8+
public class MainActivity : MauiAppCompatActivity
9+
{
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Android.App;
2+
using Android.Runtime;
3+
4+
namespace MyFinance
5+
{
6+
[Application]
7+
public class MainApplication : MauiApplication
8+
{
9+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10+
: base(handle, ownership)
11+
{
12+
}
13+
14+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#512BD4</color>
4+
<color name="colorPrimaryDark">#2B0B98</color>
5+
<color name="colorAccent">#2B0B98</color>
6+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Foundation;
2+
3+
namespace MyFinance
4+
{
5+
[Register("AppDelegate")]
6+
public class AppDelegate : MauiUIApplicationDelegate
7+
{
8+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
5+
<dict>
6+
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
7+
<key>com.apple.security.app-sandbox</key>
8+
<true/>
9+
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
10+
<key>com.apple.security.network.client</key>
11+
<true/>
12+
</dict>
13+
</plist>
14+
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<!-- The Mac App Store requires you specify if the app uses encryption. -->
6+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
7+
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
8+
<!-- Please indicate <true/> or <false/> here. -->
9+
10+
<!-- Specify the category for your app here. -->
11+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
12+
<!-- <key>LSApplicationCategoryType</key> -->
13+
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
14+
<key>UIDeviceFamily</key>
15+
<array>
16+
<integer>2</integer>
17+
</array>
18+
<key>UIRequiredDeviceCapabilities</key>
19+
<array>
20+
<string>arm64</string>
21+
</array>
22+
<key>UISupportedInterfaceOrientations</key>
23+
<array>
24+
<string>UIInterfaceOrientationPortrait</string>
25+
<string>UIInterfaceOrientationLandscapeLeft</string>
26+
<string>UIInterfaceOrientationLandscapeRight</string>
27+
</array>
28+
<key>UISupportedInterfaceOrientations~ipad</key>
29+
<array>
30+
<string>UIInterfaceOrientationPortrait</string>
31+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
32+
<string>UIInterfaceOrientationLandscapeLeft</string>
33+
<string>UIInterfaceOrientationLandscapeRight</string>
34+
</array>
35+
<key>XSAppIconAssets</key>
36+
<string>Assets.xcassets/appicon.appiconset</string>
37+
</dict>
38+
</plist>
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using ObjCRuntime;
2+
using UIKit;
3+
4+
namespace MyFinance
5+
{
6+
public class Program
7+
{
8+
// This is the main entry point of the application.
9+
static void Main(string[] args)
10+
{
11+
// if you want to use a different Application Delegate class from "AppDelegate"
12+
// you can specify it here.
13+
UIApplication.Main(args, null, typeof(AppDelegate));
14+
}
15+
}
16+
}

MyFinance/Platforms/Tizen/Main.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.Maui;
2+
using Microsoft.Maui.Hosting;
3+
using System;
4+
5+
namespace MyFinance
6+
{
7+
internal class Program : MauiApplication
8+
{
9+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10+
11+
static void Main(string[] args)
12+
{
13+
var app = new Program();
14+
app.Run(args);
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
3+
<profile name="common" />
4+
<ui-application appid="maui-application-id-placeholder" exec="MyFinance.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
5+
<label>maui-application-title-placeholder</label>
6+
<icon>maui-appicon-placeholder</icon>
7+
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
8+
</ui-application>
9+
<shortcut-list />
10+
<privileges>
11+
<privilege>http://tizen.org/privilege/internet</privilege>
12+
</privileges>
13+
<dependencies />
14+
<provides-appdefined-privileges />
15+
</manifest>

MyFinance/Platforms/Windows/App.xaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<maui:MauiWinUIApplication
2+
x:Class="MyFinance.WinUI.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:maui="using:Microsoft.Maui"
6+
xmlns:local="using:MyFinance.WinUI">
7+
8+
</maui:MauiWinUIApplication>

0 commit comments

Comments
 (0)