Initial commit
This commit is contained in:
+596
@@ -0,0 +1,596 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/csharp,visualstudio,visualstudiocode
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=csharp,visualstudio,visualstudiocode
|
||||||
|
|
||||||
|
### Csharp ###
|
||||||
|
## 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/main/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/
|
||||||
|
|
||||||
|
# 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
|
||||||
|
*.tlog
|
||||||
|
*.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 6 auto-generated project file (contains which files were open etc.)
|
||||||
|
*.vbp
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||||
|
*.dsw
|
||||||
|
*.dsp
|
||||||
|
|
||||||
|
# Visual Studio 6 technical files
|
||||||
|
|
||||||
|
# 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/
|
||||||
|
|
||||||
|
# Visual Studio History (VSHistory) files
|
||||||
|
.vshistory/
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# VS Code files for those working on multiple tools
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Windows Installer files from build outputs
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
*.sln.iml
|
||||||
|
|
||||||
|
### VisualStudioCode ###
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
### VisualStudioCode Patch ###
|
||||||
|
# Ignore all local history of files
|
||||||
|
.history
|
||||||
|
.ionide
|
||||||
|
|
||||||
|
### VisualStudio ###
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
|
||||||
|
# Others
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||||
|
|
||||||
|
# Visual Studio 6 technical files
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
|
||||||
|
# Visual Studio History (VSHistory) files
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
|
||||||
|
# VS Code files for those working on multiple tools
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
|
||||||
|
# Windows Installer files from build outputs
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
|
||||||
|
### VisualStudio Patch ###
|
||||||
|
# Additional files built by Visual Studio
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/csharp,visualstudio,visualstudiocode
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="ReceiptPDFBuilder.App"
|
||||||
|
xmlns:viewModels="clr-namespace:ReceiptPDFBuilder.ViewModels"
|
||||||
|
xmlns:views="clr-namespace:ReceiptPDFBuilder.Views"
|
||||||
|
RequestedThemeVariant="Default">
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme />
|
||||||
|
</Application.Styles>
|
||||||
|
<Application.DataTemplates>
|
||||||
|
<DataTemplate DataType="{x:Type viewModels:MainViewModel}">
|
||||||
|
<views:MainView/>
|
||||||
|
</DataTemplate>
|
||||||
|
</Application.DataTemplates>
|
||||||
|
<Application.Resources>
|
||||||
|
<FontFamily x:Key="NotoSans">avares://ReceiptPDFBuilder/Assets/Fonts/Noto_Sans/static#Noto Sans</FontFamily>
|
||||||
|
<FontFamily x:Key="NotoSansJP">avares://ReceiptPDFBuilder/Assets/Fonts/Noto_Sans_JP/static#Noto Sans JP</FontFamily>
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using ReceiptPDFBuilder;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = new MainWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
https://openfontlicense.org
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
Noto Sans Variable Font
|
||||||
|
=======================
|
||||||
|
|
||||||
|
This download contains Noto Sans as both variable fonts and static fonts.
|
||||||
|
|
||||||
|
Noto Sans is a variable font with these axes:
|
||||||
|
wdth
|
||||||
|
wght
|
||||||
|
|
||||||
|
This means all the styles are contained in these files:
|
||||||
|
Noto_Sans/NotoSans-VariableFont_wdth,wght.ttf
|
||||||
|
Noto_Sans/NotoSans-Italic-VariableFont_wdth,wght.ttf
|
||||||
|
|
||||||
|
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||||
|
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||||
|
in those cases you can use the static font files for Noto Sans:
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Thin.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-ExtraLight.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Light.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Regular.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Medium.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-SemiBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Bold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-ExtraBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Black.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Thin.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-ExtraLight.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Light.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Regular.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Medium.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-SemiBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Bold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-ExtraBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Black.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Thin.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-ExtraLight.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Light.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Regular.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Medium.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-SemiBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Bold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-ExtraBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Black.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Thin.ttf
|
||||||
|
Noto_Sans/static/NotoSans-ExtraLight.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Light.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Regular.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Medium.ttf
|
||||||
|
Noto_Sans/static/NotoSans-SemiBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Bold.ttf
|
||||||
|
Noto_Sans/static/NotoSans-ExtraBold.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Black.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-ThinItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-ExtraLightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-LightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-Italic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-MediumItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-SemiBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-BoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-ExtraBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_ExtraCondensed-BlackItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-ThinItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-ExtraLightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-LightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-Italic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-MediumItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-SemiBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-BoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-ExtraBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_Condensed-BlackItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-ThinItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-ExtraLightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-LightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-Italic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-MediumItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-SemiBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-BoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-ExtraBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans_SemiCondensed-BlackItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-ThinItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-ExtraLightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-LightItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-Italic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-MediumItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-SemiBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-BoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-ExtraBoldItalic.ttf
|
||||||
|
Noto_Sans/static/NotoSans-BlackItalic.ttf
|
||||||
|
|
||||||
|
Get started
|
||||||
|
-----------
|
||||||
|
|
||||||
|
1. Install the font files you want to use
|
||||||
|
|
||||||
|
2. Use your app's font picker to view the font family and all the
|
||||||
|
available styles
|
||||||
|
|
||||||
|
Learn more about variable fonts
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||||
|
https://variablefonts.typenetwork.com
|
||||||
|
https://medium.com/variable-fonts
|
||||||
|
|
||||||
|
In desktop apps
|
||||||
|
|
||||||
|
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||||
|
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||||
|
|
||||||
|
Online
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/getting_started
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||||
|
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||||
|
|
||||||
|
Installing fonts
|
||||||
|
|
||||||
|
MacOS: https://support.apple.com/en-us/HT201749
|
||||||
|
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||||
|
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||||
|
|
||||||
|
Android Apps
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/android
|
||||||
|
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
Please read the full license text (OFL.txt) to understand the permissions,
|
||||||
|
restrictions and requirements for usage, redistribution, and modification.
|
||||||
|
|
||||||
|
You can use them in your products & projects – print or digital,
|
||||||
|
commercial or otherwise.
|
||||||
|
|
||||||
|
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||||
|
license for all details.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
https://openfontlicense.org
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
Noto Sans JP Variable Font
|
||||||
|
==========================
|
||||||
|
|
||||||
|
This download contains Noto Sans JP as both a variable font and static fonts.
|
||||||
|
|
||||||
|
Noto Sans JP is a variable font with this axis:
|
||||||
|
wght
|
||||||
|
|
||||||
|
This means all the styles are contained in a single file:
|
||||||
|
Noto_Sans_JP/NotoSansJP-VariableFont_wght.ttf
|
||||||
|
|
||||||
|
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||||
|
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||||
|
in those cases you can use the static font files for Noto Sans JP:
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Thin.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-ExtraLight.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Light.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Regular.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Medium.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Bold.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-ExtraBold.ttf
|
||||||
|
Noto_Sans_JP/static/NotoSansJP-Black.ttf
|
||||||
|
|
||||||
|
Get started
|
||||||
|
-----------
|
||||||
|
|
||||||
|
1. Install the font files you want to use
|
||||||
|
|
||||||
|
2. Use your app's font picker to view the font family and all the
|
||||||
|
available styles
|
||||||
|
|
||||||
|
Learn more about variable fonts
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||||
|
https://variablefonts.typenetwork.com
|
||||||
|
https://medium.com/variable-fonts
|
||||||
|
|
||||||
|
In desktop apps
|
||||||
|
|
||||||
|
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||||
|
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||||
|
|
||||||
|
Online
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/getting_started
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||||
|
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||||
|
|
||||||
|
Installing fonts
|
||||||
|
|
||||||
|
MacOS: https://support.apple.com/en-us/HT201749
|
||||||
|
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||||
|
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||||
|
|
||||||
|
Android Apps
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/android
|
||||||
|
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
Please read the full license text (OFL.txt) to understand the permissions,
|
||||||
|
restrictions and requirements for usage, redistribution, and modification.
|
||||||
|
|
||||||
|
You can use them in your products & projects – print or digital,
|
||||||
|
commercial or otherwise.
|
||||||
|
|
||||||
|
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||||
|
license for all details.
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.Helpers
|
||||||
|
{
|
||||||
|
|
||||||
|
// https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.inotifypropertychanged?view=netframework-4.7.2
|
||||||
|
class ChangeNotifier : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilders.Helpers;
|
||||||
|
|
||||||
|
public static class ThreadSafeRandom
|
||||||
|
{
|
||||||
|
[ThreadStatic] private static Random? Local;
|
||||||
|
|
||||||
|
public static Random ThisThreadsRandom
|
||||||
|
{
|
||||||
|
get { return Local ?? (Local = new Random(unchecked(Environment.TickCount * 31 + Thread.CurrentThread.ManagedThreadId))); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://stackoverflow.com/a/1262619/3938401
|
||||||
|
static class ListExtensions
|
||||||
|
{
|
||||||
|
public static void Shuffle<T>(this IList<T> list)
|
||||||
|
{
|
||||||
|
int n = list.Count;
|
||||||
|
while (n > 1)
|
||||||
|
{
|
||||||
|
n--;
|
||||||
|
int k = ThreadSafeRandom.ThisThreadsRandom.Next(n + 1);
|
||||||
|
T value = list[k];
|
||||||
|
list[k] = list[n];
|
||||||
|
list[n] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using ReceiptPDFBuilder.ViewModels;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.Interfaces
|
||||||
|
{
|
||||||
|
interface IChangeViewModel
|
||||||
|
{
|
||||||
|
void PushViewModel(BaseViewModel model);
|
||||||
|
void PopViewModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.Interfaces
|
||||||
|
{
|
||||||
|
interface ITopLevelGrabber
|
||||||
|
{
|
||||||
|
TopLevel GetTopLevel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Deadpikle
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="ReceiptPDFBuilder.MainWindow"
|
||||||
|
Title="ReceiptPDFBuilder"
|
||||||
|
xmlns:vm="clr-namespace:ReceiptPDFBuilder.ViewModels"
|
||||||
|
x:DataType="vm:MainWindowViewModel">
|
||||||
|
<ContentControl Content="{Binding CurrentViewModel}"/>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ReceiptPDFBuilder.Interfaces;
|
||||||
|
using ReceiptPDFBuilder.ViewModels;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder;
|
||||||
|
|
||||||
|
public partial class MainWindow : Window, ITopLevelGrabber
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
DataContext = new MainWindowViewModel(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TopLevel GetTopLevel()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder;
|
||||||
|
|
||||||
|
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<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
.WithInterFont()
|
||||||
|
.LogToTrace();
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Assets\Fonts\Noto_Sans\*.*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Fonts\Noto_Sans\static\*.*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Fonts\Noto_Sans_JP\*.*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Fonts\Noto_Sans_JP\static\*.*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia" Version="11.3.10" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="11.3.10" />
|
||||||
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.10" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.10" />
|
||||||
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
|
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.10">
|
||||||
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||||
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="PDFsharp-MigraDoc" Version="6.2.3" />
|
||||||
|
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.10.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ReceiptPDFBuilder.Helpers;
|
||||||
|
using ReceiptPDFBuilder.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.ViewModels
|
||||||
|
{
|
||||||
|
class BaseViewModel : ChangeNotifier
|
||||||
|
{
|
||||||
|
IChangeViewModel _viewModelChanger;
|
||||||
|
ITopLevelGrabber? _topLevelGrabber;
|
||||||
|
|
||||||
|
public BaseViewModel(IChangeViewModel viewModelChanger)
|
||||||
|
{
|
||||||
|
_viewModelChanger = viewModelChanger;
|
||||||
|
_topLevelGrabber = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ITopLevelGrabber? TopLevelGrabber
|
||||||
|
{
|
||||||
|
get => _topLevelGrabber;
|
||||||
|
set { _topLevelGrabber = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public IChangeViewModel ViewModelChanger
|
||||||
|
{
|
||||||
|
get { return _viewModelChanger; }
|
||||||
|
set { _viewModelChanger = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IChangeViewModel
|
||||||
|
|
||||||
|
public void PopViewModel()
|
||||||
|
{
|
||||||
|
_viewModelChanger?.PopViewModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PushViewModel(BaseViewModel model)
|
||||||
|
{
|
||||||
|
_viewModelChanger?.PushViewModel(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using Avalonia.Platform.Storage;
|
||||||
|
using HarfBuzzSharp;
|
||||||
|
using ImageMagick;
|
||||||
|
using MigraDoc.DocumentObjectModel;
|
||||||
|
using MigraDoc.Rendering;
|
||||||
|
using PdfSharp.Drawing;
|
||||||
|
using PdfSharp.Fonts;
|
||||||
|
using PdfSharp.Pdf;
|
||||||
|
using PdfSharp.Pdf.IO;
|
||||||
|
using PdfSharp.Snippets.Font;
|
||||||
|
using ReceiptPDFBuilder.Interfaces;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.ViewModels;
|
||||||
|
|
||||||
|
class MainViewModel : BaseViewModel, IFontResolver
|
||||||
|
{
|
||||||
|
|
||||||
|
public MainViewModel(IChangeViewModel viewModelChanger) : base(viewModelChanger)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void ChooseFolder()
|
||||||
|
{
|
||||||
|
var topLevel = TopLevelGrabber?.GetTopLevel();
|
||||||
|
if (topLevel is not null)
|
||||||
|
{
|
||||||
|
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions()
|
||||||
|
{
|
||||||
|
Title = "Pick a folder of files...",
|
||||||
|
AllowMultiple = false,
|
||||||
|
});
|
||||||
|
if (folders.Count == 1)
|
||||||
|
{
|
||||||
|
var folder = folders[0];
|
||||||
|
Console.WriteLine("Chosen folder: " + folder.Path.LocalPath);
|
||||||
|
if (Directory.Exists(folder.Path.LocalPath))
|
||||||
|
{
|
||||||
|
CreatePDF(folder.Path.LocalPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[]? GetFont(string faceName)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Getting font {0}", faceName);
|
||||||
|
if (faceName == "Noto Sans JP")
|
||||||
|
{
|
||||||
|
return File.ReadAllBytes("Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-Regular.ttf");
|
||||||
|
}
|
||||||
|
if (faceName == "Noto Sans JP Bold")
|
||||||
|
{
|
||||||
|
return File.ReadAllBytes("Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FontResolverInfo? ResolveTypeface(string familyName, bool bold, bool italic)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Resolving familyname {0}", familyName);
|
||||||
|
if (familyName == "Noto Sans JP")
|
||||||
|
{
|
||||||
|
if (bold)
|
||||||
|
{
|
||||||
|
return new FontResolverInfo(familyName + " Bold");
|
||||||
|
}
|
||||||
|
return new FontResolverInfo(familyName);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://forum.pdfsharp.net/viewtopic.php?f=2&t=1025
|
||||||
|
private void CreatePDF(string folderName)
|
||||||
|
{
|
||||||
|
var pdfDoc = new Document();
|
||||||
|
var outputFileName = "MyReceipts.pdf";
|
||||||
|
var section = pdfDoc.AddSection();
|
||||||
|
section.PageSetup.PageFormat = PageFormat.Letter;
|
||||||
|
section.PageSetup.PageWidth = "8.5in";
|
||||||
|
section.PageSetup.PageHeight = "11in";
|
||||||
|
section.PageSetup.TopMargin = "0.5in";
|
||||||
|
section.PageSetup.RightMargin = "0.5in";
|
||||||
|
section.PageSetup.BottomMargin = "0.5in";
|
||||||
|
section.PageSetup.LeftMargin = "0.5in";
|
||||||
|
// setup footer for page number
|
||||||
|
var footerPar = new Paragraph();
|
||||||
|
footerPar.Format.Alignment = ParagraphAlignment.Center;
|
||||||
|
footerPar.AddText("--Page ");
|
||||||
|
footerPar.AddPageField();
|
||||||
|
footerPar.AddText(" of ");
|
||||||
|
footerPar.AddNumPagesField();
|
||||||
|
footerPar.AddText("--");
|
||||||
|
section.Footers.Primary.Add(footerPar);
|
||||||
|
//
|
||||||
|
var files = Directory.GetFiles(folderName);
|
||||||
|
files.Sort();
|
||||||
|
GlobalFontSettings.FontResolver = this;
|
||||||
|
GlobalFontSettings.FallbackFontResolver = new FailsafeFontResolver();
|
||||||
|
for (var i = 0; i < files.Length; i++)
|
||||||
|
{
|
||||||
|
var file = files[i];
|
||||||
|
var fileName = Path.GetFileName(file);
|
||||||
|
if (fileName == ".DS_Store" || fileName == outputFileName)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// TODO: calculate needed width for images based on page width and margins and all that?
|
||||||
|
var imageTitlePar = section.AddParagraph();
|
||||||
|
imageTitlePar.Format.Alignment = ParagraphAlignment.Center;
|
||||||
|
imageTitlePar.Format.Font.Size = 12;
|
||||||
|
imageTitlePar.Format.Font.Bold = true;
|
||||||
|
imageTitlePar.Format.Font.Name = "Noto Sans JP"; // has english letters in it, too
|
||||||
|
imageTitlePar.AddText(fileName);
|
||||||
|
section.AddParagraph(); // add empty line for spacing
|
||||||
|
// now add the image
|
||||||
|
var isPDF = fileName.EndsWith(".pdf");
|
||||||
|
var isHEIC = fileName.EndsWith(".HEIC") || fileName.EndsWith(".heic");
|
||||||
|
if (isHEIC)
|
||||||
|
{
|
||||||
|
var convertedDir = Path.Combine(folderName, "converted");
|
||||||
|
if (!Directory.Exists(convertedDir))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(convertedDir);
|
||||||
|
}
|
||||||
|
var info = new FileInfo(file);
|
||||||
|
using var mImage = new MagickImage(info.FullName);
|
||||||
|
// Save frame as jpg
|
||||||
|
var outputPath = Path.Combine(convertedDir, info.Name + ".jpg");
|
||||||
|
mImage.Quality = 80;
|
||||||
|
mImage.Write(outputPath);
|
||||||
|
fileName = Path.Combine("Converted", info.Name + ".jpg");
|
||||||
|
Console.WriteLine("HEIC image fileName is now {0}", fileName);
|
||||||
|
}
|
||||||
|
var paragraph = section.AddParagraph();
|
||||||
|
paragraph.Format.Alignment = ParagraphAlignment.Center;
|
||||||
|
var image = paragraph.AddImage(fileName);
|
||||||
|
image.LockAspectRatio = true;
|
||||||
|
image.Width = 400; // can't be too wide now...not sure why...maybe due to margins...
|
||||||
|
Console.WriteLine("Added image: {0}", fileName);
|
||||||
|
if (isPDF)
|
||||||
|
{
|
||||||
|
// add other PDF pages
|
||||||
|
// see: https://stackoverflow.com/a/65091204/3938401
|
||||||
|
var pdfFileToAdd = PdfReader.Open(file);
|
||||||
|
imageTitlePar.AddText(string.Format(" (PDF with {0} page{1}) ",
|
||||||
|
pdfFileToAdd.PageCount,
|
||||||
|
pdfFileToAdd.PageCount == 1 ? "" : "s"));
|
||||||
|
for (var j = 2; j <= pdfFileToAdd.PageCount; j++)
|
||||||
|
{
|
||||||
|
section.AddPageBreak();
|
||||||
|
paragraph = section.AddParagraph();
|
||||||
|
paragraph.Format.Alignment = ParagraphAlignment.Center;
|
||||||
|
image = paragraph.AddImage(file + "#" + j);
|
||||||
|
image.LockAspectRatio = true;
|
||||||
|
image.Width = 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i < files.Length - 1)
|
||||||
|
{
|
||||||
|
section.AddPageBreak();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var pdfRenderer = new PdfDocumentRenderer();
|
||||||
|
pdfRenderer.Document = pdfDoc;
|
||||||
|
pdfRenderer.WorkingDirectory = folderName;
|
||||||
|
pdfRenderer.RenderDocument();
|
||||||
|
string filename = Path.Join(folderName, outputFileName);
|
||||||
|
pdfRenderer.PdfDocument.Save(filename);
|
||||||
|
Console.WriteLine(filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using ReceiptPDFBuilder.Helpers;
|
||||||
|
using ReceiptPDFBuilder.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.ViewModels
|
||||||
|
{
|
||||||
|
class MainWindowViewModel : ChangeNotifier, IChangeViewModel
|
||||||
|
{
|
||||||
|
BaseViewModel _currentViewModel;
|
||||||
|
Stack<BaseViewModel> _viewModels;
|
||||||
|
|
||||||
|
public MainWindowViewModel(ITopLevelGrabber topLevelGrabber)
|
||||||
|
{
|
||||||
|
_viewModels = new Stack<BaseViewModel>();
|
||||||
|
var initialViewModel = new MainViewModel(this)
|
||||||
|
{
|
||||||
|
TopLevelGrabber = topLevelGrabber
|
||||||
|
};
|
||||||
|
_viewModels.Push(initialViewModel);
|
||||||
|
_currentViewModel = initialViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaseViewModel CurrentViewModel
|
||||||
|
{
|
||||||
|
get { return _currentViewModel; }
|
||||||
|
set { _currentViewModel = value; NotifyPropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IChangeViewModel
|
||||||
|
|
||||||
|
public void PushViewModel(BaseViewModel model)
|
||||||
|
{
|
||||||
|
_viewModels.Push(model);
|
||||||
|
CurrentViewModel = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PopViewModel()
|
||||||
|
{
|
||||||
|
if (_viewModels.Count > 1)
|
||||||
|
{
|
||||||
|
_viewModels.Pop();
|
||||||
|
CurrentViewModel = _viewModels.Peek();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="ReceiptPDFBuilder.Views.MainView"
|
||||||
|
xmlns:vm="clr-namespace:ReceiptPDFBuilder.ViewModels"
|
||||||
|
x:DataType="vm:MainViewModel">
|
||||||
|
<StackPanel Orientation="Vertical"
|
||||||
|
Spacing="2">
|
||||||
|
<Label Content="ありがとうございます日本"
|
||||||
|
FontFamily="{StaticResource NotoSansJP}"/>
|
||||||
|
<Button Content="Choose Folder"
|
||||||
|
Command="{Binding ChooseFolder}" />
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace ReceiptPDFBuilder.Views
|
||||||
|
{
|
||||||
|
public partial class MainView : UserControl
|
||||||
|
{
|
||||||
|
public MainView()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<!-- This manifest is used on Windows only.
|
||||||
|
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||||
|
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="ReceiptPDFBuilder.Desktop"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- A list of the Windows versions that this application has been tested on
|
||||||
|
and is designed to work with. Uncomment the appropriate elements
|
||||||
|
and Windows will automatically select the most compatible environment. -->
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
||||||
Reference in New Issue
Block a user