commit 371685b4255642179b33f6b3bcc6da8ec4906239 Author: Tobias Klika Date: Fri Jan 15 16:48:47 2016 +0100 initial commit; add PointerButton project diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1e58772 --- /dev/null +++ b/.gitignore @@ -0,0 +1,171 @@ +## Ignore Visual Studio temporary files, build results, and files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# configuration +Web.Release.config +Web.Debug.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Performance Logs +*.sap +SubmissionInfo/ +PerfLogs/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +*.nupkg + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +.sass-cache +node_modules +*.[L|l]og +tmp +_old +_tmp +Gemfile.lock +WebWorkbench.mswwsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +# ========================= +# Project +# ========================= +/Resources/ \ No newline at end of file diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..9ac6cfe --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2016 cee, Tobias Klika + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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 AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, 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. diff --git a/PointerButton/PointerButton.sln b/PointerButton/PointerButton.sln new file mode 100644 index 0000000..bbfafc7 --- /dev/null +++ b/PointerButton/PointerButton.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PointerButton", "PointerButton\PointerButton.csproj", "{1738DF10-3A86-4B38-B598-1EB1EF221F1F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|ARM.ActiveCfg = Debug|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|ARM.Build.0 = Debug|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|ARM.Deploy.0 = Debug|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x64.ActiveCfg = Debug|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x64.Build.0 = Debug|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x64.Deploy.0 = Debug|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x86.ActiveCfg = Debug|x86 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x86.Build.0 = Debug|x86 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Debug|x86.Deploy.0 = Debug|x86 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|ARM.ActiveCfg = Release|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|ARM.Build.0 = Release|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|ARM.Deploy.0 = Release|ARM + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x64.ActiveCfg = Release|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x64.Build.0 = Release|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x64.Deploy.0 = Release|x64 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x86.ActiveCfg = Release|x86 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x86.Build.0 = Release|x86 + {1738DF10-3A86-4B38-B598-1EB1EF221F1F}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PointerButton/PointerButton/App.xaml b/PointerButton/PointerButton/App.xaml new file mode 100644 index 0000000..0c8a8da --- /dev/null +++ b/PointerButton/PointerButton/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/PointerButton/PointerButton/App.xaml.cs b/PointerButton/PointerButton/App.xaml.cs new file mode 100644 index 0000000..a89a2cc --- /dev/null +++ b/PointerButton/PointerButton/App.xaml.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +namespace PointerButton +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// 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(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override 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(); + + rootFrame.NavigationFailed += OnNavigationFailed; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + // Ensure the current window is active + Window.Current.Activate(); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// 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. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} diff --git a/PointerButton/PointerButton/Assets/LockScreenLogo.scale-200.png b/PointerButton/PointerButton/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..735f57a Binary files /dev/null and b/PointerButton/PointerButton/Assets/LockScreenLogo.scale-200.png differ diff --git a/PointerButton/PointerButton/Assets/SplashScreen.scale-200.png b/PointerButton/PointerButton/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..023e7f1 Binary files /dev/null and b/PointerButton/PointerButton/Assets/SplashScreen.scale-200.png differ diff --git a/PointerButton/PointerButton/Assets/Square150x150Logo.scale-200.png b/PointerButton/PointerButton/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..af49fec Binary files /dev/null and b/PointerButton/PointerButton/Assets/Square150x150Logo.scale-200.png differ diff --git a/PointerButton/PointerButton/Assets/Square44x44Logo.scale-200.png b/PointerButton/PointerButton/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..ce342a2 Binary files /dev/null and b/PointerButton/PointerButton/Assets/Square44x44Logo.scale-200.png differ diff --git a/PointerButton/PointerButton/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/PointerButton/PointerButton/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..f6c02ce Binary files /dev/null and b/PointerButton/PointerButton/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/PointerButton/PointerButton/Assets/StoreLogo.png b/PointerButton/PointerButton/Assets/StoreLogo.png new file mode 100644 index 0000000..7385b56 Binary files /dev/null and b/PointerButton/PointerButton/Assets/StoreLogo.png differ diff --git a/PointerButton/PointerButton/Assets/Wide310x150Logo.scale-200.png b/PointerButton/PointerButton/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..288995b Binary files /dev/null and b/PointerButton/PointerButton/Assets/Wide310x150Logo.scale-200.png differ diff --git a/PointerButton/PointerButton/MainPage.xaml b/PointerButton/PointerButton/MainPage.xaml new file mode 100644 index 0000000..6422522 --- /dev/null +++ b/PointerButton/PointerButton/MainPage.xaml @@ -0,0 +1,21 @@ + + + + + + + +