help make this workshop better by sending in PRs with improvements!
merci beaucoup â¤ï¸
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"imageSize": 100,
|
||||
"commit": false,
|
||||
"contributors": [
|
||||
{
|
||||
"login": "ghuntley",
|
||||
"name": "Geoffrey Huntley",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/127353?v=4",
|
||||
"profile": "https://www.ghuntley.com/now",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"talk",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "anaisbetts",
|
||||
"name": "Anaïs Betts",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1396?v=4",
|
||||
"profile": "https://github.com/anaisbetts",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "carldebilly",
|
||||
"name": "Carl de Billy",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/4174207?v=4",
|
||||
"profile": "http://carl.debilly.net/",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"talk",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Guidemarcus",
|
||||
"name": "Marc-Antoine Therrien",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/17101674?v=4",
|
||||
"profile": "https://github.com/Guidemarcus",
|
||||
"contributions": [
|
||||
"code",
|
||||
"design"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "microsoft",
|
||||
"name": "Microsoft",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/6154722?v=4",
|
||||
"profile": "https://opensource.microsoft.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "agneszitte-nventive",
|
||||
"name": "Agnes ZITTE",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/16295702?v=4",
|
||||
"profile": "https://github.com/agneszitte-nventive",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "michael-hawker",
|
||||
"name": "Michael Hawker MSFT (XAML Llama)",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/24302614?v=4",
|
||||
"profile": "https://www.twitter.com/XAMLLlama",
|
||||
"contributions": [
|
||||
"review",
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "nickrandolph",
|
||||
"name": "Nick Randolph",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1614057?v=4",
|
||||
"profile": "http://nicksnettravels.builttoroam.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 6,
|
||||
"projectName": "workshops",
|
||||
"projectOwner": "unoplatform",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Report a bug
|
||||
labels: bug, untriaged
|
||||
---
|
||||
|
||||
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! -->
|
||||
|
||||
## Current behavior
|
||||
|
||||
<!-- Describe how the issue manifests. -->
|
||||
|
||||
## Expected behavior
|
||||
|
||||
<!-- Describe what the desired behavior would be. -->
|
||||
|
||||
## How to reproduce it (as minimally and precisely as possible)
|
||||
|
||||
<!-- Please provide a **MINIMAL REPRO PROJECT** and the **STEPS TO REPRODUCE**-->
|
||||
|
||||
## Anything else we need to know?
|
||||
|
||||
<!-- We would love to know of any friction, apart from knowledge, that prevented you from sending in a pull-request -->
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
name: Enhancement Request
|
||||
about: Suggest an enhancement
|
||||
labels: enhancement, untriaged
|
||||
---
|
||||
|
||||
<!-- Please only use this template for submitting enhancement requests -->
|
||||
|
||||
## What would you like to be added:
|
||||
|
||||
## Why is this needed:
|
||||
|
||||
## Anything else we need to know?
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Feedback
|
||||
about: Share feedback 💖
|
||||
labels: feedback, untriaged
|
||||
---
|
||||
|
||||
<!-- Thanks for stopping on by to share feedback 💖
|
||||
|
||||
If you are after inspiration, folks typically submit feedback on the following topics:
|
||||
|
||||
- what do you like?
|
||||
- what is lacking?
|
||||
- what do you long for going forward?
|
||||
- what could be better?
|
||||
- insights about module pacing, flow or continuity
|
||||
|
||||
-->
|
||||
|
|
@ -0,0 +1,334 @@
|
|||
## 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
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# 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
|
||||
|
||||
# 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/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.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
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# 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/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# 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/
|
||||
|
||||
# Cake
|
||||
!tools/packages.config
|
||||
tools/*
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"line-length": false,
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
"a"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"bierner.github-markdown-preview",
|
||||
"cake-build.cake-vscode",
|
||||
"editorconfig.editorconfig",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"jebbs.plantuml",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
]
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"files.autoSave": "afterDelay",
|
||||
"plantuml.exportFormat": "png",
|
||||
"plantuml.exportOutDir": "./",
|
||||
"plantuml.exportConcurrency": 16,
|
||||
"cSpell.words": [
|
||||
"customise"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,40 @@
|
|||
# Workshops for the Uno Platform [![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)
|
||||
|
||||
## Workshops
|
||||
|
||||
- [Uno Bootcamp](uno-bootcamp): In this single day intensive workshop, you'll be introduced to the development philosophy of Uno and build a new application from scratch that uses the philosophy. You’ll also learn from productivity tips and how Uno works under the hood.
|
||||
|
||||
## Contributors ✨
|
||||
|
||||
Thanks goes to these wonderful people (and companies!) — [emoji key](https://allcontributors.org/docs/en/emoji-key):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://www.ghuntley.com/now"><img src="https://avatars0.githubusercontent.com/u/127353?v=4" width="100px;" alt="Geoffrey Huntley"/><br /><sub><b>Geoffrey Huntley</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=ghuntley" title="Code">💻</a> <a href="https://github.com/unoplatform/workshops/commits?author=ghuntley" title="Documentation">📖</a> <a href="#talk-ghuntley" title="Talks">📢</a> <a href="https://github.com/unoplatform/workshops/commits?author=ghuntley" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://github.com/anaisbetts"><img src="https://avatars2.githubusercontent.com/u/1396?v=4" width="100px;" alt="Anaïs Betts"/><br /><sub><b>Anaïs Betts</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=anaisbetts" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://carl.debilly.net/"><img src="https://avatars1.githubusercontent.com/u/4174207?v=4" width="100px;" alt="Carl de Billy"/><br /><sub><b>Carl de Billy</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=carldebilly" title="Code">💻</a> <a href="https://github.com/unoplatform/workshops/commits?author=carldebilly" title="Documentation">📖</a> <a href="#talk-carldebilly" title="Talks">📢</a> <a href="https://github.com/unoplatform/workshops/commits?author=carldebilly" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://github.com/Guidemarcus"><img src="https://avatars2.githubusercontent.com/u/17101674?v=4" width="100px;" alt="Marc-Antoine Therrien"/><br /><sub><b>Marc-Antoine Therrien</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=Guidemarcus" title="Code">💻</a> <a href="#design-Guidemarcus" title="Design">🎨</a></td>
|
||||
<td align="center"><a href="https://opensource.microsoft.com"><img src="https://avatars2.githubusercontent.com/u/6154722?v=4" width="100px;" alt="Microsoft"/><br /><sub><b>Microsoft</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=microsoft" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/agneszitte-nventive"><img src="https://avatars0.githubusercontent.com/u/16295702?v=4" width="100px;" alt="Agnes ZITTE"/><br /><sub><b>Agnes ZITTE</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=agneszitte-nventive" title="Documentation">📖</a> <a href="https://github.com/unoplatform/workshops/commits?author=agneszitte-nventive" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://www.twitter.com/XAMLLlama"><img src="https://avatars0.githubusercontent.com/u/24302614?v=4" width="100px;" alt="Michael Hawker MSFT (XAML Llama)"/><br /><sub><b>Michael Hawker MSFT (XAML Llama)</b></sub></a><br /><a href="#review-michael-hawker" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/unoplatform/workshops/commits?author=michael-hawker" title="Code">💻</a> <a href="https://github.com/unoplatform/workshops/commits?author=michael-hawker" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://nicksnettravels.builttoroam.com"><img src="https://avatars2.githubusercontent.com/u/1614057?v=4" width="100px;" alt="Nick Randolph"/><br /><sub><b>Nick Randolph</b></sub></a><br /><a href="https://github.com/unoplatform/workshops/commits?author=nickrandolph" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
## License
|
||||
|
||||
These workshop are made available under the [Apache License, Version 2][license]. If you use this material to conduct your own workshop, please share where it was used and [feedback by creating a new issue on GitHub][share-feedback]. If you see a opportunity to improve the courseware please send in a pull-request.
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[license]: ../LICENSE
|
||||
[share-feedback]: https://github.com/unoplatform/workshops/issues/new?labels=feedback%2C+untriaged&template=feedback.md
|
|
@ -0,0 +1,127 @@
|
|||
// Install modules
|
||||
#module nuget:?package=Cake.DotNetTool.Module&version=0.3.0
|
||||
|
||||
// Install addins.
|
||||
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Npm&version=0.17.0"
|
||||
|
||||
// Install .NET Core Global tools.
|
||||
#tool "dotnet:https://api.nuget.org/v3/index.json?package=dotnet-format&version=3.1.37601"
|
||||
#tool "dotnet:https://api.nuget.org/v3/index.json?package=GitVersion.Tool&version=4.0.1-beta1-58"
|
||||
|
||||
var target = Argument("target", "Default");
|
||||
|
||||
var solutions = new List<FilePath>() {
|
||||
new FilePath(@"mastering-uno\solution\TodoApp.sln")
|
||||
};
|
||||
|
||||
Setup(context =>
|
||||
{
|
||||
Information("Installing npm dependencies");
|
||||
NpmInstall();
|
||||
});
|
||||
|
||||
|
||||
Teardown(context =>
|
||||
{
|
||||
Information("Starting Teardown...");
|
||||
|
||||
if(context.Successful)
|
||||
{
|
||||
// todo
|
||||
}
|
||||
|
||||
Information("Finished running tasks.");
|
||||
});
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASKS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
Task("LintMarkdown")
|
||||
.Does(() =>
|
||||
{
|
||||
var exitCode = StartProcess(@"node_modules\.bin\markdownlint.cmd", "--ignore node_modules .");
|
||||
|
||||
if (BuildSystem.IsPullRequest)
|
||||
{
|
||||
if (exitCode > 0)
|
||||
{
|
||||
throw new Exception(string.Format("Terminating build due to linting errors. Markdown must pass the linter before pull-requests can be merged.", exitCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Task("FormatCode")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var solution in solutions)
|
||||
{
|
||||
var exitCode = StartProcess("dotnet", $"format --check --workspace {solution.FullPath}");
|
||||
|
||||
if (BuildSystem.IsPullRequest)
|
||||
{
|
||||
if (exitCode > 0)
|
||||
{
|
||||
throw new Exception(string.Format("Terminating build because files were formatted. Code must be formatted before pull-requests can be merged.", exitCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Task("Restore-NuGet-Packages")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var solution in solutions)
|
||||
{
|
||||
NuGetRestore(solution.FullPath);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("Format")
|
||||
.IsDependentOn("Restore-NuGet-Packages")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var solution in solutions)
|
||||
{
|
||||
MSBuild(solution.FullPath);
|
||||
|
||||
// MSBuild(solution.FullPath, new MSBuildSettings()
|
||||
// .WithProperty("AppxBundle", "Always")
|
||||
// .WithProperty("AppxBundlePlatforms", "x86|arm")
|
||||
// );
|
||||
}
|
||||
});
|
||||
|
||||
Task("Publish")
|
||||
.IsDependentOn("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Format")
|
||||
.IsDependentOn("LintMarkdown")
|
||||
.IsDependentOn("FormatCode");
|
||||
|
||||
Task("Default")
|
||||
.IsDependentOn("Build");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// EXECUTION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
RunTarget(target);
|
|
@ -0,0 +1,242 @@
|
|||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
The build script to execute.
|
||||
.PARAMETER Target
|
||||
The build script target to run.
|
||||
.PARAMETER Configuration
|
||||
The build configuration to use.
|
||||
.PARAMETER Verbosity
|
||||
Specifies the amount of information to be displayed.
|
||||
.PARAMETER ShowDescription
|
||||
Shows description about tasks.
|
||||
.PARAMETER DryRun
|
||||
Performs a dry run.
|
||||
.PARAMETER Experimental
|
||||
Uses the nightly builds of the Roslyn script engine.
|
||||
.PARAMETER Mono
|
||||
Uses the Mono Compiler rather than the Roslyn script engine.
|
||||
.PARAMETER SkipToolPackageRestore
|
||||
Skips restoring of packages.
|
||||
.PARAMETER ScriptArgs
|
||||
Remaining arguments are added here.
|
||||
|
||||
.LINK
|
||||
https://cakebuild.net
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[string]$Target,
|
||||
[string]$Configuration,
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity,
|
||||
[switch]$ShowDescription,
|
||||
[Alias("WhatIf", "Noop")]
|
||||
[switch]$DryRun,
|
||||
[switch]$Experimental,
|
||||
[switch]$Mono,
|
||||
[switch]$SkipToolPackageRestore,
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$ScriptArgs
|
||||
)
|
||||
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
||||
function MD5HashFile([string] $filePath)
|
||||
{
|
||||
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
|
||||
{
|
||||
return $null
|
||||
}
|
||||
|
||||
[System.IO.Stream] $file = $null;
|
||||
[System.Security.Cryptography.MD5] $md5 = $null;
|
||||
try
|
||||
{
|
||||
$md5 = [System.Security.Cryptography.MD5]::Create()
|
||||
$file = [System.IO.File]::OpenRead($filePath)
|
||||
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
||||
}
|
||||
finally
|
||||
{
|
||||
if ($file -ne $null)
|
||||
{
|
||||
$file.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetProxyEnabledWebClient
|
||||
{
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
|
||||
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
|
||||
$wc.Proxy = $proxy
|
||||
return $wc
|
||||
}
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
if(!$PSScriptRoot){
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
}
|
||||
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins"
|
||||
$MODULES_DIR = Join-Path $TOOLS_DIR "Modules"
|
||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
||||
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
||||
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
|
||||
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
|
||||
|
||||
# Make sure tools folder exists
|
||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
||||
Write-Verbose -Message "Creating tools directory..."
|
||||
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
||||
}
|
||||
|
||||
# Make sure that packages.config exist.
|
||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
||||
Write-Verbose -Message "Downloading packages.config..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG)
|
||||
} catch {
|
||||
Throw "Could not download packages.config."
|
||||
}
|
||||
}
|
||||
|
||||
# Try find NuGet.exe in path if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
|
||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Try download NuGet.exe if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile($NUGET_URL, $NUGET_EXE)
|
||||
} catch {
|
||||
Throw "Could not download NuGet.exe."
|
||||
}
|
||||
}
|
||||
|
||||
# Save nuget.exe path to environment to be available to child processed
|
||||
$ENV:NUGET_EXE = $NUGET_EXE
|
||||
|
||||
# Restore tools from NuGet?
|
||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
||||
Push-Location
|
||||
Set-Location $TOOLS_DIR
|
||||
|
||||
# Check for changes in packages.config and remove installed tools if true.
|
||||
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
|
||||
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
||||
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
||||
Write-Verbose -Message "Missing or changed package.config hash..."
|
||||
Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
|
||||
Remove-Item -Recurse
|
||||
}
|
||||
|
||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet tools."
|
||||
}
|
||||
else
|
||||
{
|
||||
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
|
||||
}
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore addins from NuGet
|
||||
if (Test-Path $ADDINS_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $ADDINS_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring addins from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet addins."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore modules from NuGet
|
||||
if (Test-Path $MODULES_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $MODULES_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring modules from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet modules."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Make sure that Cake has been installed.
|
||||
if (!(Test-Path $CAKE_EXE)) {
|
||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Build Cake arguments
|
||||
$cakeArguments = @("$Script");
|
||||
if ($Target) { $cakeArguments += "-target=$Target" }
|
||||
if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
|
||||
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||
if ($Experimental) { $cakeArguments += "-experimental" }
|
||||
if ($Mono) { $cakeArguments += "-mono" }
|
||||
$cakeArguments += $ScriptArgs
|
||||
|
||||
# Start Cake
|
||||
Write-Host "Running build script..."
|
||||
|
||||
& "$CAKE_EXE" ./build.cake --bootstrap
|
||||
if ($LASTEXITCODE -eq 0)
|
||||
{
|
||||
& "$CAKE_EXE" $cakeArguments
|
||||
}
|
||||
|
||||
exit $LASTEXITCODE
|
|
@ -0,0 +1,2 @@
|
|||
.\build.ps1 --target=format
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "workshops",
|
||||
"version": "1.0.0",
|
||||
"description": "Throughout the workshops you'll encounter the following emoji — here's what they mean:",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"remark": "^11.0.1",
|
||||
"remark-cli": "^7.0.0",
|
||||
"remark-lint": "^6.0.5",
|
||||
"remark-preset-lint-markdown-style-guide": "^2.1.3",
|
||||
"remark-preset-lint-recommended": "^3.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"markdownlint": "^0.16.0",
|
||||
"markdownlint-cli": "^0.18.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/unoplatform/workshop.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/unoplatform/workshop/issues"
|
||||
},
|
||||
"homepage": "https://github.com/unoplatform/workshop#readme"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"editor.renderWhitespace": "all"
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
# Workshop: Uno Bootcamp
|
||||
|
||||
## Overview
|
||||
|
||||
With the [Uno Platform][uno-platform], you can empower your existing .NET teams to build beautiful and preformant, single codebase, cross-platform web, mobile and desktop apps. In this single day intensive workshop, we’re going to introduce you to the development philosophy of Uno and build a new application from scratch that uses the philosophy. You’ll also learn from the creators of Uno productivity tips and how Uno works under the hood.
|
||||
|
||||
## Topics Covered
|
||||
|
||||
* Initial developer setup and getting started
|
||||
* The most productive way to develop an application
|
||||
* Building an iOS, Android and WebAssembly application with Uno
|
||||
* Building rich, responsive UI on mobile and web
|
||||
* Usage of platform native views and intermixing them
|
||||
* How Uno works under the hood
|
||||
* Source level debugging and how to monkey patch Uno’s internals
|
||||
|
||||
## Computer Setup
|
||||
|
||||
Attendees will need a computer with [Visual Studio for Windows and the Uno Platform Solution Templates installed][developer-environment-setup]. Additionally, [Developer Mode in Windows 10][developer-environment-setup] must be enabled. If you are doing this workshop as part of a classroom, it is important to [pre-install and configure these components][developer-environment-setup] before attendance as you'll need to download upwards of 12Gb of software from Microsoft.
|
||||
|
||||
|
||||
## Suggested Agenda
|
||||
|
||||
If this workshop is run in a class room format over a single day then we recommend using the following agenda:
|
||||
|
||||
* 08:30 AM. [Welcome Coffee and Developer Environment Setup][developer-environment-setup]
|
||||
* 09:00 AM. [Introduction to the Uno Platform][introduction-to-uno]
|
||||
* 10:00 AM. [Productivity with Uno: Tooling and Ecosystem][leverage-existing-tools]
|
||||
* 10:30 PM. [Let Views Do Views][let-views-do-views]
|
||||
* 11:30 AM. [Creating Rich, Responsive UI on mobile and web][create-rich-responsive-uis]
|
||||
* 12:00 PM. Lunch
|
||||
* 2:30 PM. [Native inter-compatibility][native-intercompatibility]
|
||||
* 3:30 PM. [Working with Uno's Internals][working-with-uno]
|
||||
|
||||
## Legend
|
||||
|
||||
Throughout the workshop you'll encounter the following emoji — here's what they mean:
|
||||
|
||||
* 📖 Overview of what to expect in a module.
|
||||
* ✋ Pre-requisite knowledge or activities required before proceeding.
|
||||
* 💡 Theory, key concepts and background information.
|
||||
* 🛈 Friendly reminders and additional insights.
|
||||
* 🎯 A class-room based activity.
|
||||
* ☑️ A handy checklist that guarantees successful outcomes.
|
||||
* 📚 Additional reading material.
|
||||
* ⏭️️ Recap of the current module and what to expect in the next module
|
||||
|
||||
## License
|
||||
|
||||
This workshop is available under [Apache License, Version 2][license]. If you use this material to conduct your own workshop, please share where it was used and [feedback by creating a new issue on GitHub][share-feedback]. If you see a opportunity to improve the courseware, please send in a pull-request.
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[developer-environment-setup]: modules/00-Developer-Environment-Setup/README.md
|
||||
[introduction-to-uno]: modules/01-Introduction-to-Uno/README.md
|
||||
[leverage-existing-tools]: modules/02-Leverage-existing-tools/README.md
|
||||
[let-views-do-views]: modules/03-Let-views-do-views/README.md
|
||||
[create-rich-responsive-uis]: modules/04-Create-rich-responsive-UIs/README.md
|
||||
[native-intercompatibility]: modules/05-Native-intercompatibility/README.md
|
||||
[working-with-uno]: modules/07-Working-with-Uno/README.md
|
||||
|
||||
[license]: ../LICENSE
|
||||
[share-feedback]: https://github.com/unoplatform/workshops/issues/new?labels=feedback%2C+untriaged&template=feedback.md
|
|
@ -0,0 +1,62 @@
|
|||
# Developer Environment Setup
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
Developing applications with the Uno Platform requires Visual Studio for Windows. On iOS and Android, the Uno Platform relies extensively on the Xamarin Native stack. On WebAssembly, the Uno Platform relies directly on the Mono-Wasm runtime.
|
||||
|
||||
If you are doing this workshop as part of a classroom, it is important to pre-install these components of Visual Studio for Windows before attendance, as you'll need to download upwards of 12Gb of software from Microsoft.
|
||||
|
||||
## ☑️ Software Installation
|
||||
|
||||
Attendees will need a Windows 10 (version 1903 or higher recommended) computer with the following software installed:
|
||||
|
||||
* [ ] [Visual Studio for Windows 2019](https://visualstudio.microsoft.com/vs/) 16.2.0 or higher (any edition) with the following workloads installed:
|
||||
* .NET desktop development
|
||||
* Universal Windows Platform development
|
||||
* Mobile development with .NET
|
||||
* ASP.NET and web development
|
||||
* Node.js development
|
||||
* Visual Studio extension development
|
||||
* .NET Core cross-platform development
|
||||
* Individual components:
|
||||
* .NET / .NET Framework 4.6.2 SDK
|
||||
* .NET / .NET Framework 4.6.2 targeting pack
|
||||
* Code tools / Git for Windows
|
||||
* SDKs, librairies, and frameworks / Windows 10 SDK (10.0.16299.0)
|
||||
* SDKs, librairies, and frameworks / Windows 10 SDK (10.0.17763.0)
|
||||
* SDKs, librairies, and frameworks / Windows 10 SDK (10.0.18362.0)
|
||||
* Emulators / Intel Hardware Accelerated Execution Manager (HAXM) -- if you have an Intel processor
|
||||
|
||||
* [ ] [.NET Core 2.2 SDK](https://dotnet.microsoft.com/download)
|
||||
|
||||
* [ ] Android SDKs and Tools with the following components installed in the [Android SDK Manager](https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk?tabs=windows) via `Visual Studio for Windows -> Tools -> Android -> Android SDK Manager`.
|
||||
|
||||
![Android SDKs Manager - Platforms Tab](android-sdks-and-tools-platforms-tab.png)
|
||||
|
||||
* [ ] Platforms
|
||||
* [ ] Android 9.0 (Pie) API 28
|
||||
* [ ] Android 8.1 (Oreo) API 27
|
||||
* [ ] Android 8.0 (Oreo) API 26
|
||||
|
||||
![Android SDKs Manager - Tools Tab](android-sdks-and-tools-tools-tab.png)
|
||||
|
||||
* [ ] Tools
|
||||
* [ ] Android SDK Tools (ensure latest)
|
||||
* [ ] Android Platform Tools (ensure latest)
|
||||
* [ ] Android SDK Build Tools (ensure latest for all)
|
||||
* [ ] Android Emulator (ensure latest)
|
||||
|
||||
* [ ] [Uno Platform Solution Templates](https://marketplace.visualstudio.com/items?itemName=nventivecorp.uno-platform-addin)
|
||||
* [ ] [Google Chrome](https://chocolatey.org/packages/GoogleChrome), [Firefox](https://chocolatey.org/packages/firefox), [FireFox Developer Edition](https://chocolatey.org/packages/firefox-dev) and [Microsoft Edge Insider](https://www.microsoftedgeinsider.com/en-us/)
|
||||
|
||||
## ☑️ Configuration
|
||||
|
||||
* [ ] [Developer Mode in Windows 10 enabled](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development)
|
||||
* [ ] [Windows Hypervisor Platform](https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows#hyper-v) must be activated.
|
||||
|
||||
## What's next
|
||||
|
||||
🎉 that's it. Your computer is now setup to do software development with the Uno Platform. In the [next module][next-module] you'll learn all about the Uno Platform and build your first application via the Uno Solution Template generator.
|
||||
|
||||
<!-- in-line links -->
|
||||
[next-module]: ../01-Introduction-to-Uno/README.md
|
Двоичные данные
uno-bootcamp/modules/00-Developer-Environment-Setup/android-sdks-and-tools-platforms-tab.png
Normal file
После Ширина: | Высота: | Размер: 257 KiB |
Двоичные данные
uno-bootcamp/modules/00-Developer-Environment-Setup/android-sdks-and-tools-tools-tab.png
Normal file
После Ширина: | Высота: | Размер: 59 KiB |
|
@ -0,0 +1,169 @@
|
|||
# Introduction to Uno
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
This workshop provides a walk-through of the basics of creating a application with the [Uno Platform][uno-platform]. Each module contains some background information on major features and concepts in the Uno Platform, and includes activities to apply what you have learned.
|
||||
|
||||
By the end of this module you will:
|
||||
|
||||
- Confirm your computer is configured correctly and has the correct software installed.
|
||||
- Use the Uno Platform Solution Templates to generate a application.
|
||||
- Learn what the Uno Platform is and how it is not a complete replacement of native UI frameworks.
|
||||
- Understand the project structure Uno uses, the reasons why and terminology.
|
||||
- Understand the purpose of each NuGet package of the Uno Platform and what's inside of them.
|
||||
|
||||
## ✋ Before You Begin
|
||||
|
||||
You need to have Visual Studio for Windows and the Uno Platform Solution Templates installed. Additionally, Developer Mode in Windows 10 must be enabled. It is assumed that you have downloaded, installed and configured your computer as per the checklist [found in the previous module][previous-module]. If you are doing this workshop as part of a classroom, it is important to pre-install these components of Visual Studio for Windows before attendance as you'll need to download upwards of 12Gb of software from Microsoft.
|
||||
|
||||
## 💡 What is the Uno Platform
|
||||
|
||||
The [Uno Platform][uno-platform] is a Universal Windows Platform Bridge that allows UWP-based code (C# and XAML) to run on iOS, Android, and WebAssembly. It provides the full API definitions of the UWP Windows 10 October 2018 Update (build 17763), and the implementation of parts of the UWP API, such as `Windows.UI.Xaml`, to enable UWP applications to run on these platforms.
|
||||
|
||||
### Why Uno
|
||||
|
||||
Developing for Windows (phone, desktop, tablet, XBox), iOS (tablet and phone), Android (tablet and phone) and WebAssembly at once can be a complex process, especially when it comes to the user interface. Each platform has its own ways of defining dynamic layouts, with some being more efficient, some more verbose, some more elegant, and some more performant than others.
|
||||
|
||||
Yet, being able to master all these frameworks at once is a particularly difficult task, because of the amount of platform-specific knowledge required to master each platform. Most of the time it boils down to different teams developing the same application multiple times, with each requiring a full development cycle.
|
||||
|
||||
With Xamarin, C# comes to all these platforms; however, it only provides transparent translations of the UI frameworks available for iOS and Android. Most non-UI code can be shared, but when it comes to the UI, almost nothing can be shared.
|
||||
|
||||
To avoid having to learn the UI-layout techniques and approaches for each platform, the Uno Platform mimics the Windows XAML approach of defining UI and layouts. This translates into the ability to share styles, layouts, and data-bindings while retaining the ability to mix XAML-style and native layouts.
|
||||
|
||||
It is incredibly easy to mix UWP view types with purely native views. For instance, a `StackPanel` can contain a `RelativeLayout` on Android, or a `MKMapView` on iOS.
|
||||
|
||||
This is possible because, in the Uno Platform, all views inherit from the native base view type. On Android this means `View`. On iOS this means `UIView`. Since Uno couldn't change the design of the iOS or Android frameworks, Uno made `DependencyObject` a interface with a implementation that is automatically supplied by [code generation][source-generator]. This design decision allows an Uno `FrameworkElement` to be a `View` or `UIView` and at the same time to be a `DependencyObject`.
|
||||
|
||||
![With Uno Platform, you can empower your existing .NET teams to build beautiful and performant, single codebase, cross-platform web, mobile and desktop apps.](uno-architecture.png)
|
||||
|
||||
In summary, the Uno Platform provides the ability for developers to reuse known layout and coding techniques on all platforms, resulting in a gain of overall productivity when creating UI-rich applications. On iOS and Android, the Uno Platform relies extensively on the Xamarin Native stack. On WebAssembly, the Uno Platform relies directly on the Mono-Wasm runtime.
|
||||
|
||||
### What does Uno not do
|
||||
|
||||
The Uno Platform is not meant to be a complete replacement of all the native UI frameworks. This would be the lowest-denominator approach and would result in end-users noticing the non-native appearance or behavior of an application on their device. Having an iOS application that behaves like an Android application may bother users.
|
||||
|
||||
Instead the Uno Platform provides a common set of layout and controls, designed to provide the ability to share an important part of an application's code and markup; however, it leaves developers with the ability to retain the native look and feel. At the same time it provides a way to have a pixel-perfect UI and UX being identical on all platforms. Commonly, this look and feel will be found in the navigation, transitions and animations, main pages, and edges of the screen.
|
||||
|
||||
## 🎯 Create a Cross-Platform App (Uno Platform)
|
||||
|
||||
> 🛈 If you cannot find the Cross-Platform App (Uno Platform) template then the Uno Platform Solution Templates may not be installed. You'll find instructions where you can download them from [in the previous module][previous-module].
|
||||
|
||||
![Create a new project that uses the Cross-Platform App (Uno Platform) template](create-a-new-project.png)
|
||||
|
||||
1. Launch Visual Studio for Windows (any edition).
|
||||
1. Navigate to `File -> New -> Project`.
|
||||
1. Search for `Uno`.
|
||||
1. Select `Cross-Platform App (Uno Platform)`.
|
||||
1. Name the Project name as `Todo`.
|
||||
1. Specify the Location as a folder in the workshop git repostiory.
|
||||
1. Press `Create` to generate your Uno application.
|
||||
|
||||
## 💡 Project Structure
|
||||
|
||||
![The todo application which was created from the Cross-Platform App (Uno Platform) template](uno-project-structure.png)
|
||||
|
||||
You now have a `Todo.[Droid|iOS|UWP|Wasm]` project for each platform that Uno supports:
|
||||
|
||||
- Universal Windows Platform (UWP).
|
||||
- Android.
|
||||
- iOS.
|
||||
- WebAssembly.
|
||||
|
||||
These projects are commonly referred to by the Uno Platform team as `platform heads`. They contain typical information like settings, metadata, dependencies, and also a list of files included in the project. The `platform head` builds and packages the binary executable for that platform.
|
||||
|
||||
You also now have a `shared project` (`Todo.Shared`) which contains files that are shared between all of the `platform heads`. Clearly understanding how `shared projects` work is important to using the Uno Platform effectively. They are nothing more than a list of files.
|
||||
|
||||
Let's repeat that for emphasis:
|
||||
|
||||
> ❗️ In Visual Studio, a shared project is just a list of files. Referencing a shared project in an ordinary `.csproj` project causes those files to be included in the project. They're treated in exactly the same way as the files inside the project.
|
||||
|
||||
It's important to be aware that the code in a shared-project file is compiled separately for each `platform head`. If you add a `netstandard` NuGet package such as `Json.NET` to a `platform head` and forget to add it to the other `platform heads` then those `platform heads` won't compile until you add the package.
|
||||
|
||||
Here's the rule of thumb (tm):
|
||||
|
||||
- Bootstrapping code, packaging settings, and platform-specific code goes in the corresponding `platform head`.
|
||||
- Your user interface and business logic goes in the `shared project`.
|
||||
- String resources normally go in the `shared project`.
|
||||
- Image assets may go either in the `shared project` or under each `platform head`.
|
||||
- Font assets must be placed in each `platform head`.
|
||||
- NuGet packages must be added to each `platform head` unless that package enables `platform head` functionality and in which case install the package into just that `platform head`.
|
||||
|
||||
|
||||
## 🎯 Update Dependencies
|
||||
|
||||
![Uno Platform Dependencies](uno-platform-dependencies.png)
|
||||
|
||||
1. Right Click `Solution 'Todo'` in Solution Explorer
|
||||
1. Click `Manage NuGet Packages for Solution`
|
||||
1. Navigate to the Updates tab
|
||||
1. Update `Uno.UI`
|
||||
1. Update `Uno.Core`
|
||||
1. Update `Uno.UniversalImageLoader`
|
||||
1. Update `Uno.Wasm.Bootstrap`
|
||||
|
||||
## 💡 Uno Platform Dependencies
|
||||
|
||||
|
||||
### Uno.Core
|
||||
|
||||
Low-level foundation for the implementation of Uno.UI. It's basically a bunch of patterns and method extensions used for logging, threading, tracing, etc...
|
||||
|
||||
[Sources][uno-core-sources]
|
||||
|
||||
### Uno.UI
|
||||
|
||||
This is the main part of Uno.UI. Not only it contains implementation of controls on all supported platforms, but also a code generator and even a _code analyzer_ to help developers when they are using it.
|
||||
|
||||
[Sources][uno-ui-sources] /
|
||||
[Documentation][uno-ui-docs]
|
||||
|
||||
### Uno.UniversalImageLoader
|
||||
|
||||
This is the binding for the excellent nostra13's [`UniversalImageLoader`](https://github.com/nostra13/Android-Universal-Image-Loader) to improve the performance of image loading on Android.
|
||||
|
||||
The usage of this package is optional, but there's no good reason to remove it except if you want to implement your own image loader.
|
||||
|
||||
[Sources][img-loader-sources]
|
||||
|
||||
### Uno.Wasm.Bootstrap
|
||||
|
||||
That's for wasm. It's a toolkit done by Uno to easily run .NET code in a browser using Mono-Wasm.
|
||||
|
||||
[Sources & documentation][uno-wasm-sources]
|
||||
|
||||
### Uno.CodeGen
|
||||
|
||||
This is an optional dependency, we recommend that you use it. It supplies utilities to make immutable classes in C# and automate the code for comparisons.
|
||||
|
||||
[Sources & documentation][uno-codegen-sources]
|
||||
|
||||
|
||||
## 📚 Additional Reading Material
|
||||
|
||||
- [The Uno Platform Website][uno-platform]
|
||||
- [The Philosophy of Uno][philosophy-of-uno]
|
||||
- [Overview of the Uno Source Generator][source-generator]
|
||||
- [Platform-specific C# code][platform-specific-xaml]
|
||||
- [Platform-specific XAML markup][platform-specific-xaml]
|
||||
|
||||
## ⏭️ What's next
|
||||
|
||||
In [the next module][next-module] you'll learn about the philosophy of the Uno Platform which had guided the development of past and future architectural decisions. Each module from here onwards teaches you about each philosophical tenant and includes activities to apply what you have learned.
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[previous-module]: ../00-Developer-Environment-Setup/README.md
|
||||
[next-module]: ../02-Leverage-existing-tools/README.md
|
||||
|
||||
[philosophy-of-uno]: https://platform.uno/docs/articles/concepts/overview/philosophy-of-uno.html
|
||||
[source-generator]: https://github.com/unoplatform/uno/blob/ea91df3bccce4dc7ece863adb86721f63356c59d/doc/articles/concepts/source-generation.md
|
||||
[platform-specific-xaml]: https://platform.uno/docs/articles/platform-specific-xaml.html
|
||||
[platform-specific-csharp]: https://platform.uno/docs/articles/platform-specific-csharp.html
|
||||
|
||||
[uno-core-sources]: https://github.com/nventive/Uno.Core
|
||||
[uno-ui-sources]: https://github.com/unoplatform/uno
|
||||
[uno-ui-docs]: https://platform.uno/docs/articles
|
||||
[img-loader-sources]: https://github.com/nventive/Binding.UniversalImageLoader
|
||||
[uno-wasm-sources]: https://github.com/unoplatform/Uno.Wasm.Bootstrap
|
||||
[uno-codegen-sources]: https://github.com/nventive/Uno.CodeGen
|
После Ширина: | Высота: | Размер: 169 KiB |
После Ширина: | Высота: | Размер: 130 KiB |
Двоичные данные
uno-bootcamp/modules/01-Introduction-to-Uno/uno-platform-dependencies.png
Normal file
После Ширина: | Высота: | Размер: 99 KiB |
После Ширина: | Высота: | Размер: 110 KiB |
|
@ -0,0 +1,73 @@
|
|||
# Leverage Existing Tools
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
One of the [philosophical tenants][philosophy-of-uno] of the [Uno Platform][uno-platform] is that where ever possible, the platform should `leverage existing tools` as Microsoft's tooling is a treat to work with. With the Uno Platform you can and should build your app with those tools as part of your inner-development loop with the Universal Windows Platform and then as part of your outer-development loop validate by deploying your application to iOS, Android, and the web via WebAssembly.
|
||||
|
||||
In this module you'll be (re)introduced to three key tools and learn the most productive way to develop a application:
|
||||
|
||||
- [Edit and Continue][edit-and-continue].
|
||||
- [Live Visual Tree][live-visual-tree].
|
||||
- [XAML Hot Reload][xaml-hot-reload].
|
||||
|
||||
## 🎯 Start the application
|
||||
|
||||
![Uno Project Structure](../01-Introduction-to-Uno/uno-project-structure.png)
|
||||
|
||||
1. Right click on the `Todo.UWP` application and select `Set as Startup Project`.
|
||||
1. Right click on the `Todo.UWP` application and select `Deploy`.
|
||||
1. Ensure the platform selector is set to `Todo.UWP`.
|
||||
1. Navigate to `Debug -> Start Debugging` to launch the application.
|
||||
|
||||
<!-- E&C is currently broken in VS2019
|
||||
|
||||
## 🎯 Play with C# Edit and Continue
|
||||
|
||||
> 🛈️ [Edit and Continue][edit-and-continue] is a time-saving feature that enables you to make changes to your source code while your program is in break mode. When you resume execution of the program by choosing an execution command like `Continue` or `Step`, `Edit and Continue` automatically applies the code changes. This allows you to make changes to your code during a debugging session, instead of having to stop, recompile your entire program, and restart the debugging session.
|
||||
|
||||
1. Introduce people to feature, don't assume pre-existing knowledge.
|
||||
1. Start up the UWP head of the Todo app in `DEBUG` mode (right click ->
|
||||
|
||||
-->
|
||||
|
||||
## 🎯 Play with Live Visual Tree
|
||||
|
||||
> 🛈 [Live Visual Tree][live-visual-tree] provides you with a real-time view of your running XAML code via the `Live Visual Tree` and the `Live Property Explorer`. These two tools give you a tree view of the UI elements of your running XAML application, and show you the runtime properties of any UI element you select.
|
||||
|
||||
![Live Visual Tree](live-visual-tree.png)
|
||||
|
||||
## 🎯 Play with Windows Hot Reload
|
||||
|
||||
> 🛈️ [XAML Hot Reload][xaml-hot-reload] helps you build your UWP app user interface by letting you make changes to XAML code while your app is running. Hot Reload is available in both Visual Studio and Blend for Visual Studio. This feature enables you to incrementally build and test XAML code with the benefit of the running app's data context, authentication state, and other real-world complexity that is hard to simulate during design-time.
|
||||
|
||||
## 🎯 Play with Uno Hot Reload
|
||||
|
||||
|
||||
## 📚 Additional Reading Material
|
||||
|
||||
- [The Uno Platform Website][uno-platform].
|
||||
- [The Philosophy of Uno][philosophy-of-uno].
|
||||
- [How to: Use Edit and Continue (C#)][edit-and-continue].
|
||||
- [Write and debug running XAML code with XAML Hot Reload][xaml-hot-reload].
|
||||
- [Inspect XAML properties while debugging][live-visual-tree].
|
||||
- [TodoMVC][todomvc].
|
||||
|
||||
## ⏭️ What's next
|
||||
|
||||
In [the next module][next-module] you'll learn about the next philosophical tenant — `Let views, do views` and use the tools you just learned about to build the business logic of the infamous [TodoMVC code kata][todomvc] for the Universal Windows Platform, iOS, Android and WebAssembly from a single codebase in C#.
|
||||
|
||||
![Screenshot of the TodoMVC application](todo-mvc.png)
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[previous-module]: ../01-Introduction-to-Uno/README.md
|
||||
[next-module]: ../03-Let-views-do-views/README.md
|
||||
|
||||
[philosophy-of-uno]: https://platform.uno/docs/articles/concepts/overview/philosophy-of-uno.html
|
||||
|
||||
[edit-and-continue]: https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue-csharp
|
||||
[live-visual-tree]: (https://docs.microsoft.com/en-us/visualstudio/debugger/inspect-xaml-properties-while-debugging)
|
||||
[xaml-hot-reload]: https://docs.microsoft.com/en-us/visualstudio/debugger/xaml-hot-reload
|
||||
|
||||
[todomvc]: http://todomvc.com/
|
После Ширина: | Высота: | Размер: 84 KiB |
После Ширина: | Высота: | Размер: 12 KiB |
|
@ -0,0 +1,170 @@
|
|||
# Let views do Views
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
The next [philosophical tentant][philosophy-of-uno] of the [Uno Platform][uno-platform] is that where ever possible the platform should `let views do views` as separation of model, view and presentation keeps your code loosely coupled and easy to maintain. Features like data binding and attached properties let you write clean, elegant MVVM-style code.
|
||||
|
||||
In this module you'll be (re)introduced to the architectural pattern of `Model-View-ViewModel` and build the business logic for infamous [TodoMVC code kata][todomvc] for the Universal Windows Platform, iOS, Android and WebAssembly from a single codebase in C#.
|
||||
|
||||
## 💡 Why we need Model-View-ViewModel
|
||||
|
||||
Unfortunately, most frameworks including the Universal Windows Platform didn't apply much thought to unit testing when the framework was designed, or those concerns were deemed as out-of-scope. As a result, user-interface objects are often very difficult to test in unit test runners, as they are not *plain objects* and frameworks often have dependencies on a run-loop existing, or often expect static classes / globals to be initialized in a certain way.
|
||||
|
||||
So, since user-interface classes are untestable via unit test runners, the goal with the `Model-View-ViewModel` design pattern is to put as much of your *interesting code*, into a class that *represents the View*, but is just a regular class we can create. Then, we want the actual code in the View to be
|
||||
as boring, mechanical, and as short as possible, because it is inherently untestable.
|
||||
|
||||
This regular, testable class is called the `ViewModel`, and it is the *Model of a View*. A view is a composable piece of the UI that handles a particular and well-defined UI function on the page. This means, that each *View will usually have one Viewmodel* to handle that function. This doesn't have to be strictly true, but it is generally the case.
|
||||
|
||||
![A diagram of the Model-View-ViewModel architectural pattern](model-view-viewmodel.png)
|
||||
|
||||
Another important aspect of understanding ViewModels is that they are an abstraction to separate *policy* from *mechanism*. *ViewModels do not deal in the specifics of Buttons and Menus and TextBoxes, they only describe how the data in these elements are related*. For example, the "Copy" `ICommand` has no direct knowledge of the MenuItem or the Button that it is connected to, it only models the *action* of Copying. The View has the responsibility of mapping the Copy command to the controls that invoke it.
|
||||
|
||||
### ViewModels are Reusable
|
||||
|
||||
Because `ViewModels` do not explicitly reference user interface frameworks or controls, this means that ViewModels can often be *reused across platforms*. This is a very powerful pattern that can drastically reduce the time required to port to a new platform.
|
||||
|
||||
### Common Mistakes and Misconceptions
|
||||
|
||||
Many people believe that the `Model-View-ViewModel` pattern means that there should be zero code in the View code-behind, or that everything should be in XAML. C# is a very expressive and concise language, and while it may be *possible* for you to create an entire complex View in XAML, at times it's better to reach for C# for maintainability and readability reasons.
|
||||
|
||||
So then, how do you decide what to put in the View? Concepts such as scroll position and control focus are great examples of code that is View-specific. Handling animation and Window position / minimize are also great examples of code that often should be in the View.
|
||||
|
||||
Another common misconception is that of separation - while it is very important that the ViewModel have no reference to the View or any of the controls that the View creates, *the reverse is not true*. The View is free to be very tightly bound to the ViewModel, and in fact, it is often useful for the View to "reach into" the ViewModel.
|
||||
|
||||
## 🎯 Decompose the application domain model
|
||||
|
||||
The first step to mastering the Model-View-ViewModel software design pattern is learning to decompose user interfaces so here's what you'll be building over the next couple modules — the infamous [TodoMVC][todomvc] application. If you have internet please familiarize yourself with the application before proceeding.
|
||||
|
||||
![Screenshot of the TodoMVC application](todo-mvc.png)
|
||||
|
||||
<details><summary>1. 🎯 ☑️ Pause for a moment and deconstruct the application model. Validate your deconstruction by expanding this checklist.</summary>
|
||||
<p>
|
||||
|
||||
There are nine concerns that require domain modeling:
|
||||
|
||||
1. [ ] A way to add items to the todo list.
|
||||
1. [ ] A list of todo items.
|
||||
1. [ ] Each todo item has a boolean status - incomplete or complete.
|
||||
1. [ ] Each todo item has a description that can be changed.
|
||||
1. [ ] Each todo item has a way to delete it.
|
||||
1. [ ] A count of the amount of incomplete items that remain.
|
||||
1. [ ] A count of the total number of items.
|
||||
1. [ ] Commands that filter the list of todo items - all, active and completed.
|
||||
1. [ ] A command that clears all completed items.
|
||||
|
||||
</p>
|
||||
</details><br/>
|
||||
|
||||
Now that you have modeled the domain, it is time to think about what that the user can do with the application, state and under what circumstances the user-interface will update automatically in response to interactions. Ignore concerns of data persistence at this stage.
|
||||
|
||||
<details><summary>2. 🎯 ☑️ Pause for a moment and deconstruct the application behaviour. Validate your deconstruction by expanding this checklist.</summary>
|
||||
<p>
|
||||
|
||||
There are seven application behaviours:
|
||||
|
||||
1. [ ] When there are no items in the todo list - the majority of all controls are hidden.
|
||||
1. [ ] When a item is added to the todo list — the item is added to the top of the list.
|
||||
1. [ ] When a item is marked as complete — the todo item is striked out.
|
||||
1. [ ] When a item is deleted — the todo item disappears.
|
||||
1. [ ] When the boolean status of todo item changes — the amount of todo items left updates automatically.
|
||||
1. [ ] The buttons filter the todo list — display all, display only active and display only completed.
|
||||
1. [ ] When the clear completed button is pressed — all completed items are removed from the todo list.
|
||||
|
||||
</p>
|
||||
</details><br/>
|
||||
|
||||
## 💡 Data Binding and Commands
|
||||
|
||||
Data binding is how you attach user-interface elements to the application domain model. Data binding comes in three modes - `one time`, `one-way` and `two-way`:
|
||||
|
||||
* `one-time` is used when you need to display values when the user-interface is first shown and there's no requirement to respond to changes to these values. If you need to display an image, such as an avatar of a user then you'll typically use `one-time`.
|
||||
* `one-way` is used when you need the user-interface to automatically update when values change. If you need to display a collection of items or anything that requires reactivity then you'll typically use `one-way`. It is commonly the default.
|
||||
* `two-way` is used when you need the user-interface to update the values and automatically update when the values change. If you need to accept user input to a text box and have that text box automatically update when the backing value changes then you'll typically use `two-way`.
|
||||
|
||||
In this module, you won't be doing any data-binding but you'll implement commands that will handle events from the user-interface. The interface for this is called `ICommand` and we've provided you with an implementation over at [TodoApp/TodoApp.Shared/ViewModels/SimpleCommand.cs][src-simplecommand] which you'll be using to build your application.
|
||||
|
||||
## 💡 Sending Change Notifications
|
||||
|
||||
When the value that a user-interface element is bound updates, the user-interface needs to be informed that it should redraw. This is achieved by raising the `PropertyChanged` event via property setters of classes which implement `INotifyPropertyChanged`.
|
||||
|
||||
Here's an example of this in action:
|
||||
|
||||
```csharp
|
||||
public class Person : INotifyPropertyChanged
|
||||
{
|
||||
private string _givenNames;
|
||||
|
||||
public string GivenNames
|
||||
{
|
||||
get => _givenNames;
|
||||
set
|
||||
{
|
||||
_givenNames = value;
|
||||
OnPropertyChanged(); // this is how you raise `PropertyChanged` events.
|
||||
}
|
||||
}
|
||||
|
||||
// boiler plate implementation from here onwards
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This can get rather tedious to write by hand so it's worth checking out the [PropertyChanged.Fody][fody] NuGet package which allows allows you to write less verbose code:
|
||||
|
||||
```csharp
|
||||
// All classes that implement INotifyPropertyChanged will have notification code injected into property setters.
|
||||
public class Person : INotifyPropertyChanged
|
||||
{
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public string GivenNames { get; set; }
|
||||
public string FamilyName { get; set; }
|
||||
public string FullName => $"{GivenNames} {FamilyName}";
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Implement the application domain model
|
||||
|
||||
You won't need to implement the datastore or model the entities, that has been done for you.
|
||||
|
||||
1. [ ] Review [TodoApp/TodoApp.Shared/Models/*.cs][src-models]
|
||||
2. [ ] Review [TodoApp.Shared/ViewModels/SimpleCommand.cs][src-simplecommand]
|
||||
3. [ ] Implement [TodoApp.Shared/ViewModels/MainPageViewModel.cs][src-viewmodel]
|
||||
|
||||
## 📚 Additional Reading Material
|
||||
|
||||
* [The Philosophy of Uno][philosophy-of-uno].
|
||||
* [The infamous TodoMVC code kata][todomvc].
|
||||
* [Data binding in depth][docs-databinding-indepth].
|
||||
* [Model-View-ViewModel (MVVM) Explained](https://blog.jeremylikness.com/blog/model-view-viewmodel-mvvm-explained/).
|
||||
* [The ICommand Interface documentation][docs-icommand].
|
||||
* [The INotifyPropertyChanged documentation][docs-inotifypropertychanged].
|
||||
* [ReactiveUI - An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!](https://github.com/reactiveui/ReactiveUI)
|
||||
|
||||
## ⏭️ What's next
|
||||
|
||||
In [the next module][next-module] you'll learn about the next philosophical tenant — `Create rich, responsive UIs` and build a responsive user interface for infamous [TodoMVC code kata][todomvc] for the Universal Windows Platform, iOS, Android and WebAssembly from a single codebase in C#.
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[previous-module]: ../01-Introduction-to-Uno/README.md
|
||||
[next-module]: ../04-Create-rich-responsive-UIs/README.md
|
||||
|
||||
[philosophy-of-uno]: https://platform.uno/docs/articles/concepts/overview/philosophy-of-uno.html
|
||||
|
||||
[todomvc]: http://todomvc.com/
|
||||
[fody]: https://github.com/Fody/PropertyChanged
|
||||
|
||||
[src-models]: TodoApp/TodoApp.Shared/Models
|
||||
[src-simplecommand]: TodoApp/TodoApp.Shared/ViewModels/SimpleCommand.cs
|
||||
[src-viewmodel]: TodoApp/TodoApp.Shared/ViewModels/MainPageViewModel.cs
|
||||
|
||||
[docs-databinding-indepth]: https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-in-depth
|
||||
[docs-icommand]: https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.icommand
|
||||
[docs-inotifypropertychanged]: https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.inotifypropertychanged
|
|
@ -0,0 +1,269 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.452
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TodoApp.Shared", "TodoApp\TodoApp.Shared\TodoApp.Shared.shproj", "{6279C845-92F8-4333-AB99-3D213163593C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.Droid", "TodoApp\TodoApp.Droid\TodoApp.Droid.csproj", "{88260147-218A-425D-84D2-AD8895F31824}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.iOS", "TodoApp\TodoApp.iOS\TodoApp.iOS.csproj", "{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.UWP", "TodoApp\TodoApp.UWP\TodoApp.UWP.csproj", "{67B9A03A-0457-4818-AE91-A00BCC6649AD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Wasm", "TodoApp\TodoApp.Wasm\TodoApp.Wasm.csproj", "{EB416AC1-7C0D-43AD-9658-FA39328B512E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{3fd7c150-f993-49c1-8b80-c7ace61faf25}*SharedItemsImports = 4
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{6279c845-92f8-4333-ab99-3d213163593c}*SharedItemsImports = 13
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{67b9a03a-0457-4818-ae91-a00bcc6649ad}*SharedItemsImports = 4
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{88260147-218a-425d-84d2-ad8895f31824}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
|
||||
Ad-Hoc|ARM = Ad-Hoc|ARM
|
||||
Ad-Hoc|iPhone = Ad-Hoc|iPhone
|
||||
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
|
||||
Ad-Hoc|x64 = Ad-Hoc|x64
|
||||
Ad-Hoc|x86 = Ad-Hoc|x86
|
||||
AppStore|Any CPU = AppStore|Any CPU
|
||||
AppStore|ARM = AppStore|ARM
|
||||
AppStore|iPhone = AppStore|iPhone
|
||||
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
|
||||
AppStore|x64 = AppStore|x64
|
||||
AppStore|x86 = AppStore|x86
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|iPhone = Release|iPhone
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|ARM.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|x64.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|x86.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|Any CPU.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|x86.ActiveCfg = Release|iPhone
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.Deploy.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.Deploy.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|iPhone.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.Build.0 = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.Build.0 = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|iPhone.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|iPhoneSimulator.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.Deploy.0 = Release|x86
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {007C507A-1B6C-4DCC-B1BF-27704584DB79}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,19 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with you package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Droid/Assets/Fonts/winjs-symbols.ttf
Normal file
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Com.Nostra13.Universalimageloader.Core;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
namespace TodoApp.Droid
|
||||
{
|
||||
[global::Android.App.ApplicationAttribute(
|
||||
Label = "@string/ApplicationName",
|
||||
LargeHeap = true,
|
||||
HardwareAccelerated = true,
|
||||
Theme = "@style/AppTheme"
|
||||
)]
|
||||
public class Application : Windows.UI.Xaml.NativeApplication
|
||||
{
|
||||
public Application(IntPtr javaReference, JniHandleOwnership transfer)
|
||||
: base(new App(), javaReference, transfer)
|
||||
{
|
||||
ConfigureUniversalImageLoader();
|
||||
}
|
||||
|
||||
private void ConfigureUniversalImageLoader()
|
||||
{
|
||||
// Create global configuration and initialize ImageLoader with this config
|
||||
ImageLoaderConfiguration config = new ImageLoaderConfiguration
|
||||
.Builder(Context)
|
||||
.Build();
|
||||
|
||||
ImageLoader.Instance.Init(config);
|
||||
|
||||
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Android.App;
|
||||
using Android.Widget;
|
||||
using Android.OS;
|
||||
using Android.Content.PM;
|
||||
using Android.Views;
|
||||
|
||||
namespace TodoApp.Droid
|
||||
{
|
||||
[Activity(
|
||||
MainLauncher = true,
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize,
|
||||
WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden
|
||||
)]
|
||||
public class MainActivity : Windows.UI.Xaml.ApplicationActivity
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="TodoApp" android:versionCode="1" android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
|
||||
<application android:label="TodoApp"></application>
|
||||
</manifest>
|
|
@ -0,0 +1,30 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TodoApp.Droid")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TodoApp.Droid")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,44 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Droid/Resources/drawable/Icon.png
Normal file
После Ширина: | Высота: | Размер: 4.0 KiB |
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="Hello">Hello World, Click Me!</string>
|
||||
<string name="ApplicationName">TodoApp</string>
|
||||
</resources>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light">
|
||||
|
||||
<!-- This removes the ActionBar -->
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{88260147-218A-425D-84D2-AD8895F31824}</ProjectGuid>
|
||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TodoApp.Droid</RootNamespace>
|
||||
<AssemblyName>TodoApp.Droid</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidApplication>true</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
|
||||
<ResourcesDirectory>..\TodoApp.Shared\Strings</ResourcesDirectory>
|
||||
<!-- AndroidUseAapt2 is disabled until https://github.com/unoplatform/uno/issues/1382 is resolved -->
|
||||
<AndroidUseAapt2>false</AndroidUseAapt2>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>portable</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
||||
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
|
||||
<AndroidCreatePackagePerAbi>true</AndroidCreatePackagePerAbi>
|
||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||
<AotAssemblies>true</AotAssemblies>
|
||||
<EnableLLVM>true</EnableLLVM>
|
||||
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="Mono.Android.Export" />
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.CodeGen">
|
||||
<Version>1.32.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.UI" Version="1.45.0" />
|
||||
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.32" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainActivity.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidAsset Include="Assets\Fonts\winjs-symbols.ttf" />
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
<None Include="Assets\AboutAssets.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\values\Strings.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\Icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\AndroidManifest.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\values\Styles.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TodoApp.Shared\TodoApp.Shared.projitems" Label="Shared" Condition="Exists('..\TodoApp.Shared\TodoApp.Shared.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<!-- This will force the generation of the APK when not buildig inside visual studio -->
|
||||
<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'==''" />
|
||||
</Project>
|
|
@ -0,0 +1,20 @@
|
|||
<Application
|
||||
x:Class="TodoApp.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:TodoApp"
|
||||
RequestedTheme="Light">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!--
|
||||
Styles that define common aspects of the platform look and feel
|
||||
Required by Visual Studio project and item templates
|
||||
-->
|
||||
<ResourceDictionary Source="Styles/_Styles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
</Application>
|
|
@ -0,0 +1,151 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace TodoApp
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
sealed partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
ConfigureFilters(Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory);
|
||||
|
||||
this.InitializeComponent();
|
||||
this.Suspending += OnSuspending;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the application is launched normally by the end user. Other entry points
|
||||
/// will be used such as when the application is launched to open a specific file.
|
||||
/// </summary>
|
||||
/// <param name="e">Details about the launch request and process.</param>
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// this.DebugSettings.EnableFrameRateCounter = true;
|
||||
}
|
||||
#endif
|
||||
Frame rootFrame = Windows.UI.Xaml.Window.Current.Content as Frame;
|
||||
|
||||
// Do not repeat app initialization when the Window already has content,
|
||||
// just ensure that the window is active
|
||||
if (rootFrame == null)
|
||||
{
|
||||
// Create a Frame to act as the navigation context and navigate to the first page
|
||||
rootFrame = new Frame();
|
||||
|
||||
rootFrame.NavigationFailed += OnNavigationFailed;
|
||||
|
||||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||
{
|
||||
//TODO: Load state from previously suspended application
|
||||
}
|
||||
|
||||
// Place the frame in the current Window
|
||||
Windows.UI.Xaml.Window.Current.Content = rootFrame;
|
||||
}
|
||||
|
||||
if (e.PrelaunchActivated == false)
|
||||
{
|
||||
if (rootFrame.Content == null)
|
||||
{
|
||||
// When the navigation stack isn't restored navigate to the first page,
|
||||
// configuring the new page by passing required information as a navigation
|
||||
// parameter
|
||||
rootFrame.Navigate(typeof(MainPage), e.Arguments);
|
||||
}
|
||||
// Ensure the current window is active
|
||||
Windows.UI.Xaml.Window.Current.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when Navigation to a certain page fails
|
||||
/// </summary>
|
||||
/// <param name="sender">The Frame which failed navigation</param>
|
||||
/// <param name="e">Details about the navigation failure</param>
|
||||
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when application execution is being suspended. Application state is saved
|
||||
/// without knowing whether the application will be terminated or resumed with the contents
|
||||
/// of memory still intact.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the suspend request.</param>
|
||||
/// <param name="e">Details about the suspend request.</param>
|
||||
private void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
{
|
||||
var deferral = e.SuspendingOperation.GetDeferral();
|
||||
//TODO: Save application state and stop any background activity
|
||||
deferral.Complete();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Configures global logging
|
||||
/// </summary>
|
||||
/// <param name="factory"></param>
|
||||
static void ConfigureFilters(ILoggerFactory factory)
|
||||
{
|
||||
factory
|
||||
.WithFilter(new FilterLoggerSettings
|
||||
{
|
||||
{ "Uno", LogLevel.Warning },
|
||||
{ "Windows", LogLevel.Warning },
|
||||
|
||||
// Debug JS interop
|
||||
// { "Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug },
|
||||
|
||||
// Generic Xaml events
|
||||
// { "Windows.UI.Xaml", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.VisualStateGroup", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.StateTriggerBase", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.UIElement", LogLevel.Debug },
|
||||
|
||||
// Layouter specific messages
|
||||
// { "Windows.UI.Xaml.Controls", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Controls.Layouter", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Controls.Panel", LogLevel.Debug },
|
||||
// { "Windows.Storage", LogLevel.Debug },
|
||||
|
||||
// Binding related messages
|
||||
// { "Windows.UI.Xaml.Data", LogLevel.Debug },
|
||||
|
||||
// DependencyObject memory references tracking
|
||||
// { "ReferenceHolder", LogLevel.Debug },
|
||||
}
|
||||
)
|
||||
#if DEBUG
|
||||
.AddConsole(LogLevel.Debug);
|
||||
#else
|
||||
.AddConsole(LogLevel.Information);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/lockscreenlogo.scale-200.png
Normal file
После Ширина: | Высота: | Размер: 2.2 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/splashscreen.scale-200.png
Normal file
После Ширина: | Высота: | Размер: 38 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/square150x150logo.scale-200.png
Normal file
После Ширина: | Высота: | Размер: 22 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/square44x44logo.scale-200.png
Normal file
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 549 B |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/storelogo.png
Normal file
После Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.Shared/Assets/wide310x150logo.scale-200.png
Normal file
После Ширина: | Высота: | Размер: 22 KiB |
|
@ -0,0 +1,15 @@
|
|||
<Page
|
||||
x:Class="TodoApp.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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"
|
||||
xmlns:controls="using:TodoApp.Shared.Controls"
|
||||
xmlns:viewModels="using:TodoApp.Shared.ViewModels"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.DataContext>
|
||||
<viewModels:MainPageViewModel />
|
||||
</Page.DataContext>
|
||||
|
||||
</Page>
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using TodoApp.Shared.Models;
|
||||
using TodoApp.Shared.ViewModels;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||
|
||||
namespace TodoApp
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class MainPage : Page
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Uno;
|
||||
|
||||
/// 💡 <summary>
|
||||
/// `[GeneratedImmutable]`, `[EqualityKey]` and `[EqualityIgnore]` come from an optional but recommended dependency
|
||||
/// called `Uno.CodeGen` which is a set of tools to generate C# code in msbuild based projects.
|
||||
///
|
||||
/// Features:
|
||||
/// - Amazingly fast: absolutely zero reflection at runtime
|
||||
/// - Generates both.Equals() and.GetHashCode() overrrides
|
||||
/// - Generates equality(== and !=) operators
|
||||
/// - Implements IEquatable<T>
|
||||
/// - Works with derived classes
|
||||
/// - Custom comparers supported
|
||||
/// - Works with collection members(both same order and unsorted equality)
|
||||
/// - Works with dictionary members(both same order and unsorted equality)
|
||||
/// - Optional case insentive comparisons for strings
|
||||
/// - Optional support for KeyEquality(see doc for more details)
|
||||
/// - Debuggable: You can put a breakpoint directly in the generated code
|
||||
/// - Highly configureable: Generated code provides a lot of useful tips(stripped in previous snippet)
|
||||
/// - Documentation here for Equality Members Generator
|
||||
/// </summary>
|
||||
/// 📚 <seealso cref="https://github.com/unoplatform/Uno.CodeGen"/>
|
||||
namespace TodoApp.Shared.Models
|
||||
{
|
||||
[GeneratedImmutable]
|
||||
public partial class State
|
||||
{
|
||||
[EqualityHash]
|
||||
public ImmutableArray<Todo> Todos { get; } = ImmutableArray<Todo>.Empty;
|
||||
|
||||
[EqualityIgnore]
|
||||
public int RemainingTodos => ActiveTodos.Count();
|
||||
|
||||
[EqualityIgnore]
|
||||
public IEnumerable<Todo> ActiveTodos => Todos.Where(t => !t.IsDone);
|
||||
|
||||
[EqualityIgnore]
|
||||
public IEnumerable<Todo> InactiveTodos => Todos.Where(t => t.IsDone);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using Uno;
|
||||
|
||||
/// 💡 <summary>
|
||||
/// [GeneratedImmutable] and [EqualityKey] come from an optional but recommended dependency
|
||||
/// called `Uno.CodeGen` which is a set of tools to generate C# code in msbuild based projects.
|
||||
///
|
||||
/// Features:
|
||||
/// - Amazingly fast: absolutely zero reflection at runtime
|
||||
/// - Generates both.Equals() and.GetHashCode() overrrides
|
||||
/// - Generates equality(== and !=) operators
|
||||
/// - Implements IEquatable<T>
|
||||
/// - Works with derived classes
|
||||
/// - Custom comparers supported
|
||||
/// - Works with collection members(both same order and unsorted equality)
|
||||
/// - Works with dictionary members(both same order and unsorted equality)
|
||||
/// - Optional case insentive comparisons for strings
|
||||
/// - Optional support for KeyEquality(see doc for more details)
|
||||
/// - Debuggable: You can put a breakpoint directly in the generated code
|
||||
/// - Highly configureable: Generated code provides a lot of useful tips(stripped in previous snippet)
|
||||
/// - Documentation here for Equality Members Generator
|
||||
/// </summary>
|
||||
/// 📚 <seealso cref="https://github.com/unoplatform/Uno.CodeGen"/>
|
||||
namespace TodoApp.Shared.Models
|
||||
{
|
||||
[GeneratedImmutable]
|
||||
public partial class Todo
|
||||
{
|
||||
public Todo(string text)
|
||||
{
|
||||
Text = text;
|
||||
}
|
||||
|
||||
[EqualityKey]
|
||||
public Guid Id { get; } = Guid.NewGuid();
|
||||
|
||||
public bool IsDone { get; }
|
||||
|
||||
public string Text { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ApplicationName" xml:space="preserve">
|
||||
<value>TodoApp</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<HasSharedItems>true</HasSharedItems>
|
||||
<SharedGUID>6279c845-92f8-4333-ab99-3d213163593c</SharedGUID>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<Import_RootNamespace>TodoApp.Shared</Import_RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromBooleanToDoubleConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromItemsRemainingToPluralConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Converters\FromItemsRemainingToProgressConverter.cs" />
|
||||
<None Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.md" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.Droid.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.UWP.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Models\State.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Models\Todo.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.WASM.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModels\MainPageViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModels\SimpleCommand.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="$(MSBuildThisFileDirectory)MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Application\Colors.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Application\Converters.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Application\Fonts.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Application\_Application.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\Button.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\Checkbox.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\ListView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\ListViewItem.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\RadioButton.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\TextBlock.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\Controls\_Controls.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Styles\_Styles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-200.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PRIResource Include="$(MSBuildThisFileDirectory)Strings\en\Resources.resw" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="C:\workshops\mastering-uno\solution\TodoApp\TodoApp.Shared\Controls\NativeProgressControl.uwp.xaml.cs">
|
||||
<DependentUpon>NativeProgressControl.uwp.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="C:\workshops\mastering-uno\solution\TodoApp\TodoApp.Shared\Styles\Converters.xaml.cs">
|
||||
<DependentUpon>Converters.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\NativeProgress.iOS.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>6279c845-92f8-4333-ab99-3d213163593c</ProjectGuid>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
||||
<PropertyGroup />
|
||||
<Import Project="TodoApp.Shared.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,145 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Input;
|
||||
using TodoApp.Shared.Models;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace TodoApp.Shared.ViewModels
|
||||
{
|
||||
public class MainPageViewModel : INotifyPropertyChanged
|
||||
{
|
||||
private string _newTodoText;
|
||||
private State _state = State.Default;
|
||||
private int _filter = 0;
|
||||
|
||||
public MainPageViewModel()
|
||||
{
|
||||
CreateNew = new SimpleCommand(ExecuteCreateNew);
|
||||
ViewAll = new SimpleCommand(() => Filter = 0);
|
||||
ViewActive = new SimpleCommand(() => throw new NotImplementedException("🎯 Create a `ICommand` that filters the ViewModel to display only Active todos."));
|
||||
ViewInactive = new SimpleCommand(() => throw new NotImplementedException("🎯 Create a `ICommand` that filters the ViewModel to display only Inactive todos."));
|
||||
}
|
||||
|
||||
public State State
|
||||
{
|
||||
get => _state;
|
||||
private set
|
||||
{
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `State` property also updates the backing property");
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `State` property also invokes `OnPropertyChanged` for `MainPageViewModel` so that databound controls update.");
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `State` property also invokes `OnPropertyChanged` for `MainPageViewModel.Todo` so that databound controls update.");
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility IsEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
if(Todos.Count() == 0)
|
||||
{
|
||||
throw new NotImplementedException("🎯 Ensure that the `IsEmpty` property returns the appropriate `Windows.UI.Xaml.Visibility` so that the majority of databound controls disppear when updated.");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException("🎯 Ensure that the `IsEmpty` property returns the appropriate `Windows.UI.Xaml.Visibility` so that the majority of databound controls appear when updated.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Filter
|
||||
{
|
||||
get => _filter;
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `Filter` property also updates the backing property.");
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `Filter` property also invokes `OnPropertyChanged` for `MainPageViewModel` so that databound controls update.");
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `Filter` property also invokes `OnPropertyChanged` for `MainPageViewModel.Todo` so that databound controls update.");
|
||||
}
|
||||
} // 0-all, 1-active, 2-inactives
|
||||
|
||||
public IEnumerable<Todo> Todos
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Filter)
|
||||
{
|
||||
case 0:
|
||||
throw new NotImplementedException("🎯 Ensure that the `Todos` property returns the appropriate filtered list from `State` when accessed.");
|
||||
case 1:
|
||||
throw new NotImplementedException("🎯 Ensure that the `Todos` property returns the appropriate filtered list from `State` when accessed.");
|
||||
case 2:
|
||||
throw new NotImplementedException("🎯 Ensure that the `Todos` property returns the appropriate filtered list from `State` when accessed.");
|
||||
}
|
||||
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public string NewTodoText
|
||||
{
|
||||
get => _newTodoText;
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `State` property also updates the backing property");
|
||||
throw new NotImplementedException("🎯 Ensure that updating the `State` property also invokes `OnPropertyChanged` for `MainPageViewModel` so that databound controls update.");
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand CreateNew { get; }
|
||||
|
||||
public ICommand ViewAll { get; }
|
||||
public ICommand ViewActive { get; }
|
||||
public ICommand ViewInactive { get; }
|
||||
|
||||
private void ExecuteCreateNew()
|
||||
{
|
||||
var newTodo = new Todo(NewTodoText);
|
||||
State = State.WithTodos(todos => todos.Add(newTodo));
|
||||
NewTodoText = "";
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(IsEmpty));
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public void ChangeState(Todo todo, bool isDone)
|
||||
{
|
||||
State = State.WithTodos(todos =>
|
||||
{
|
||||
var existing = todos.FirstOrDefault(t => t.KeyEquals(todo));
|
||||
Todo newTodo = existing.WithIsDone(isDone);
|
||||
|
||||
return newTodo != existing ? todos.Replace(existing, newTodo) : todos;
|
||||
});
|
||||
}
|
||||
|
||||
public void ChangeText(Todo todo, string newText)
|
||||
{
|
||||
State = State.WithTodos(todos =>
|
||||
{
|
||||
var existing = todos.FirstOrDefault(t => t.KeyEquals(todo));
|
||||
Todo newTodo = existing.WithText(newText);
|
||||
|
||||
throw new NotImplementedException("🎯 Implement `todos.Replace()`");
|
||||
});
|
||||
}
|
||||
|
||||
public void RemoveTodo(Todo todo)
|
||||
{
|
||||
State = State.WithTodos(todos =>
|
||||
{
|
||||
var existing = todos.FirstOrDefault(t => t.KeyEquals(todo));
|
||||
|
||||
throw new NotImplementedException("🎯 Implement `todos.Remove()`");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace TodoApp.Shared.ViewModels
|
||||
{
|
||||
internal class SimpleCommand : ICommand
|
||||
{
|
||||
private readonly Action _action;
|
||||
|
||||
public SimpleCommand(Action action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_action();
|
||||
}
|
||||
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
|
||||
internal class SimpleCommand<T> : ICommand where T : class
|
||||
{
|
||||
private readonly Action<T> _action;
|
||||
|
||||
public SimpleCommand(Action<T> action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
return parameter is T;
|
||||
}
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_action(parameter as T);
|
||||
}
|
||||
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
IgnorableNamespaces="uap mp">
|
||||
|
||||
<Identity
|
||||
Name="67b9a03a-0457-4818-ae91-a00bcc6649ad"
|
||||
Publisher="CN=com.example"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="b247acae-002e-4699-9461-ee95035fc120" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>TodoApp</DisplayName>
|
||||
<PublisherDisplayName>TodoApp</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="TodoApp.exe"
|
||||
EntryPoint="TodoApp.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="TodoApp"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="TodoApp"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
|
@ -0,0 +1,29 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TodoApp.UWP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TodoApp.UWP")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
|
@ -0,0 +1,31 @@
|
|||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All"/>
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<!--
|
||||
If, in the same solution, you are referencing a project that uses https://github.com/onovotny/MSBuildSdkExtras,
|
||||
you need to make sure that the version provided here matches https://github.com/onovotny/MSBuildSdkExtras/blob/master/Source/MSBuild.Sdk.Extras/DefaultItems/ImplicitPackages.targets#L11.
|
||||
This is not an issue when libraries are referenced through nuget packages. See https://github.com/nventive/Uno/issues/446 for more details.
|
||||
-->
|
||||
<Version>6.2.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||
<PackageReference Include="Uno.CodeGen">
|
||||
<Version>1.32.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.Core" Version="1.28.0" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{67B9A03A-0457-4818-AE91-A00BCC6649AD}</ProjectGuid>
|
||||
<OutputType>AppContainerExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TodoApp</RootNamespace>
|
||||
<AssemblyName>TodoApp</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<PackageCertificateKeyFile>TodoApp.Uwp_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
|
||||
<OutputPath>bin\ARM\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<None Include="TodoApp.UWP_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TodoApp.Shared\TodoApp.Shared.projitems" Label="Shared" Condition="Exists('..\TodoApp.Shared\TodoApp.Shared.projitems')" />
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,9 @@
|
|||
<linker>
|
||||
<assembly fullname="TodoApp.Wasm" />
|
||||
<assembly fullname="Uno.UI" />
|
||||
|
||||
<assembly fullname="System.Core">
|
||||
<!-- This is required by JSon.NET and any expression.Compile caller -->
|
||||
<type fullname="System.Linq.Expressions*" />
|
||||
</assembly>
|
||||
</linker>
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace TodoApp.Wasm
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
private static App _app;
|
||||
|
||||
static int Main(string[] args)
|
||||
{
|
||||
Windows.UI.Xaml.Application.Start(_ => _app = new App());
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<WasmHead>true</WasmHead>
|
||||
<DefineConstants>$(DefineConstants);__WASM__</DefineConstants>
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\TodoApp.UWP\Assets\*.png" Link="Assets\%(FileName)%(Extension)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WasmCSS\Fonts.css" />
|
||||
<EmbeddedResource Include="WasmScripts\AppManifest.js" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<LinkerDescriptor Include="LinkerConfig.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!--
|
||||
This item group is required by the project templace because of the
|
||||
new SDK-Style project, otherwise some files are not aded automatically.
|
||||
|
||||
You can safely remove this ItemGroup completely.
|
||||
-->
|
||||
<Compile Remove="Program.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Content Include="LinkerConfig.xml" />
|
||||
<Content Include="wwwroot/web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||
<PackageReference Include="Uno.CodeGen" Version="1.32.0" />
|
||||
<PackageReference Include="Uno.UI" Version="1.45.0" />
|
||||
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.244" />
|
||||
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.0-dev.244" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TodoApp.Shared\TodoApp.Shared.projitems" Label="Shared" Condition="Exists('..\TodoApp.Shared\TodoApp.Shared.projitems')" />
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
var UnoAppManifest = {
|
||||
|
||||
splashScreenImage: "Assets/SplashScreen.scale-200.png",
|
||||
splashScreenColor: "#00f",
|
||||
displayName: "TodoApp"
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<customErrors mode="Off"/>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
|
||||
<!-- Disable compression as we're doing it throuh pre-compressed files -->
|
||||
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
|
||||
|
||||
<staticContent>
|
||||
<remove fileExtension=".dll" />
|
||||
<remove fileExtension=".wasm" />
|
||||
<remove fileExtension=".woff" />
|
||||
<remove fileExtension=".woff2" />
|
||||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||
<mimeMap fileExtension=".clr" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
|
||||
|
||||
<!-- Required for PWAs -->
|
||||
<mimeMap fileExtension=".json" mimeType="application/octet-stream" />
|
||||
</staticContent>
|
||||
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="Lookup for pre-compressed brotli file" stopProcessing="true">
|
||||
<match url="(.*)$"/>
|
||||
<conditions>
|
||||
<!-- Match brotli requests -->
|
||||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="br" />
|
||||
|
||||
<!-- Match all but pre-compressed files -->
|
||||
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_br/)(.*)$" />
|
||||
|
||||
<!-- Check if the pre-compressed file exists on the disk -->
|
||||
<add input="{DOCUMENT_ROOT}/_compressed_br/{C:0}" matchType="IsFile" negate="false" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="/_compressed_br{C:0}" />
|
||||
</rule>
|
||||
|
||||
<rule name="Lookup for pre-compressed gzip file" stopProcessing="true">
|
||||
<match url="(.*)$"/>
|
||||
<conditions>
|
||||
<!-- Match gzip requests -->
|
||||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" />
|
||||
|
||||
<!-- Match all but pre-compressed files -->
|
||||
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_gz/)(.*)$" />
|
||||
|
||||
<!-- Check if the pre-compressed file exists on the disk -->
|
||||
<add input="{DOCUMENT_ROOT}/_compressed_gz/{C:0}" matchType="IsFile" negate="false" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="/_compressed_gz{C:0}" />
|
||||
</rule>
|
||||
</rules>
|
||||
|
||||
<outboundRules>
|
||||
<rule name="Adjust content encoding for gzip pre-compressed files" enabled="true" stopProcessing="true">
|
||||
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_URI}" pattern="/_compressed_gz/.*$" />
|
||||
</conditions>
|
||||
<action type="Rewrite" value="gzip"/>
|
||||
</rule>
|
||||
<rule name="Adjust content encoding for brotli pre-compressed files" enabled="true" stopProcessing="true">
|
||||
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_URI}" pattern="/_compressed_br/.*$" />
|
||||
</conditions>
|
||||
<action type="Rewrite" value="br"/>
|
||||
</rule>
|
||||
</outboundRules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>TodoApp</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.companyname.TodoApp</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.2</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Fonts/winjs-symbols.ttf</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>UILaunchImageMinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>UILaunchImageOrientation</key>
|
||||
<string>Portait</string>
|
||||
<key>UILaunchImageSize</key>
|
||||
<string>{320, 568}</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,15 @@
|
|||
using UIKit;
|
||||
|
||||
namespace TodoApp.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(App));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "iPhone-20x20@2x.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "iPhone-20x20@3x.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "iPhone-40x40@3x.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "iPhone-60x60@2x.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "iPad-76x76@2x.png squaretile-sdk-ipad.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "iPad-84x84@2x.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "ios-marketing-1024x1024@1x.png"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
После Ширина: | Высота: | Размер: 1.2 KiB |
После Ширина: | Высота: | Размер: 1.3 KiB |
После Ширина: | Высота: | Размер: 224 B |
После Ширина: | Высота: | Размер: 308 B |
После Ширина: | Высота: | Размер: 971 B |
После Ширина: | Высота: | Размер: 971 B |
После Ширина: | Высота: | Размер: 11 KiB |
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x",
|
||||
"size": "640x960",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"size": "640x1136",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "1x",
|
||||
"size": "768x1024",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "1x",
|
||||
"size": "1024x768",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x",
|
||||
"size": "1536x2048",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x",
|
||||
"size": "2048x1536",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": ""
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TodoApp.iOS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TodoApp.iOS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("166de4ca-8f11-4ef9-bcf8-3e7834988e7d")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.iOS/Resources/Default-568h@2x.png
Normal file
После Ширина: | Высота: | Размер: 2.2 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.iOS/Resources/Fonts/winjs-symbols.ttf
Normal file
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.iOS/Resources/SplashScreen@2x.png
Normal file
После Ширина: | Высота: | Размер: 36 KiB |
Двоичные данные
uno-bootcamp/modules/03-Let-views-do-views/TodoApp/TodoApp.iOS/Resources/SplashScreen@3x.png
Normal file
После Ширина: | Высота: | Размер: 58 KiB |
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectGuid>{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>TodoApp</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>TodoApp</AssemblyName>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<ResourcesDirectory>..\TodoApp.Shared\Strings</ResourcesDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchExtraArgs>--setenv=MONO_LOG_LEVEL=debug --setenv=MONO_LOG_MASK=gc --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchExtraArgs>--setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchExtraArgs>--setenv=MONO_LOG_LEVEL=debug --setenv=MONO_LOG_MASK=gc --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<MtouchUseLlvm>true</MtouchUseLlvm>
|
||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
<MtouchExtraArgs>--setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<BuildIpa>True</BuildIpa>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
|
||||
<AppExtensionDebugBundleId />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Entitlements.plist" />
|
||||
<BundleResource Include="Resources\SplashScreen%402x.png" />
|
||||
<BundleResource Include="Resources\SplashScreen%403x.png" />
|
||||
<BundleResource Include="Resources\Default-568h%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Fonts\winjs-symbols.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.CodeGen">
|
||||
<Version>1.32.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.UI" Version="1.45.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\ios-marketing-1024x1024%401x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPad-76x76%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPad-84x84%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPhone-20x20%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPhone-20x20%403x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPhone-40x40%403x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iPhone-60x60%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Media.xcassets\LaunchImages.launchimage\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="..\TodoApp.Shared\TodoApp.Shared.projitems" Label="Shared" Condition="Exists('..\TodoApp.Shared\TodoApp.Shared.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
skinparam monochrome true
|
||||
View <--> ViewModel: Data Binding and Commands
|
||||
View <--> ViewModel: Sends Change Notifications
|
||||
ViewModel --> Model: View Model updates the Model
|
||||
ViewModel <-- Model: Sends Change Notifications
|
||||
@enduml
|
После Ширина: | Высота: | Размер: 9.4 KiB |
После Ширина: | Высота: | Размер: 15 KiB |
|
@ -0,0 +1,187 @@
|
|||
# Create rich responsive UIs
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
Until recently, all Windows 10 XAML platform controls were tightly-coupled to the version of the OS run by the user. This meant fixing any bugs related to platform controls would require an update to the user's entire OS.
|
||||
|
||||
The [WinUI](https://aka.ms/winui) library changes this by decoupling the platform controls from the OS and ships independently and in the open on GitHub. With the upcoming WinUI v3.0, the majority of the platform controls will be open-sourced and available to be updated independent of Windows 10. This also allows your app to take fixes for controls while still running on an older OS version and not requiring the user to update their machine to get a bug fix in a control.
|
||||
|
||||
The Uno Platform aggressively fast-follow's the Microsoft Windows and Microsoft WinUI roadmap, as Microsoft adds new controls and public API's they will be added to the Uno Platform either by the team or via community contributions.
|
||||
|
||||
## 💡 XAML Overview
|
||||
|
||||
This workshop assumes pre-existing knowledge of XAML, if you are unfamilar with the topic then there's a [tome of knowledge available from Microsoft](https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/xaml-overview).
|
||||
|
||||
## 💡 XAML with Uno
|
||||
|
||||
If you're an existing UWP XAML developer, you should feel right at home. Uno strives for making sure your existing XAML should just work. Just make sure you're developing a responsive application that works at multiple screen resolutions. Then validate periodically that all your features work in the iOS, Android, and WebAssembly heads of your Uno project.
|
||||
|
||||
There can be times when certain feature aren't yet supported by Uno OR that you want to tailor an experience for a specific platform. In these cases, you can use Conditional XAML to allow you to keep the majority of your application the same, but filter out or change bits and pieces for specific platforms.
|
||||
|
||||
```xml
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Uno.AzureDevOps.Views.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ios="http://uno.ui/ios"
|
||||
xmlns:android="http://uno.ui/android"
|
||||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
mc:Ignorable="ios android">
|
||||
|
||||
<ios:Style x:Key="NativeDefaultFrame"
|
||||
TargetType="Frame">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Frame">
|
||||
<NativeFramePresenter Background="{TemplateBinding Background}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</ios:Style>
|
||||
|
||||
<android:Style x:Key="NativeDefaultFrame"
|
||||
TargetType="Frame">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Frame">
|
||||
<NativeFramePresenter Background="{TemplateBinding Background}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</android:Style>
|
||||
|
||||
```
|
||||
|
||||
There are two code layout techniques that can be used to implement platform-specific code with the Uno Platform:
|
||||
|
||||
1. Place platform-specific code in a file which is only included in the desired `platform head`.
|
||||
2. Use conditionals within a file within the `shared project` to conditionally implement platform-specific code.
|
||||
|
||||
In Visual Studio, a `shared project` is just a list of files. Referencing a `shared project` in an ordinary `.csproj` project causes those files to be included in the project. They're treated in exactly the same way as the files inside the project.
|
||||
|
||||
The Uno Platform provides you with two techniques to conditionally implement platform-specific code within a shared project:
|
||||
|
||||
1. [Platform-specific C# code in Uno][platform-specific-csharp].
|
||||
1. [Platform-specific XAML markup in Uno][platform-specific-xaml].
|
||||
|
||||
## 💡 ValueConverters
|
||||
|
||||
XAML allows us to easily bind our data model to our view. However, the type of data value the view is expecting sometimes doesn't match the type of the data in our model.
|
||||
|
||||
Rather than having to re-work our model, we can create a helper value converter in order to transform the data coming from the model into a type the view can understand.
|
||||
|
||||
To do this we just simply create a class that implements the `IValueConverter` interface.
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using TodoApp.Shared.Models;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
namespace TodoApp.Shared.Converters
|
||||
{
|
||||
public class FromStateItemsRemainingToPluralConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, string language)
|
||||
{
|
||||
if (value is State state)
|
||||
{
|
||||
var amountRemaining = state.RemainingTodos;
|
||||
return amountRemaining == 1 ? $"{amountRemaining} item left" : $"{amountRemaining} items left";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In our page or application resources, we need to instantiate our converter so we can access it as a resource from our XAML bindings:
|
||||
|
||||
```xml
|
||||
<converters:FromStateItemsRemainingToPluralConverter x:Key="FromStateItemsRemainingToPluralConverter" />
|
||||
```
|
||||
|
||||
Now, we can use this converter in our binding within our XAML:
|
||||
|
||||
```xml
|
||||
<TextBlock Text="{Binding State, Converter={StaticResource FromStateItemsRemainingToPluralConverter}}"
|
||||
Grid.Row="1"
|
||||
Padding="0,5,0,0"
|
||||
VerticalAlignment="Center" />
|
||||
```
|
||||
|
||||
This will take our `State` variable from our model and pass it into our converter, which will then return some text for our TextBlock's `Text` property to consume.
|
||||
|
||||
## 💡 Debugging XAML
|
||||
|
||||
Enabling `Show All Files` will show the output from the Uno code generator and UWP XAML code generators.
|
||||
|
||||
![Debugging XAML show all files](debugging-xaml-show-all-files.png)
|
||||
|
||||
By adding the `FeatureConfiguration.UIElement.AssignDOMXamlName = true;` to your WebAssembly application you will see the XAML names directly in the DOM by using the browser F12 tools.
|
||||
|
||||
![Debugging WASM via F12](debugging-wasm-via-f12.png)
|
||||
|
||||
## 🎯 Implement the user interface
|
||||
|
||||
You won't need to implement the datastore or model the entities, that has been done for you.
|
||||
|
||||
1. [ ] Review [TodoApp.Shared/ViewModels/MainPageViewModel.cs][src-viewmodel]
|
||||
1. [ ] Implement [TodoApp/TodoApp.Shared/*.xaml][src-xaml]
|
||||
1. [ ] Implement [TodoApp/TodoApp.Shared/*.xaml.cs][src-xaml-cs]
|
||||
|
||||
## 🎯 Use `VisualBoundsPadding` to manage the notch
|
||||
|
||||
If you run the app on an iPhoneX, You'll see something like this:
|
||||
|
||||
![Problem with the notch](uno-notch-problem.png)
|
||||
|
||||
As you can see, the **TODOS** header is placed under the device notch.
|
||||
|
||||
To fix this problem, Uno offers you a nice tool called the `VisualBoundsPadding`. The goal of this tool is to add padding to content you don't want to be altered by the notch.
|
||||
|
||||
1. Add the namespace declaration `xmlns:toolkit="using:Uno.UI.Toolkit"` to your XAML file
|
||||
1. Add `toolkit:VisibleBoundsPadding.PaddingMask="Top"` to your _Header_ `<Grid>`
|
||||
1. Add `toolkit:VisibleBoundsPadding.PaddingMask="Left,Right"` to your _Content_ `<Grid>`
|
||||
|
||||
The result will look like this and will follow the requirement of the platform vendor:
|
||||
|
||||
![Problem with the notch](uno-notch-fixed.png)
|
||||
|
||||
Finally, add a reference to the `Uno.UI` package in the UWP project to provide a blank implementation of the `VisibleBoundsPadding` service. Alternatively, you could use the `not_win` [conditional XAML compilation prefix][platform-specific-xaml] to exclude `VisibleBoundsPadding` from the UWP head.
|
||||
|
||||
## 📚 Additional Reading Material
|
||||
|
||||
- [VisibleBoundsPadding behavior][docs-visualboundspadding]
|
||||
- https://medium.com/@unoplatform/talkin-bout-my-generation-how-the-uno-platform-generates-code-part-1-under-the-hood-7664d83c4f90
|
||||
- https://platform.uno/docs/articles/implemented/windows-ui-xaml-controls-commandbar.html
|
||||
- https://platform.uno/docs/articles/controls/CommandBar.html
|
||||
|
||||
## ⏭️ What's next
|
||||
|
||||
In [the next module][next-module] you'll learn about the next philosophical tenant — `Native intercompatibility` and create platform native controls then intermix them with WinUI/UWP XAML.
|
||||
|
||||
<!-- in-line links -->
|
||||
[uno-platform]: https://platform.uno/
|
||||
|
||||
[previous-module]: ../03-Let-views-do-views/README.md
|
||||
[next-module]: ../05-Native-intercompatibility/README.md
|
||||
|
||||
[philosophy-of-uno]: https://platform.uno/docs/articles/concepts/overview/philosophy-of-uno.html
|
||||
|
||||
[todomvc]: http://todomvc.com/
|
||||
|
||||
[src-xaml]: TodoApp/TodoApp.Shared/MainPage.xaml
|
||||
[src-xaml-cs]: TodoApp/TodoApp.Shared/MainPage.xaml.cs
|
||||
[src-viewmodel]: TodoApp/TodoApp.Shared/ViewModels/MainPageViewModel.cs
|
||||
|
||||
|
||||
[platform-specific-csharp]: https://platform.uno/docs/articles/platform-specific-csharp.html
|
||||
[platform-specific-xaml]: https://platform.uno/docs/articles/platform-specific-xaml.html
|
||||
|
||||
[docs-visualboundspadding]: https://github.com/unoplatform/uno/blob/master/src/Uno.UI.Toolkit/VisibleBoundsPadding.md
|
|
@ -0,0 +1,269 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.452
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TodoApp.Shared", "TodoApp\TodoApp.Shared\TodoApp.Shared.shproj", "{6279C845-92F8-4333-AB99-3D213163593C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.Droid", "TodoApp\TodoApp.Droid\TodoApp.Droid.csproj", "{88260147-218A-425D-84D2-AD8895F31824}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.iOS", "TodoApp\TodoApp.iOS\TodoApp.iOS.csproj", "{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TodoApp.UWP", "TodoApp\TodoApp.UWP\TodoApp.UWP.csproj", "{67B9A03A-0457-4818-AE91-A00BCC6649AD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Wasm", "TodoApp\TodoApp.Wasm\TodoApp.Wasm.csproj", "{EB416AC1-7C0D-43AD-9658-FA39328B512E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{3fd7c150-f993-49c1-8b80-c7ace61faf25}*SharedItemsImports = 4
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{6279c845-92f8-4333-ab99-3d213163593c}*SharedItemsImports = 13
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{67b9a03a-0457-4818-ae91-a00bcc6649ad}*SharedItemsImports = 4
|
||||
TodoApp\TodoApp.Shared\TodoApp.Shared.projitems*{88260147-218a-425d-84d2-ad8895f31824}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
|
||||
Ad-Hoc|ARM = Ad-Hoc|ARM
|
||||
Ad-Hoc|iPhone = Ad-Hoc|iPhone
|
||||
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
|
||||
Ad-Hoc|x64 = Ad-Hoc|x64
|
||||
Ad-Hoc|x86 = Ad-Hoc|x86
|
||||
AppStore|Any CPU = AppStore|Any CPU
|
||||
AppStore|ARM = AppStore|ARM
|
||||
AppStore|iPhone = AppStore|iPhone
|
||||
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
|
||||
AppStore|x64 = AppStore|x64
|
||||
AppStore|x86 = AppStore|x86
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|iPhone = Release|iPhone
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.AppStore|x86.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|ARM.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhone.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x64.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|ARM.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhone.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x64.Deploy.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.Build.0 = Release|Any CPU
|
||||
{88260147-218A-425D-84D2-AD8895F31824}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|ARM.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|x64.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.AppStore|x86.ActiveCfg = AppStore|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|Any CPU.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{3FD7C150-F993-49C1-8B80-C7ACE61FAF25}.Release|x86.ActiveCfg = Release|iPhone
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhone.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Ad-Hoc|x86.Deploy.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|Any CPU.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhone.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.AppStore|x86.Deploy.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|iPhone.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.Build.0 = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.Build.0 = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.Build.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|iPhone.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|iPhoneSimulator.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.ActiveCfg = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.Build.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x64.Deploy.0 = Release|x64
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.ActiveCfg = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.Build.0 = Release|x86
|
||||
{67B9A03A-0457-4818-AE91-A00BCC6649AD}.Release|x86.Deploy.0 = Release|x86
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EB416AC1-7C0D-43AD-9658-FA39328B512E}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {007C507A-1B6C-4DCC-B1BF-27704584DB79}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,19 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with you package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
Двоичные данные
uno-bootcamp/modules/04-Create-rich-responsive-UIs/TodoApp/TodoApp.Droid/Assets/Fonts/winjs-symbols.ttf
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
using Com.Nostra13.Universalimageloader.Core;
|
||||
|
||||
namespace TodoApp.Droid
|
||||
{
|
||||
[Application(
|
||||
Label = "@string/ApplicationName",
|
||||
LargeHeap = true,
|
||||
HardwareAccelerated = true,
|
||||
Theme = "@style/AppTheme"
|
||||
)]
|
||||
public class Application : NativeApplication
|
||||
{
|
||||
public Application(IntPtr javaReference, JniHandleOwnership transfer)
|
||||
: base(new App(), javaReference, transfer)
|
||||
{
|
||||
ConfigureUniversalImageLoader();
|
||||
}
|
||||
|
||||
private void ConfigureUniversalImageLoader()
|
||||
{
|
||||
// Create global configuration and initialize ImageLoader with this config
|
||||
var config = new ImageLoaderConfiguration.Builder(Context)
|
||||
.Build();
|
||||
|
||||
ImageLoader.Instance.Init(config);
|
||||
|
||||
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Windows.UI.Xaml;
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Views;
|
||||
|
||||
namespace TodoApp.Droid
|
||||
{
|
||||
[Activity(
|
||||
MainLauncher = true,
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize,
|
||||
WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden
|
||||
)]
|
||||
public class MainActivity : ApplicationActivity
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="TodoApp" android:versionCode="1" android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
|
||||
<application android:label="TodoApp"></application>
|
||||
</manifest>
|
|
@ -0,0 +1,28 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TodoApp.Droid")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TodoApp.Droid")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,44 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|