Skip to content

Commit a2d172e

Browse files
committed
Initial demo commit removed the store association stuff
Signed-off-by: Richard Conway <[email protected]>
1 parent 5a4b298 commit a2d172e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4796
-0
lines changed

.gitignore

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
44+
# Build results
45+
[Dd]ebug/
46+
[Rr]elease/
47+
*_i.c
48+
*_p.c
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.vspscc
63+
.builds
64+
*.dotCover
65+
66+
## TODO: If you have NuGet Package Restore enabled, uncomment this
67+
#packages/
68+
69+
# Visual C++ cache files
70+
ipch/
71+
*.aps
72+
*.ncb
73+
*.opensdf
74+
*.sdf
75+
76+
# Visual Studio profiler
77+
*.psess
78+
*.vsp
79+
80+
# ReSharper is a .NET coding add-in
81+
_ReSharper*
82+
83+
# Installshield output folder
84+
[Ee]xpress
85+
86+
# DocProject is a documentation generator add-in
87+
DocProject/buildhelp/
88+
DocProject/Help/*.HxT
89+
DocProject/Help/*.HxC
90+
DocProject/Help/*.hhc
91+
DocProject/Help/*.hhk
92+
DocProject/Help/*.hhp
93+
DocProject/Help/Html2
94+
DocProject/Help/html
95+
96+
# Click-Once directory
97+
publish
98+
99+
# Others
100+
[Bb]in
101+
[Oo]bj
102+
sql
103+
TestResults
104+
*.Cache
105+
ClientBin
106+
stylecop.*
107+
~$*
108+
*.dbmdl
109+
Generated_Code #added for RIA/Silverlight projects
110+
111+
# Backup & report files from converting an old project file to a newer
112+
# Visual Studio version. Backup files are not needed, because we have git ;-)
113+
_UpgradeReport_Files/
114+
Backup*/
115+
UpgradeLog*.XML
116+
117+
118+
119+
############
120+
## Windows
121+
############
122+
123+
# Windows image file caches
124+
Thumbs.db
125+
126+
# Folder config file
127+
Desktop.ini
128+
129+
130+
#############
131+
## Python
132+
#############
133+
134+
*.py[co]
135+
136+
# Packages
137+
*.egg
138+
*.egg-info
139+
dist
140+
build
141+
eggs
142+
parts
143+
bin
144+
var
145+
sdist
146+
develop-eggs
147+
.installed.cfg
148+
149+
# Installer logs
150+
pip-log.txt
151+
152+
# Unit test / coverage reports
153+
.coverage
154+
.tox
155+
156+
#Translations
157+
*.mo
158+
159+
#Mr Developer
160+
.mr.developer.cfg
161+
162+
# Mac crap
163+
.DS_Store

SixStepsVoteApp.sln

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SixStepsVoteApp", "SixStepsVoteApp\SixStepsVoteApp.csproj", "{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Debug|ARM = Debug|ARM
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|Any CPU = Release|Any CPU
13+
Release|ARM = Release|ARM
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
21+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|ARM.ActiveCfg = Debug|ARM
22+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|ARM.Build.0 = Debug|ARM
23+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|ARM.Deploy.0 = Debug|ARM
24+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x64.ActiveCfg = Debug|x64
25+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x64.Build.0 = Debug|x64
26+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x64.Deploy.0 = Debug|x64
27+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x86.ActiveCfg = Debug|x86
28+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x86.Build.0 = Debug|x86
29+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Debug|x86.Deploy.0 = Debug|x86
30+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|Any CPU.Deploy.0 = Release|Any CPU
33+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|ARM.ActiveCfg = Release|ARM
34+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|ARM.Build.0 = Release|ARM
35+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|ARM.Deploy.0 = Release|ARM
36+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x64.ActiveCfg = Release|x64
37+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x64.Build.0 = Release|x64
38+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x64.Deploy.0 = Release|x64
39+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x86.ActiveCfg = Release|x86
40+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x86.Build.0 = Release|x86
41+
{81711922-C8DE-4ECA-A096-5FFA0F1BCA96}.Release|x86.Deploy.0 = Release|x86
42+
EndGlobalSection
43+
GlobalSection(SolutionProperties) = preSolution
44+
HideSolutionNode = FALSE
45+
EndGlobalSection
46+
EndGlobal

SixStepsVoteApp/App.xaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Application
2+
x:Class="SixStepsVoteApp.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:SixStepsVoteApp">
6+
7+
<Application.Resources>
8+
<ResourceDictionary>
9+
<ResourceDictionary.MergedDictionaries>
10+
11+
<!--
12+
Styles that define common aspects of the platform look and feel
13+
Required by Visual Studio project and item templates
14+
-->
15+
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
16+
</ResourceDictionary.MergedDictionaries>
17+
18+
</ResourceDictionary>
19+
</Application.Resources>
20+
</Application>

SixStepsVoteApp/App.xaml.cs

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using Microsoft.WindowsAzure.MobileServices;
6+
using Windows.ApplicationModel;
7+
using Windows.ApplicationModel.Activation;
8+
using Windows.Foundation;
9+
using Windows.Foundation.Collections;
10+
using Windows.UI.Xaml;
11+
using Windows.UI.Xaml.Controls;
12+
using Windows.UI.Xaml.Controls.Primitives;
13+
using Windows.UI.Xaml.Data;
14+
using Windows.UI.Xaml.Input;
15+
using Windows.UI.Xaml.Media;
16+
using Windows.UI.Xaml.Navigation;
17+
18+
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
19+
20+
namespace SixStepsVoteApp
21+
{
22+
/// <summary>
23+
/// Provides application-specific behavior to supplement the default Application class.
24+
/// </summary>
25+
sealed partial class App : Application
26+
{
27+
public static MobileServiceClient MobileService = new MobileServiceClient(
28+
"https://uk6stepsmobiledemo.azure-mobile.net",
29+
"rnZhhhbkHSbKqVKufaZQIboOzczZrT78");
30+
/// <summary>
31+
/// Initializes the singleton application object. This is the first line of authored code
32+
/// executed, and as such is the logical equivalent of main() or WinMain().
33+
/// </summary>
34+
public App()
35+
{
36+
this.InitializeComponent();
37+
this.Suspending += OnSuspending;
38+
}
39+
40+
/// <summary>
41+
/// Invoked when the application is launched normally by the end user. Other entry points
42+
/// will be used when the application is launched to open a specific file, to display
43+
/// search results, and so forth.
44+
/// </summary>
45+
/// <param name="args">Details about the launch request and process.</param>
46+
protected override void OnLaunched(LaunchActivatedEventArgs args)
47+
{
48+
Frame rootFrame = Window.Current.Content as Frame;
49+
50+
// Do not repeat app initialization when the Window already has content,
51+
// just ensure that the window is active
52+
if (rootFrame == null)
53+
{
54+
// Create a Frame to act as the navigation context and navigate to the first page
55+
rootFrame = new Frame();
56+
57+
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
58+
{
59+
//TODO: Load state from previously suspended application
60+
}
61+
62+
// Place the frame in the current Window
63+
Window.Current.Content = rootFrame;
64+
}
65+
66+
if (rootFrame.Content == null)
67+
{
68+
// When the navigation stack isn't restored navigate to the first page,
69+
// configuring the new page by passing required information as a navigation
70+
// parameter
71+
if (!rootFrame.Navigate(typeof(EventList), args.Arguments))
72+
{
73+
throw new Exception("Failed to create initial page");
74+
}
75+
}
76+
// Ensure the current window is active
77+
Window.Current.Activate();
78+
}
79+
80+
/// <summary>
81+
/// Invoked when application execution is being suspended. Application state is saved
82+
/// without knowing whether the application will be terminated or resumed with the contents
83+
/// of memory still intact.
84+
/// </summary>
85+
/// <param name="sender">The source of the suspend request.</param>
86+
/// <param name="e">Details about the suspend request.</param>
87+
private void OnSuspending(object sender, SuspendingEventArgs e)
88+
{
89+
var deferral = e.SuspendingOperation.GetDeferral();
90+
//TODO: Save application state and stop any background activity
91+
deferral.Complete();
92+
}
93+
}
94+
}

SixStepsVoteApp/Assets/Badge.png

1.17 KB
Loading

SixStepsVoteApp/Assets/Logo.png

20.8 KB
Loading

SixStepsVoteApp/Assets/SmallLogo.png

329 Bytes
Loading
2.1 KB
Loading

SixStepsVoteApp/Assets/StoreLogo.png

429 Bytes
Loading

SixStepsVoteApp/Assets/uklogo.jpg

20.1 KB
Loading
31 KB
Loading
12.9 KB
Loading
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.ComponentModel;
3+
using System.Runtime.CompilerServices;
4+
using Windows.UI.Xaml.Data;
5+
6+
namespace SixStepsVoteApp.Common
7+
{
8+
/// <summary>
9+
/// Implementation of <see cref="INotifyPropertyChanged"/> to simplify models.
10+
/// </summary>
11+
[Windows.Foundation.Metadata.WebHostHidden]
12+
public abstract class BindableBase : INotifyPropertyChanged
13+
{
14+
/// <summary>
15+
/// Multicast event for property change notifications.
16+
/// </summary>
17+
public event PropertyChangedEventHandler PropertyChanged;
18+
19+
/// <summary>
20+
/// Checks if a property already matches a desired value. Sets the property and
21+
/// notifies listeners only when necessary.
22+
/// </summary>
23+
/// <typeparam name="T">Type of the property.</typeparam>
24+
/// <param name="storage">Reference to a property with both getter and setter.</param>
25+
/// <param name="value">Desired value for the property.</param>
26+
/// <param name="propertyName">Name of the property used to notify listeners. This
27+
/// value is optional and can be provided automatically when invoked from compilers that
28+
/// support CallerMemberName.</param>
29+
/// <returns>True if the value was changed, false if the existing value matched the
30+
/// desired value.</returns>
31+
protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] String propertyName = null)
32+
{
33+
if (object.Equals(storage, value)) return false;
34+
35+
storage = value;
36+
this.OnPropertyChanged(propertyName);
37+
return true;
38+
}
39+
40+
/// <summary>
41+
/// Notifies listeners that a property value has changed.
42+
/// </summary>
43+
/// <param name="propertyName">Name of the property used to notify listeners. This
44+
/// value is optional and can be provided automatically when invoked from compilers
45+
/// that support <see cref="CallerMemberNameAttribute"/>.</param>
46+
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
47+
{
48+
var eventHandler = this.PropertyChanged;
49+
if (eventHandler != null)
50+
{
51+
eventHandler(this, new PropertyChangedEventArgs(propertyName));
52+
}
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)