Initial commit.
This commit is contained in:
Родитель
eb75ced0b9
Коммит
6b7382dc05
|
@ -0,0 +1,38 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2012 for Windows Phone
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchApp tag maker", "LaunchApp tag maker\LaunchApp tag maker.csproj", "{99101637-73C7-477B-A85A-271B162FEAF2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|x86.Build.0 = Debug|x86
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|ARM.Build.0 = Release|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|x86.ActiveCfg = Release|x86
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|x86.Build.0 = Release|x86
|
||||
{99101637-73C7-477B-A85A-271B162FEAF2}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,20 @@
|
|||
<Application
|
||||
x:Class="LaunchApp_tag_maker.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
|
||||
|
||||
<!--Application Resources-->
|
||||
<Application.Resources>
|
||||
<local:LocalizedStrings xmlns:local="clr-namespace:LaunchApp_tag_maker" x:Key="LocalizedStrings"/>
|
||||
</Application.Resources>
|
||||
|
||||
<Application.ApplicationLifetimeObjects>
|
||||
<!--Required object that handles lifetime events for the application-->
|
||||
<shell:PhoneApplicationService
|
||||
Launching="Application_Launching" Closing="Application_Closing"
|
||||
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
|
||||
</Application.ApplicationLifetimeObjects>
|
||||
|
||||
</Application>
|
|
@ -0,0 +1,223 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Resources;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using LaunchApp_tag_maker.Resources;
|
||||
|
||||
namespace LaunchApp_tag_maker
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides easy access to the root frame of the Phone Application.
|
||||
/// </summary>
|
||||
/// <returns>The root frame of the Phone Application.</returns>
|
||||
public static PhoneApplicationFrame RootFrame { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the Application object.
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
// Global handler for uncaught exceptions.
|
||||
UnhandledException += Application_UnhandledException;
|
||||
|
||||
// Standard XAML initialization
|
||||
InitializeComponent();
|
||||
|
||||
// Phone-specific initialization
|
||||
InitializePhoneApplication();
|
||||
|
||||
// Language display initialization
|
||||
InitializeLanguage();
|
||||
|
||||
// Show graphics profiling information while debugging.
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// Display the current frame rate counters.
|
||||
Application.Current.Host.Settings.EnableFrameRateCounter = true;
|
||||
|
||||
// Show the areas of the app that are being redrawn in each frame.
|
||||
//Application.Current.Host.Settings.EnableRedrawRegions = true;
|
||||
|
||||
// Enable non-production analysis visualization mode,
|
||||
// which shows areas of a page that are handed off to GPU with a colored overlay.
|
||||
//Application.Current.Host.Settings.EnableCacheVisualization = true;
|
||||
|
||||
// Prevent the screen from turning off while under the debugger by disabling
|
||||
// the application's idle detection.
|
||||
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
|
||||
// and consume battery power when the user is not using the phone.
|
||||
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Code to execute when the application is launching (eg, from Start)
|
||||
// This code will not execute when the application is reactivated
|
||||
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is activated (brought to foreground)
|
||||
// This code will not execute when the application is first launched
|
||||
private void Application_Activated(object sender, ActivatedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is deactivated (sent to background)
|
||||
// This code will not execute when the application is closing
|
||||
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is closing (eg, user hit Back)
|
||||
// This code will not execute when the application is deactivated
|
||||
private void Application_Closing(object sender, ClosingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute if a navigation fails
|
||||
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// A navigation has failed; break into the debugger
|
||||
Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
// Code to execute on Unhandled Exceptions
|
||||
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// An unhandled exception has occurred; break into the debugger
|
||||
Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
#region Phone application initialization
|
||||
|
||||
// Avoid double-initialization
|
||||
private bool phoneApplicationInitialized = false;
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void InitializePhoneApplication()
|
||||
{
|
||||
if (phoneApplicationInitialized)
|
||||
return;
|
||||
|
||||
// Create the frame but don't set it as RootVisual yet; this allows the splash
|
||||
// screen to remain active until the application is ready to render.
|
||||
RootFrame = new PhoneApplicationFrame();
|
||||
RootFrame.Navigated += CompleteInitializePhoneApplication;
|
||||
|
||||
// Handle navigation failures
|
||||
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
|
||||
|
||||
// Handle reset requests for clearing the backstack
|
||||
RootFrame.Navigated += CheckForResetNavigation;
|
||||
|
||||
// Ensure we don't initialize again
|
||||
phoneApplicationInitialized = true;
|
||||
}
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Set the root visual to allow the application to render
|
||||
if (RootVisual != RootFrame)
|
||||
RootVisual = RootFrame;
|
||||
|
||||
// Remove this handler since it is no longer needed
|
||||
RootFrame.Navigated -= CompleteInitializePhoneApplication;
|
||||
}
|
||||
|
||||
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// If the app has received a 'reset' navigation, then we need to check
|
||||
// on the next navigation to see if the page stack should be reset
|
||||
if (e.NavigationMode == NavigationMode.Reset)
|
||||
RootFrame.Navigated += ClearBackStackAfterReset;
|
||||
}
|
||||
|
||||
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Unregister the event so it doesn't get called again
|
||||
RootFrame.Navigated -= ClearBackStackAfterReset;
|
||||
|
||||
// Only clear the stack for 'new' (forward) and 'refresh' navigations
|
||||
if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
|
||||
return;
|
||||
|
||||
// For UI consistency, clear the entire page stack
|
||||
while (RootFrame.RemoveBackEntry() != null)
|
||||
{
|
||||
; // do nothing
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Initialize the app's font and flow direction as defined in its localized resource strings.
|
||||
//
|
||||
// To ensure that the font of your application is aligned with its supported languages and that the
|
||||
// FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
|
||||
// and ResourceFlowDirection should be initialized in each resx file to match these values with that
|
||||
// file's culture. For example:
|
||||
//
|
||||
// AppResources.es-ES.resx
|
||||
// ResourceLanguage's value should be "es-ES"
|
||||
// ResourceFlowDirection's value should be "LeftToRight"
|
||||
//
|
||||
// AppResources.ar-SA.resx
|
||||
// ResourceLanguage's value should be "ar-SA"
|
||||
// ResourceFlowDirection's value should be "RightToLeft"
|
||||
//
|
||||
// For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
|
||||
//
|
||||
private void InitializeLanguage()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Set the font to match the display language defined by the
|
||||
// ResourceLanguage resource string for each supported language.
|
||||
//
|
||||
// Fall back to the font of the neutral language if the Display
|
||||
// language of the phone is not supported.
|
||||
//
|
||||
// If a compiler error is hit then ResourceLanguage is missing from
|
||||
// the resource file.
|
||||
RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
|
||||
|
||||
// Set the FlowDirection of all elements under the root frame based
|
||||
// on the ResourceFlowDirection resource string for each
|
||||
// supported language.
|
||||
//
|
||||
// If a compiler error is hit then ResourceFlowDirection is missing from
|
||||
// the resource file.
|
||||
FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
|
||||
RootFrame.FlowDirection = flow;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// If an exception is caught here it is most likely due to either
|
||||
// ResourceLangauge not being correctly set to a supported language
|
||||
// code or ResourceFlowDirection is set to a value other than LeftToRight
|
||||
// or RightToLeft.
|
||||
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
Debugger.Break();
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.1 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.3 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 9.0 KiB |
|
@ -0,0 +1,151 @@
|
|||
<?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>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{99101637-73C7-477B-A85A-271B162FEAF2}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LaunchApp_tag_maker</RootNamespace>
|
||||
<AssemblyName>LaunchApp tag maker</AssemblyName>
|
||||
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>LaunchApp_tag_maker_$(Configuration)_$(Platform).xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>LaunchApp_tag_maker.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\ARM\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\ARM\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WriteLaunchAppTag.xaml.cs">
|
||||
<DependentUpon>WriteLaunchAppTag.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="WriteLaunchAppTag.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\LaunchTag_99x99.png" />
|
||||
<Content Include="Assets\Tiles\LaunchTag_110x110.png" />
|
||||
<Content Include="Assets\Tiles\LaunchTag_202x202.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\AppResources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).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>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
</Project>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<CurrentDeployCmdId>256</CurrentDeployCmdId>
|
||||
<CurrentDeployID>30F105C9-681E-420b-A277-7C086EAD8A4E</CurrentDeployID>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<CurrentDeployCmdId>256</CurrentDeployCmdId>
|
||||
<CurrentDeployID>30F105C9-681E-420b-A277-7C086EAD8A4E</CurrentDeployID>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{C089C8C0-30E0-4E22-80C0-CE093F111A43}">
|
||||
<SilverlightMobileCSProjectFlavor>
|
||||
<FullDeploy>False</FullDeploy>
|
||||
<DebuggerType>Managed</DebuggerType>
|
||||
<DebuggerAgentType>Managed</DebuggerAgentType>
|
||||
<Tombstone>False</Tombstone>
|
||||
</SilverlightMobileCSProjectFlavor>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
using LaunchApp_tag_maker.Resources;
|
||||
|
||||
namespace LaunchApp_tag_maker
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to string resources.
|
||||
/// </summary>
|
||||
public class LocalizedStrings
|
||||
{
|
||||
private static AppResources _localizedResources = new AppResources();
|
||||
|
||||
public AppResources LocalizedResources { get { return _localizedResources; } }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="LaunchApp_tag_maker.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot is the root grid where all page content is placed-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel contains the name of the application and page title-->
|
||||
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="LaunchApp Tag Maker" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
|
||||
<TextBlock Text="Instructions" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - place additional content here-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" TextWrapping="Wrap">
|
||||
<Bold>Welcome to LaunchApp Tag Maker</Bold>
|
||||
<LineBreak/>It allows you to create LaunchApp tag that could launch any apps available on store or installed.
|
||||
<LineBreak/>We provide a list of Nokia apps for you to create tags for demo purpose. If you target for a specific app, then you need to obtain the app id. There are two ways to get the app id:
|
||||
<LineBreak/>1. Visit http://www.windowsphone.com/en-us/store
|
||||
<LineBreak/>2. Go to app list view, long press your app, click "share", choose any email account, and copy the string after "?appid=" from the URL.
|
||||
<LineBreak/>For example, Nokia Music's app id is like below:
|
||||
<LineBreak/>f5874252-1f04-4c3f-a335-4fa3b7b85329
|
||||
<LineBreak/>Once you have the app id, then you can use this app to creata tag for it.
|
||||
<LineBreak/>For more info, please visit http://www.developer.nokia.com/Community/Wiki/How_to_launch_apps_available_in_the_store_using_NFC_LaunchApp_tag#How_to_write_LaunchApp_content_into_a_NFC_tag
|
||||
</TextBlock>
|
||||
<Button Content="Start" Click="StartTagMaking" Grid.Row="1"></Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,35 @@
|
|||
/* created by wenlu
|
||||
* to demonstrate the wiki article http://www.developer.nokia.com/Community/Wiki/How_to_launch_apps_available_in_the_store_using_NFC_LaunchApp_tag#How_to_write_LaunchApp_content_into_a_NFC_tag
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using LaunchApp_tag_maker.Resources;
|
||||
|
||||
namespace LaunchApp_tag_maker
|
||||
{
|
||||
public partial class MainPage : PhoneApplicationPage
|
||||
{
|
||||
// Constructor
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Sample code to localize the ApplicationBar
|
||||
//BuildLocalizedApplicationBar();
|
||||
}
|
||||
|
||||
private void StartTagMaking(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.NavigationService.Navigate(new Uri("/WriteLaunchAppTag.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
>
|
||||
<Deployment.Parts>
|
||||
</Deployment.Parts>
|
||||
</Deployment>
|
|
@ -0,0 +1,37 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// 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("LaunchApp_tag_maker")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LaunchApp_tag_maker")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[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("fcfc3c7c-8b32-48bc-bbf1-e85fc2714021")]
|
||||
|
||||
// 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 Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
|
||||
<DefaultLanguage xmlns="" code="en-US" />
|
||||
<App xmlns="" ProductID="{99101637-73c7-477b-a85a-271b162feaf2}" Title="LaunchApp Tag Maker" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="Wenhui Lu" Description="LaunchApp Tag maker allows you to ceate LaunchApp tag that could launch any apps available on http://www.windowsphone.com/ or apps you installed by youself on the devices." Publisher="LaunchApp_tag_maker" PublisherID="{33e39fa8-ea85-4da3-9727-6ee94b16e9fe}">
|
||||
<IconPath IsRelative="true" IsResource="false">Assets\LaunchTag_99x99.png</IconPath>
|
||||
<Capabilities>
|
||||
<Capability Name="ID_CAP_NETWORKING" />
|
||||
<Capability Name="ID_CAP_MEDIALIB_AUDIO" />
|
||||
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
|
||||
<Capability Name="ID_CAP_SENSORS" />
|
||||
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
|
||||
<Capability Name="ID_CAP_PROXIMITY" />
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="LaunchApp_tag_makerToken" TaskName="_default">
|
||||
<TemplateIconic>
|
||||
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\LaunchTag_110x110.png</SmallImageURI>
|
||||
<Count>0</Count>
|
||||
<IconImageURI IsRelative="true" IsResource="false">Assets\Tiles\LaunchTag_202x202.png</IconImageURI>
|
||||
<Title>LaunchApp Tag Maker</Title>
|
||||
<Message>
|
||||
</Message>
|
||||
<BackgroundColor>
|
||||
</BackgroundColor>
|
||||
<HasLarge>True</HasLarge>
|
||||
<LargeContent1>
|
||||
</LargeContent1>
|
||||
<LargeContent2>
|
||||
</LargeContent2>
|
||||
<LargeContent3>
|
||||
</LargeContent3>
|
||||
<DeviceLockImageURI IsRelative="true" IsResource="false">
|
||||
</DeviceLockImageURI>
|
||||
</TemplateIconic>
|
||||
</PrimaryToken>
|
||||
</Tokens>
|
||||
<ScreenResolutions>
|
||||
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
|
||||
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
|
||||
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
|
||||
</ScreenResolutions>
|
||||
<Requirements>
|
||||
<Requirement Name="ID_REQ_NFC" />
|
||||
</Requirements>
|
||||
</App>
|
||||
</Deployment>
|
|
@ -0,0 +1,127 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17626
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace LaunchApp_tag_maker.Resources
|
||||
{
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class AppResources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal AppResources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (object.ReferenceEquals(resourceMan, null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LaunchApp_tag_maker.Resources.AppResources", typeof(AppResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to LeftToRight.
|
||||
/// </summary>
|
||||
public static string ResourceFlowDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to us-EN.
|
||||
/// </summary>
|
||||
public static string ResourceLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("ResourceLanguage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to MY APPLICATION.
|
||||
/// </summary>
|
||||
public static string ApplicationTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("ApplicationTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to button.
|
||||
/// </summary>
|
||||
public static string AppBarButtonText
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("AppBarButtonText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to menu item.
|
||||
/// </summary>
|
||||
public static string AppBarMenuItemText
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
<?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="ResourceFlowDirection" xml:space="preserve">
|
||||
<value>LeftToRight</value>
|
||||
<comment>Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language</comment>
|
||||
</data>
|
||||
<data name="ResourceLanguage" xml:space="preserve">
|
||||
<value>en-US</value>
|
||||
<comment>Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.</comment>
|
||||
</data>
|
||||
<data name="ApplicationTitle" xml:space="preserve">
|
||||
<value>MY APPLICATION</value>
|
||||
</data>
|
||||
<data name="AppBarButtonText" xml:space="preserve">
|
||||
<value>add</value>
|
||||
</data>
|
||||
<data name="AppBarMenuItemText" xml:space="preserve">
|
||||
<value>Menu Item</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,52 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="LaunchApp_tag_maker.WriteLaunchAppTag"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot is the root grid where all page content is placed-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel contains the name of the application and page title-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="LaunchApp Tag Maker" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="Create Tags" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - place additional content here-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox x:Name="inputText" Grid.Row="0" TextWrapping="Wrap"></TextBox>
|
||||
<Button Content="Write To Tag" Click="WriteToTag" Grid.Row="1"></Button>
|
||||
<Button Content="Tag for Nokia Music" Click="NokiaMusic" Grid.Row="2"></Button>
|
||||
<Button Content="Tag for Nokia Maps" Click="NokiaMaps" Grid.Row="3"></Button>
|
||||
<Button Content="Tag for Nokia TV" Click="NokiaTv" Grid.Row="4"></Button>
|
||||
<Button Content="Tag for Nokia City Lens" Click="NokiaCityLens" Grid.Row="5"></Button>
|
||||
<Button Content="Tag for Nokia Transit" Click="NokiaTransit" Grid.Row="6"></Button>
|
||||
<Button Content="Tag for Current App" Click="CurrentApp" Grid.Row="7"></Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,156 @@
|
|||
/* created by wenlu
|
||||
* to demonstrate the wiki article http://www.developer.nokia.com/Community/Wiki/How_to_launch_apps_available_in_the_store_using_NFC_LaunchApp_tag#How_to_write_LaunchApp_content_into_a_NFC_tag
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using Windows.Networking.Proximity;
|
||||
using Windows.Storage.Streams;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace LaunchApp_tag_maker
|
||||
{
|
||||
public partial class WriteLaunchAppTag : PhoneApplicationPage
|
||||
{
|
||||
private ProximityDevice device = null;
|
||||
private Button pressed;
|
||||
private bool isPublishing = false;
|
||||
private long msgId;
|
||||
private long writableTagId;
|
||||
static Int32 minTagPayloadSize = 128;
|
||||
static string prefix = "user=default\tWindowsPhone\t";
|
||||
static string appIdNokiaMusic = "f5874252-1f04-4c3f-a335-4fa3b7b85329";
|
||||
static string appIdNokiaMaps = "efa4b4a7-7499-46ce-aa95-3e4ab3b39313";
|
||||
static string appIdNokiaTv = "8f592862-8bb5-4391-b6ca-c79730d3f34a";
|
||||
static string appIdNokiaTransit = "adfdad16-b54a-4ec3-b11e-66bd691be4e6";
|
||||
static string appIdNokiaCityLens = "b0a0ac22-cf9e-45ba-8120-815450e2fd71";
|
||||
|
||||
public WriteLaunchAppTag()
|
||||
{
|
||||
InitializeComponent();
|
||||
device = ProximityDevice.GetDefault();
|
||||
writableTagId = device.SubscribeForMessage("WriteableTag", checkWritableTagSize);
|
||||
inputText.Text = appIdNokiaMusic;
|
||||
}
|
||||
|
||||
private void checkWritableTagSize(ProximityDevice sender, ProximityMessage message)
|
||||
{
|
||||
Int32 size= GetInt32FromBuffer(message.Data);
|
||||
if (size < minTagPayloadSize) {
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
MessageBox.Show("The tag size (" + size + "bytes) is too small for LaunchApp tag, you need a tag with payload size >=" + minTagPayloadSize + "bytes");
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void messageTransmittedHandler(ProximityDevice sender, long messageId)
|
||||
{
|
||||
sender.StopPublishingMessage(msgId);
|
||||
isPublishing = false;
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
pressed.IsEnabled = true;
|
||||
MessageBox.Show("The LaunchApp content has been written to the tag");
|
||||
});
|
||||
}
|
||||
|
||||
static public IBuffer GetBufferFromString(string str)
|
||||
{
|
||||
using (var dw = new DataWriter())
|
||||
{
|
||||
dw.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf16LE;
|
||||
dw.WriteString(str);
|
||||
return dw.DetachBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
static public Int32 GetInt32FromBuffer(IBuffer buf)
|
||||
{
|
||||
Int32 ret = 0;
|
||||
using (var dr = DataReader.FromBuffer(buf))
|
||||
{
|
||||
//dr.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf16LE;
|
||||
var bytes = new byte[4];
|
||||
dr.ReadBytes(bytes);
|
||||
ret = BitConverter.ToInt32(bytes, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void WriteToTag(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pressed = sender as Button;
|
||||
pressed.IsEnabled = false;
|
||||
msgId = device.PublishBinaryMessage("LaunchApp:WriteTag", GetBufferFromString(prefix+"{"+inputText.Text+"}"), messageTransmittedHandler);
|
||||
isPublishing = true;
|
||||
}
|
||||
|
||||
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
|
||||
{
|
||||
device.StopPublishingMessage(writableTagId);
|
||||
if (isPublishing)
|
||||
{
|
||||
if (device != null)
|
||||
{
|
||||
device.StopPublishingMessage(msgId);
|
||||
}
|
||||
isPublishing = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void NokiaMusic(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputText.Text = appIdNokiaMusic;
|
||||
}
|
||||
|
||||
private void NokiaMaps(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputText.Text = appIdNokiaMaps;
|
||||
}
|
||||
|
||||
private void NokiaTv(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputText.Text = appIdNokiaTv;
|
||||
}
|
||||
|
||||
private void NokiaCityLens(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputText.Text = appIdNokiaCityLens;
|
||||
}
|
||||
|
||||
private void NokiaTransit(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputText.Text = appIdNokiaTransit;
|
||||
}
|
||||
|
||||
private void CurrentApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//var appId = Windows.ApplicationModel.Store.CurrentApp.AppId;
|
||||
var appId = GetId();
|
||||
inputText.Text = appId.ToString();
|
||||
}
|
||||
|
||||
public static Guid GetId()
|
||||
{
|
||||
Guid applicationId = Guid.Empty;
|
||||
|
||||
var productId = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("ProductID");
|
||||
|
||||
if (productId != null && !string.IsNullOrEmpty(productId.Value))
|
||||
Guid.TryParse(productId.Value, out applicationId);
|
||||
|
||||
return applicationId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
Copyright © 2012-2013 Nokia Corporation. All rights reserved.
|
||||
|
||||
Nokia, Nokia Developer, and HERE are trademarks and/or registered trademarks of
|
||||
Nokia Corporation. Other product and company names mentioned herein may be
|
||||
trademarks or trade names of their respective owners.
|
||||
|
||||
License
|
||||
Subject to the conditions below, you may use, copy, modify and/or merge copies
|
||||
of this software and associated content and documentation files (the “Software”)
|
||||
to test, develop, publish, distribute, sub-license and/or sell new software
|
||||
derived from or incorporating the Software, solely in connection with Nokia
|
||||
devices. Some of the documentation, content and/or software maybe licensed under
|
||||
open source software or other licenses. To the extent such documentation,
|
||||
content and/or software are included, licenses and/or other terms and conditions
|
||||
shall apply in addition and/or instead of this notice. The exact terms of the
|
||||
licenses, disclaimers, acknowledgements and notices are reproduced in the
|
||||
materials provided, or in other obvious locations. No other license to any other
|
||||
intellectual property rights is granted herein.
|
||||
|
||||
This file, unmodified, shall be included with all copies or substantial portions
|
||||
of the Software that are distributed in source code form.
|
||||
|
||||
The Software cannot constitute the primary value of any new software derived
|
||||
from or incorporating the Software.
|
||||
|
||||
Any person dealing with the Software shall not misrepresent the source of the
|
||||
Software.
|
||||
|
||||
Disclaimer
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE, QUALITY AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES (INCLUDING,
|
||||
WITHOUT LIMITATION, DIRECT, SPECIAL, INDIRECT, PUNITIVE, CONSEQUENTIAL,
|
||||
EXEMPLARY AND/ OR INCIDENTAL DAMAGES) OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Nokia Corporation retains the right to make changes to this document at any
|
||||
time, without notice.
|
|
@ -1,4 +1,5 @@
|
|||
launchapp-tag-maker
|
||||
LaunchApp Tag Maker
|
||||
===================
|
||||
|
||||
LaunchApp Tag Maker allows you to ceate NFC tags which can launch any apps available at http://www.windowsphone.com/ or apps that you installed youself.
|
||||
LaunchApp Tag Maker allows you to ceate NFC tags which can launch any apps
|
||||
available at http://www.windowsphone.com/ or apps that you installed youself.
|
||||
|
|
Загрузка…
Ссылка в новой задаче