add lens extension
This commit is contained in:
@@ -243,6 +243,9 @@ namespace CampusAppWP8
|
||||
// Behandeln Sie Rücksetzanforderungen zum Löschen des Backstack
|
||||
RootFrame.Navigated += CheckForResetNavigation;
|
||||
|
||||
// Assign the lens example URI-mapper class to the application frame.
|
||||
RootFrame.UriMapper = new AppUriMapper();
|
||||
|
||||
// Sicherstellen, dass keine erneute Initialisierung erfolgt
|
||||
phoneApplicationInitialized = true;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-720p.png
Normal file
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-720p.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-WVGA.png
Normal file
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-WVGA.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-WXGA.png
Normal file
BIN
CampusAppWP8/CampusAppWP8/Assets/Lens.Screen-WXGA.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -156,6 +156,7 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\AppUriMapper.cs" />
|
||||
<Compile Include="Utility\BackgroundTasks.cs" />
|
||||
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
|
||||
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
|
||||
@@ -496,6 +497,9 @@
|
||||
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\update_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
|
||||
<Content Include="Assets\Lens.Screen-720p.png" />
|
||||
<Content Include="Assets\Lens.Screen-WVGA.png" />
|
||||
<Content Include="Assets\Lens.Screen-WXGA.png" />
|
||||
<Content Include="Assets\testmap.png" />
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
using Windows.Networking.Proximity;
|
||||
using CampusAppWP8.File.Places;
|
||||
using System.Windows.Controls;
|
||||
using System.ComponentModel;
|
||||
|
||||
/// <summary>Class for the campusMap page.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CampusAppWP8.Pages.Dev
|
||||
using Microsoft.Devices;
|
||||
using Microsoft.Phone.Controls;
|
||||
using ZXing;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// QR Code scanner.
|
||||
@@ -85,7 +86,6 @@ namespace CampusAppWP8.Pages.Dev
|
||||
this.bit = new WriteableBitmap((int)this.cam.PreviewResolution.Width, (int)this.cam.PreviewResolution.Height);
|
||||
|
||||
this.camViewBrush.SetSource(this.cam);
|
||||
this.isInAutofocus = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -219,8 +219,20 @@ namespace CampusAppWP8.Pages.Dev
|
||||
{
|
||||
if (this.ResultAppStoreKey != null)
|
||||
{
|
||||
App.SaveToIsolatedStorage(this.ResultAppStoreKey, result.Text);
|
||||
NavigationService.GoBack();
|
||||
|
||||
if (NavigationService.CanGoBack)
|
||||
{
|
||||
App.SaveToIsolatedStorage(this.ResultAppStoreKey, result.Text);
|
||||
NavigationService.GoBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
string pid = Wp8StringManager.FilterPlaceIdinQRResultString(result.Text);
|
||||
string urlString = Constants.PathCampusmap_Campusmap;
|
||||
urlString += "?" + Constants.ParamModelMap_SearchTermAlias + "=" + pid;
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
|
||||
<DefaultLanguage xmlns="" code="de-DE" />
|
||||
<App xmlns="" ProductID="{120b88cc-f3f0-4c5a-a3fd-c26e835338cc}" Title="CampusAppWP8" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="CampusAppWP8 author" Description="Die BTU-CampusApp für WP8" Publisher="CampusAppWP8" PublisherID="{3511cc48-91b0-4ffb-9023-b69a81021a46}">
|
||||
<IconPath IsRelative="true" IsResource="false">Assets\Tiles\kachel_small.png</IconPath>
|
||||
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
|
||||
<Capabilities>
|
||||
<Capability Name="ID_CAP_NETWORKING" />
|
||||
<Capability Name="ID_CAP_SENSORS" />
|
||||
@@ -22,27 +22,30 @@
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="CampusAppWP8Token" TaskName="_default">
|
||||
<TemplateFlip>
|
||||
<TemplateIconic>
|
||||
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\kachel_small.png</SmallImageURI>
|
||||
<Count>0</Count>
|
||||
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\kachel_medium.png</BackgroundImageURI>
|
||||
<Title>CampusAppWP8</Title>
|
||||
<BackContent>
|
||||
</BackContent>
|
||||
<BackBackgroundImageURI>
|
||||
</BackBackgroundImageURI>
|
||||
<BackTitle>
|
||||
</BackTitle>
|
||||
<LargeBackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\kachel_large.png</LargeBackgroundImageURI>
|
||||
<LargeBackContent />
|
||||
<LargeBackBackgroundImageURI IsRelative="true" IsResource="false">
|
||||
</LargeBackBackgroundImageURI>
|
||||
<DeviceLockImageURI>
|
||||
</DeviceLockImageURI>
|
||||
<IconImageURI IsRelative="true" IsResource="false">Assets\Tiles\kachel_medium.png</IconImageURI>
|
||||
<Title>BTU-CampusAp</Title>
|
||||
<Message>
|
||||
</Message>
|
||||
<BackgroundColor>
|
||||
</BackgroundColor>
|
||||
<HasLarge>True</HasLarge>
|
||||
</TemplateFlip>
|
||||
<LargeContent1>
|
||||
</LargeContent1>
|
||||
<LargeContent2>
|
||||
</LargeContent2>
|
||||
<LargeContent3>
|
||||
</LargeContent3>
|
||||
<DeviceLockImageURI IsRelative="true" IsResource="false">
|
||||
</DeviceLockImageURI>
|
||||
</TemplateIconic>
|
||||
</PrimaryToken>
|
||||
</Tokens>
|
||||
<Extensions>
|
||||
<Extension ExtensionName="Camera_Capture_App" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5631}" TaskID="_default" />
|
||||
</Extensions>
|
||||
<ScreenResolutions>
|
||||
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
|
||||
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
|
||||
|
||||
@@ -537,4 +537,7 @@
|
||||
<data name="PisInformationName_Accesbility" xml:space="preserve">
|
||||
<value>Barrierefreiheit</value>
|
||||
</data>
|
||||
<data name="PathApp_StartPage" xml:space="preserve">
|
||||
<value>/Pages/StartPage.xaml</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -699,6 +699,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/StartPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
public static string PathApp_StartPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathApp_StartPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Campusmap/CampusMapPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
|
||||
33
CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs
Normal file
33
CampusAppWP8/CampusAppWP8/Utility/AppUriMapper.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using CampusAppWP8.Resources;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
public class AppUriMapper : UriMapperBase
|
||||
{
|
||||
private string tempUri;
|
||||
|
||||
public override Uri MapUri(Uri uri)
|
||||
{
|
||||
tempUri = uri.ToString();
|
||||
|
||||
// Look for a URI from the lens picker.
|
||||
if (tempUri.Contains("ViewfinderLaunch"))
|
||||
{
|
||||
// Launch as a lens, launch viewfinder screen.
|
||||
tempUri = Constants.PathQR_QRPage;
|
||||
tempUri += "?" + Constants.ParamQRResultKey + "=" + Constants.CampusMapApp_QRCodeSearchResultStorageKey;
|
||||
Uri url = new Uri(tempUri as string, UriKind.Relative);
|
||||
return new Uri(tempUri, UriKind.Relative);
|
||||
}
|
||||
|
||||
// Otherwise perform normal launch.
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user