3. Metro style Apps Desktop Apps
View
XAML HTML / CSS
Controller
C C#
Model
JavaScript HTML C C#
C++ VB JavaScrip
t C++ VB
WinRT APIs
System Services
Communication Graphics & Devices &
& Data Media Printing
Application Model Internet .NET
Explorer
Win32 SL
Kern
Windows Kernel Services
el
14. Metro style app
Language Support
(CLR, WinJS, CRT)
Language Projection
UI Pickers Controls Media Web Host
(HTML, CSS, JavaS
Windows XAML Storage Network … cript))
Metadata &
Namespace
Windows Runtime Core Runtime Broker
Windows Core
15. User Interface
HTML5/CSS XAML DirectX Controls Data Binding
SVG Tiles Input Accessibility Printing
Devices Communications & Data
Sensor
Geolocation Portable NFC Contracts Local & Cloud Storage Web
s
Notifications Streams
Media
Visual Background
Playback Capture PlayTo XML Networking SMS
Effects Transfer
Fundamentals
Application
Threading/Timers Memory Management Authentication Cryptography Globalization
Services
24. Check Get latest Prompt for
license listing data purchase
25.
26.
27. • get get current product
// // current product
•
var var currentProduct = Windows.ApplicationModel.Store.CurrentProduct;
currentProduct = Windows.ApplicationModel.Store.CurrentProductSimulator;
• get get the license information
// // the license information
•
var var licenseInformation = currentProduct.licenseInformation;
licenseInformation = currentProduct.licenseInformation;
• check to see see the the user has active non-trial license
// // check to if if user has an an active non-trial license
• (licenseInformation.isTrial) {
if if (licenseInformation.isTrial) {
• // useruser has trial version the the application
// has trial version of of application
•
} }
28. • // get listing info
• currentProduct.loadListingInformationAsync().then(
• function (listing) {
• var listingInfo = listing;
• });
• var price = listingInfo.formattedPrice;
<ListingInformation>
<Product>
<MarketData xml:lang="en-us">
<Name>Piano</Name>
<Description>Piano Application</Description>
<Price>8.00</Price>
<CurrencySymbol>$</CurrencySymbol>
</MarketData>
</Product>
</ListingInformation>
29. • currentProduct.requestProductPurchaseAsync().then(
• function () {
• // Purchase succeeded
• },
•
• function (err) {
• // Purchase failed
• // Check err to see if user cancelled
•
• });