-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
2,683 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 5 additions & 10 deletions
15
Source/CSharpAnalytics/SystemInfo/WindowsPhone81SystemInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/App.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Application | ||
x:Class="CSharpAnalytics.Sample.WindowsPhone81.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:CSharpAnalytics.Sample.WindowsPhone81"> | ||
|
||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.ThemeDictionaries> | ||
<ResourceDictionary x:Key="Default"> | ||
<ImageBrush x:Key="HubBackgroundImageBrush" ImageSource="Assets/HubBackground.png"/> | ||
</ResourceDictionary> | ||
<ResourceDictionary x:Key="HighContrast"> | ||
<ImageBrush x:Key="HubBackgroundImageBrush" ImageSource="{x:Null}"/> | ||
</ResourceDictionary> | ||
</ResourceDictionary.ThemeDictionaries> | ||
|
||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
137 changes: 137 additions & 0 deletions
137
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/App.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
using CSharpAnalytics.Sample.WindowsPhone81.Common; | ||
using System; | ||
using System.Diagnostics; | ||
using Windows.ApplicationModel; | ||
using Windows.ApplicationModel.Activation; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Media.Animation; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
namespace CSharpAnalytics.Sample.WindowsPhone81 | ||
{ | ||
/// <summary> | ||
/// Provides application-specific behavior to supplement the default Application class. | ||
/// </summary> | ||
public sealed partial class App : Application | ||
{ | ||
private TransitionCollection transitions; | ||
|
||
/// <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() | ||
{ | ||
this.InitializeComponent(); | ||
this.Suspending += this.OnSuspending; | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when the application is launched normally by the end user. Other entry points | ||
/// will be used when the application is launched to open a specific file, to display | ||
/// search results, and so forth. | ||
/// </summary> | ||
/// <param name="e">Details about the launch request and process.</param> | ||
protected override async void OnLaunched(LaunchActivatedEventArgs e) | ||
{ | ||
#if DEBUG | ||
if (System.Diagnostics.Debugger.IsAttached) | ||
{ | ||
this.DebugSettings.EnableFrameRateCounter = true; | ||
} | ||
#endif | ||
|
||
Frame rootFrame = 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(); | ||
|
||
// Associate the frame with a SuspensionManager key. | ||
SuspensionManager.RegisterFrame(rootFrame, "AppFrame"); | ||
|
||
// TODO: Change this value to a cache size that is appropriate for your application. | ||
rootFrame.CacheSize = 1; | ||
|
||
// Set the default language | ||
rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; | ||
|
||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) | ||
{ | ||
// Restore the saved session state only when appropriate. | ||
try | ||
{ | ||
await SuspensionManager.RestoreAsync(); | ||
} | ||
catch (SuspensionManagerException) | ||
{ | ||
// Something went wrong restoring state. | ||
// Assume there is no state and continue. | ||
} | ||
} | ||
|
||
// Place the frame in the current Window. | ||
Window.Current.Content = rootFrame; | ||
} | ||
|
||
if (rootFrame.Content == null) | ||
{ | ||
// Removes the turnstile navigation for startup. | ||
if (rootFrame.ContentTransitions != null) | ||
{ | ||
this.transitions = new TransitionCollection(); | ||
foreach (var c in rootFrame.ContentTransitions) | ||
{ | ||
this.transitions.Add(c); | ||
} | ||
} | ||
|
||
rootFrame.ContentTransitions = null; | ||
rootFrame.Navigated += this.RootFrame_FirstNavigated; | ||
|
||
// When the navigation stack isn't restored navigate to the first page, | ||
// configuring the new page by passing required information as a navigation | ||
// parameter. | ||
if (!rootFrame.Navigate(typeof(HubPage), e.Arguments)) | ||
{ | ||
throw new Exception("Failed to create initial page"); | ||
} | ||
|
||
AutoMeasurement.DebugWriter = d => Debug.WriteLine(d); | ||
AutoMeasurement.Start(new MeasurementConfiguration("UA-319000-8"), e); | ||
AutoMeasurement.Attach(rootFrame); | ||
} | ||
|
||
// Ensure the current window is active. | ||
Window.Current.Activate(); | ||
} | ||
|
||
/// <summary> | ||
/// Restores the content transitions after the app has launched. | ||
/// </summary> | ||
private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e) | ||
{ | ||
var rootFrame = sender as Frame; | ||
rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() }; | ||
rootFrame.Navigated -= this.RootFrame_FirstNavigated; | ||
} | ||
|
||
/// <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 async void OnSuspending(object sender, SuspendingEventArgs e) | ||
{ | ||
var deferral = e.SuspendingOperation.GetDeferral(); | ||
await SuspensionManager.SaveAsync(); | ||
deferral.Complete(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+560 Bytes
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/DarkGray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.1 KB
...mples/CSharpAnalytics.Sample.WindowsPhone81/Assets/HubBackground.theme-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+43.8 KB
...ples/CSharpAnalytics.Sample.WindowsPhone81/Assets/HubBackground.theme-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+560 Bytes
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/LightGray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.46 KB
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/Logo.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+561 Bytes
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/MediumGray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+753 Bytes
...ce/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/SmallLogo.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.4 KB
...Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/SplashScreen.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.1 KB
...ples/CSharpAnalytics.Sample.WindowsPhone81/Assets/Square71x71Logo.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...ce/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/StoreLogo.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.42 KB
Source/Samples/CSharpAnalytics.Sample.WindowsPhone81/Assets/WideLogo.scale-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.