diff --git a/Borepin/.gitignore b/Borepin/.gitignore new file mode 100644 index 0000000..8afdcb6 --- /dev/null +++ b/Borepin/.gitignore @@ -0,0 +1,454 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/Borepin/Borepin.Android/Borepin.Android.csproj b/Borepin/Borepin.Android/Borepin.Android.csproj new file mode 100644 index 0000000..066b400 --- /dev/null +++ b/Borepin/Borepin.Android/Borepin.Android.csproj @@ -0,0 +1,28 @@ + + + Exe + net7.0-android + 21 + enable + com.CompanyName.AvaloniaTest + 1 + 1.0 + apk + False + + + + + Resources\drawable\Icon.png + + + + + + + + + + + + diff --git a/Borepin/Borepin.Android/Icon.png b/Borepin/Borepin.Android/Icon.png new file mode 100644 index 0000000..41a2a61 Binary files /dev/null and b/Borepin/Borepin.Android/Icon.png differ diff --git a/Borepin/Borepin.Android/MainActivity.cs b/Borepin/Borepin.Android/MainActivity.cs new file mode 100644 index 0000000..ba8f470 --- /dev/null +++ b/Borepin/Borepin.Android/MainActivity.cs @@ -0,0 +1,22 @@ +using Android.App; +using Android.Content.PM; + +using Avalonia; +using Avalonia.Android; + +namespace Borepin.Android; + +[Activity( + Label = "Borepin.Android", + Theme = "@style/MyTheme.NoActionBar", + Icon = "@drawable/icon", + MainLauncher = true, + ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] +public class MainActivity : AvaloniaMainActivity +{ + protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) + { + return base.CustomizeAppBuilder(builder) + .WithInterFont(); + } +} diff --git a/Borepin/Borepin.Android/Properties/AndroidManifest.xml b/Borepin/Borepin.Android/Properties/AndroidManifest.xml new file mode 100644 index 0000000..a561c56 --- /dev/null +++ b/Borepin/Borepin.Android/Properties/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Borepin/Borepin.Android/Resources/drawable/splash_screen.xml b/Borepin/Borepin.Android/Resources/drawable/splash_screen.xml new file mode 100644 index 0000000..2e920b4 --- /dev/null +++ b/Borepin/Borepin.Android/Resources/drawable/splash_screen.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/Borepin/Borepin.Android/Resources/values-night/colors.xml b/Borepin/Borepin.Android/Resources/values-night/colors.xml new file mode 100644 index 0000000..3d47b6f --- /dev/null +++ b/Borepin/Borepin.Android/Resources/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #212121 + diff --git a/Borepin/Borepin.Android/Resources/values/colors.xml b/Borepin/Borepin.Android/Resources/values/colors.xml new file mode 100644 index 0000000..59279d5 --- /dev/null +++ b/Borepin/Borepin.Android/Resources/values/colors.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + diff --git a/Borepin/Borepin.Android/Resources/values/styles.xml b/Borepin/Borepin.Android/Resources/values/styles.xml new file mode 100644 index 0000000..6e534de --- /dev/null +++ b/Borepin/Borepin.Android/Resources/values/styles.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/Borepin/Borepin.Browser/AppBundle/Logo.svg b/Borepin/Borepin.Browser/AppBundle/Logo.svg new file mode 100644 index 0000000..9685a23 --- /dev/null +++ b/Borepin/Borepin.Browser/AppBundle/Logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Borepin/Borepin.Browser/AppBundle/app.css b/Borepin/Borepin.Browser/AppBundle/app.css new file mode 100644 index 0000000..a424538 --- /dev/null +++ b/Borepin/Borepin.Browser/AppBundle/app.css @@ -0,0 +1,74 @@ +:root { + --sat: env(safe-area-inset-top); + --sar: env(safe-area-inset-right); + --sab: env(safe-area-inset-bottom); + --sal: env(safe-area-inset-left); +} + +/* HTML styles for the splash screen */ + +.highlight { + color: white; + font-size: 2.5rem; + display: block; +} + +.purple { + color: #8b44ac; +} + +.icon { + opacity: 0.05; + height: 35%; + width: 35%; + position: absolute; + background-repeat: no-repeat; + right: 0px; + bottom: 0px; + margin-right: 3%; + margin-bottom: 5%; + z-index: 5000; + background-position: right bottom; + pointer-events: none; +} + +#avalonia-splash a { + color: whitesmoke; + text-decoration: none; +} + +.center { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +#avalonia-splash { + position: relative; + height: 100%; + width: 100%; + color: whitesmoke; + background: #1b2a4e; + font-family: 'Nunito', sans-serif; + background-position: center; + background-size: cover; + background-repeat: no-repeat; + justify-content: center; + align-items: center; +} + +.splash-close { + animation: fadeout 0.25s linear forwards; +} + +@keyframes fadeout { + 0% { + opacity: 100%; + } + + 100% { + opacity: 0; + visibility: collapse; + } +} diff --git a/Borepin/Borepin.Browser/AppBundle/favicon.ico b/Borepin/Borepin.Browser/AppBundle/favicon.ico new file mode 100644 index 0000000..da8d49f Binary files /dev/null and b/Borepin/Borepin.Browser/AppBundle/favicon.ico differ diff --git a/Borepin/Borepin.Browser/AppBundle/index.html b/Borepin/Borepin.Browser/AppBundle/index.html new file mode 100644 index 0000000..e83cc38 --- /dev/null +++ b/Borepin/Borepin.Browser/AppBundle/index.html @@ -0,0 +1,30 @@ + + + + + AvaloniaTest.Browser + + + + + + + + + + +
+
+
+

+ Powered by + Avalonia UI +

+
+ Avalonia Logo +
+
+ + + + \ No newline at end of file diff --git a/Borepin/Borepin.Browser/AppBundle/main.js b/Borepin/Borepin.Browser/AppBundle/main.js new file mode 100644 index 0000000..0dbe2e4 --- /dev/null +++ b/Borepin/Borepin.Browser/AppBundle/main.js @@ -0,0 +1,13 @@ +import { dotnet } from './dotnet.js' + +const is_browser = typeof window != "undefined"; +if (!is_browser) throw new Error(`Expected to be running in a browser`); + +const dotnetRuntime = await dotnet + .withDiagnosticTracing(false) + .withApplicationArgumentsFromQuery() + .create(); + +const config = dotnetRuntime.getConfig(); + +await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]); \ No newline at end of file diff --git a/Borepin/Borepin.Browser/Borepin.Browser.csproj b/Borepin/Borepin.Browser/Borepin.Browser.csproj new file mode 100644 index 0000000..39cb343 --- /dev/null +++ b/Borepin/Borepin.Browser/Borepin.Browser.csproj @@ -0,0 +1,20 @@ + + + net7.0 + browser-wasm + AppBundle\main.js + Exe + + + + + + + + + + + + + + diff --git a/Borepin/Borepin.Browser/Program.cs b/Borepin/Borepin.Browser/Program.cs new file mode 100644 index 0000000..f8af731 --- /dev/null +++ b/Borepin/Borepin.Browser/Program.cs @@ -0,0 +1,19 @@ +using System.Runtime.Versioning; +using System.Threading.Tasks; + +using Avalonia; +using Avalonia.Browser; + +using Borepin; + +[assembly: SupportedOSPlatform("browser")] + +internal partial class Program +{ + private static async Task Main(string[] args) => await BuildAvaloniaApp() + .WithInterFont() + .StartBrowserAppAsync("out"); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure(); +} diff --git a/Borepin/Borepin.Browser/Properties/launchSettings.json b/Borepin/Borepin.Browser/Properties/launchSettings.json new file mode 100644 index 0000000..20e4bbb --- /dev/null +++ b/Borepin/Borepin.Browser/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "Borepin.Browser": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}" + } + } +} diff --git a/Borepin/Borepin.Browser/runtimeconfig.template.json b/Borepin/Borepin.Browser/runtimeconfig.template.json new file mode 100644 index 0000000..c6990ba --- /dev/null +++ b/Borepin/Borepin.Browser/runtimeconfig.template.json @@ -0,0 +1,11 @@ +{ + "wasmHostProperties": { + "perHostConfig": [ + { + "name": "browser", + "html-path": "index.html", + "Host": "browser" + } + ] + } +} \ No newline at end of file diff --git a/Borepin/Borepin.Desktop/Borepin.Desktop.csproj b/Borepin/Borepin.Desktop/Borepin.Desktop.csproj new file mode 100644 index 0000000..ba64b95 --- /dev/null +++ b/Borepin/Borepin.Desktop/Borepin.Desktop.csproj @@ -0,0 +1,19 @@ + + + WinExe + + net7.0 + enable + true + app.manifest + + + + + + + + + + diff --git a/Borepin/Borepin.Desktop/Program.cs b/Borepin/Borepin.Desktop/Program.cs new file mode 100644 index 0000000..f1005a8 --- /dev/null +++ b/Borepin/Borepin.Desktop/Program.cs @@ -0,0 +1,23 @@ +using System; + +using Avalonia; + +namespace Borepin.Desktop; + +class Program +{ + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .WithInterFont() + .LogToTrace(); + +} diff --git a/Borepin/Borepin.Desktop/app.manifest b/Borepin/Borepin.Desktop/app.manifest new file mode 100644 index 0000000..e0ce8d0 --- /dev/null +++ b/Borepin/Borepin.Desktop/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/Borepin/Borepin.iOS/AppDelegate.cs b/Borepin/Borepin.iOS/AppDelegate.cs new file mode 100644 index 0000000..8f36678 --- /dev/null +++ b/Borepin/Borepin.iOS/AppDelegate.cs @@ -0,0 +1,19 @@ +using Avalonia; +using Avalonia.iOS; + +using Foundation; + +namespace Borepin.iOS; + +// The UIApplicationDelegate for the application. This class is responsible for launching the +// User Interface of the application, as well as listening (and optionally responding) to +// application events from iOS. +[Register("AppDelegate")] +public partial class AppDelegate : AvaloniaAppDelegate +{ + protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) + { + return base.CustomizeAppBuilder(builder) + .WithInterFont(); + } +} diff --git a/Borepin/Borepin.iOS/Borepin.iOS.csproj b/Borepin/Borepin.iOS/Borepin.iOS.csproj new file mode 100644 index 0000000..abd52fd --- /dev/null +++ b/Borepin/Borepin.iOS/Borepin.iOS.csproj @@ -0,0 +1,22 @@ + + + Exe + net7.0-ios + 10.0 + manual + enable + iossimulator-x64 + + + + + + + + + + + + + + diff --git a/Borepin/Borepin.iOS/Entitlements.plist b/Borepin/Borepin.iOS/Entitlements.plist new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/Borepin/Borepin.iOS/Entitlements.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Borepin/Borepin.iOS/Info.plist b/Borepin/Borepin.iOS/Info.plist new file mode 100644 index 0000000..ee5f7cb --- /dev/null +++ b/Borepin/Borepin.iOS/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDisplayName + AvaloniaTest + CFBundleIdentifier + companyName.AvaloniaTest + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 10.0 + UIDeviceFamily + + 1 + 2 + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Borepin/Borepin.iOS/Main.cs b/Borepin/Borepin.iOS/Main.cs new file mode 100644 index 0000000..cd3bef8 --- /dev/null +++ b/Borepin/Borepin.iOS/Main.cs @@ -0,0 +1,14 @@ +using UIKit; + +namespace Borepin.iOS; + +public class Application +{ + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } +} diff --git a/Borepin/Borepin.iOS/Resources/LaunchScreen.xib b/Borepin/Borepin.iOS/Resources/LaunchScreen.xib new file mode 100644 index 0000000..d65d364 --- /dev/null +++ b/Borepin/Borepin.iOS/Resources/LaunchScreen.xib @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Borepin/Borepin.sln b/Borepin/Borepin.sln new file mode 100644 index 0000000..1e4b885 --- /dev/null +++ b/Borepin/Borepin.sln @@ -0,0 +1,53 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34607.119 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Borepin", "Borepin\Borepin.csproj", "{47829483-056A-4A5D-A3D8-C6B507103E66}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Borepin.Android", "Borepin.Android\Borepin.Android.csproj", "{8AA57851-5DEE-4D96-9D6E-285B232AB772}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Borepin.Desktop", "Borepin.Desktop\Borepin.Desktop.csproj", "{A2E3C6E6-FA55-491E-8888-B5D3E84C5BE7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Borepin.iOS", "Borepin.iOS\Borepin.iOS.csproj", "{D8139E0C-DEE9-4120-A708-D349DE0E19BF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Borepin.Browser", "Borepin.Browser\Borepin.Browser.csproj", "{2C7E3F57-7C58-4769-B36A-F347FF3194E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47829483-056A-4A5D-A3D8-C6B507103E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47829483-056A-4A5D-A3D8-C6B507103E66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47829483-056A-4A5D-A3D8-C6B507103E66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47829483-056A-4A5D-A3D8-C6B507103E66}.Release|Any CPU.Build.0 = Release|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Release|Any CPU.Build.0 = Release|Any CPU + {8AA57851-5DEE-4D96-9D6E-285B232AB772}.Release|Any CPU.Deploy.0 = Release|Any CPU + {A2E3C6E6-FA55-491E-8888-B5D3E84C5BE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2E3C6E6-FA55-491E-8888-B5D3E84C5BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2E3C6E6-FA55-491E-8888-B5D3E84C5BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2E3C6E6-FA55-491E-8888-B5D3E84C5BE7}.Release|Any CPU.Build.0 = Release|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Release|Any CPU.Build.0 = Release|Any CPU + {D8139E0C-DEE9-4120-A708-D349DE0E19BF}.Release|Any CPU.Deploy.0 = Release|Any CPU + {2C7E3F57-7C58-4769-B36A-F347FF3194E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C7E3F57-7C58-4769-B36A-F347FF3194E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C7E3F57-7C58-4769-B36A-F347FF3194E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C7E3F57-7C58-4769-B36A-F347FF3194E9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92B0F3A1-0811-47E2-B70E-CB056E394DCE} + EndGlobalSection +EndGlobal diff --git a/Borepin/Borepin/App.axaml b/Borepin/Borepin/App.axaml new file mode 100644 index 0000000..1239cb7 --- /dev/null +++ b/Borepin/Borepin/App.axaml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Borepin/Borepin/App.axaml.cs b/Borepin/Borepin/App.axaml.cs new file mode 100644 index 0000000..3ea58b4 --- /dev/null +++ b/Borepin/Borepin/App.axaml.cs @@ -0,0 +1,41 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Data.Core.Plugins; +using Avalonia.Markup.Xaml; + +using Borepin.ViewModels; +using Borepin.Views; + +namespace Borepin; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + // Line below is needed to remove Avalonia data validation. + // Without this line you will get duplicate validations from both Avalonia and CT + BindingPlugins.DataValidators.RemoveAt(0); + + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow + { + DataContext = new MainViewModel() + }; + } + else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) + { + singleViewPlatform.MainView = new MainView + { + DataContext = new MainViewModel() + }; + } + + base.OnFrameworkInitializationCompleted(); + } +} diff --git a/Borepin/Borepin/Assets/avalonia-logo.ico b/Borepin/Borepin/Assets/avalonia-logo.ico new file mode 100644 index 0000000..da8d49f Binary files /dev/null and b/Borepin/Borepin/Assets/avalonia-logo.ico differ diff --git a/Borepin/Borepin/Borepin.csproj b/Borepin/Borepin/Borepin.csproj new file mode 100644 index 0000000..62deaec --- /dev/null +++ b/Borepin/Borepin/Borepin.csproj @@ -0,0 +1,23 @@ + + + net7.0 + enable + latest + true + + + + + + + + + + + + + + + + + diff --git a/Borepin/Borepin/ViewModels/MainViewModel.cs b/Borepin/Borepin/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..4f63011 --- /dev/null +++ b/Borepin/Borepin/ViewModels/MainViewModel.cs @@ -0,0 +1,6 @@ +namespace Borepin.ViewModels; + +public partial class MainViewModel : ViewModelBase +{ + public string Greeting => "Welcome to Avalonia!"; +} diff --git a/Borepin/Borepin/ViewModels/ViewModelBase.cs b/Borepin/Borepin/ViewModels/ViewModelBase.cs new file mode 100644 index 0000000..2f2bfd7 --- /dev/null +++ b/Borepin/Borepin/ViewModels/ViewModelBase.cs @@ -0,0 +1,7 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace Borepin.ViewModels; + +public class ViewModelBase : ObservableObject +{ +} diff --git a/Borepin/Borepin/Views/MainView.axaml b/Borepin/Borepin/Views/MainView.axaml new file mode 100644 index 0000000..b5a1786 --- /dev/null +++ b/Borepin/Borepin/Views/MainView.axaml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/Borepin/Borepin/Views/MainView.axaml.cs b/Borepin/Borepin/Views/MainView.axaml.cs new file mode 100644 index 0000000..4ab7df5 --- /dev/null +++ b/Borepin/Borepin/Views/MainView.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Borepin.Views; + +public partial class MainView : UserControl +{ + public MainView() + { + InitializeComponent(); + } +} diff --git a/Borepin/Borepin/Views/MainWindow.axaml b/Borepin/Borepin/Views/MainWindow.axaml new file mode 100644 index 0000000..8df75e3 --- /dev/null +++ b/Borepin/Borepin/Views/MainWindow.axaml @@ -0,0 +1,12 @@ + + + diff --git a/Borepin/Borepin/Views/MainWindow.axaml.cs b/Borepin/Borepin/Views/MainWindow.axaml.cs new file mode 100644 index 0000000..2d30d00 --- /dev/null +++ b/Borepin/Borepin/Views/MainWindow.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Borepin.Views; + +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} diff --git a/Borepin/Directory.Build.props b/Borepin/Directory.Build.props new file mode 100644 index 0000000..5d8722e --- /dev/null +++ b/Borepin/Directory.Build.props @@ -0,0 +1,6 @@ + + + enable + 11.0.2 + +