Skip to content

Commit

Permalink
Updating to use Tempalte10Library. Also updated to have three project…
Browse files Browse the repository at this point in the history
…s (Blank, Min, Sample). Also renamed Full to Experimental and unloaded from solution. Sample still does not build.
  • Loading branch information
JerryNixon committed Jul 2, 2015
1 parent b158eca commit ed3ea44
Show file tree
Hide file tree
Showing 201 changed files with 2,507 additions and 386 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions Services/SecondaryTile/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<common:BootStrapper
x:Class="Template10.App"
xmlns:common="using:Template10.Common"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Template10">

<common:BootStrapper.Resources>
<ResourceDictionary Source="Styles\Custom.xaml" />
</common:BootStrapper.Resources>

</common:BootStrapper>
33 changes: 33 additions & 0 deletions Services/SecondaryTile/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using Template10.Common;
using Windows.ApplicationModel.Activation;

namespace Template10
{
sealed partial class App : Common.BootStrapper
{
public App()
{
InitializeComponent();
}

public override Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Launch)
{
var launchArgs = args as LaunchActivatedEventArgs;
if (launchArgs.TileId != "My2Tile")
{
// start the user experience
NavigationService.Navigate(typeof(Views.MainPage), launchArgs.Arguments);
return Task.FromResult<object>(null);
}
}

// start the user experience
NavigationService.Navigate(typeof(Views.MainPage));
return Task.FromResult<object>(null);
}
}
}
Binary file added Services/SecondaryTile/Blank_TemporaryKey.pfx
Binary file not shown.
42 changes: 42 additions & 0 deletions Services/SecondaryTile/Mvvm/BindableBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Template10.Mvvm
{
public abstract class BindableBase : INotifyPropertyChanged
{
public BindableBase()
{
if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
// default to main dispatcher, developer must change when in diff UI thread
this.Dispatch = (App.Current as Common.BootStrapper).Dispatch;
}
}

public Action<Action> Dispatch { get; set; }
public event PropertyChangedEventHandler PropertyChanged;

public void RaisePropertyChanged([CallerMemberName]string propertyName = null)
{
if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
return;
Dispatch(() =>
{
(App.Current as Common.BootStrapper).Dispatch(() =>
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
});
});
}

public void Set<T>(ref T storage, T value, [CallerMemberName()]string propertyName = null)
{
if (object.Equals(storage, value))
return;
storage = value;
RaisePropertyChanged(propertyName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ namespace Template10.Mvvm
// http://codepaste.net/jgxazh
using System.Diagnostics;

public class Command : System.Windows.Input.ICommand
public class DelegateCommand : System.Windows.Input.ICommand
{
private readonly Action _execute;
private readonly Func<bool> _canExecute;
public event EventHandler CanExecuteChanged;

public Command(Action execute, Func<bool> canexecute = null)
public DelegateCommand(Action execute, Func<bool> canexecute = null)
{
if (execute == null)
throw new ArgumentNullException("execute");
Expand Down
24 changes: 24 additions & 0 deletions Services/SecondaryTile/Mvvm/ViewModelBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Template10.Services.NavigationService;
using Windows.UI.Xaml.Navigation;

namespace Template10.Mvvm
{
public abstract class ViewModelBase : BindableBase, Services.NavigationService.INavigable
{
public ViewModelBase()
{
if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
this.NavigationService = (App.Current as Common.BootStrapper).NavigationService;
}
}
public string ViewModelIdentifier { get; set; }
public NavigationService NavigationService { get; private set; }
public virtual void OnNavigatedTo(string parameter, NavigationMode mode, IDictionary<string, object> state) { /* nothing by default */ }
public virtual Task OnNavigatedFromAsync(IDictionary<string, object> state, bool suspending) { return Task.FromResult<object>(null); }
public virtual void OnNavigatingFrom(Services.NavigationService.NavigatingEventArgs args) { /* nothing by default */ }
}
}
48 changes: 48 additions & 0 deletions Services/SecondaryTile/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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="4a242f60-f709-4ae6-9032-0afe709f69c7"
Publisher="CN=Jerry"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="4a242f60-f709-4ae6-9032-0afe709f69c7" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Blank</DisplayName>
<PublisherDisplayName>Jerry</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="Blank.App">
<uap:VisualElements
DisplayName="Blank"
Square150x150Logo="Assets\Logo.png"
Square44x44Logo="Assets\SmallLogo.png"
Description="Blank"
BackgroundColor="#464646">
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
29 changes: 29 additions & 0 deletions Services/SecondaryTile/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("Blank1")]
[assembly: AssemblyDescription("Template 10")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Blank1")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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)]
31 changes: 31 additions & 0 deletions Services/SecondaryTile/Properties/Default.rd.xml
Original file line number Diff line number Diff line change
@@ -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>
Loading

0 comments on commit ed3ea44

Please sign in to comment.