Browse Source

Update Tasks to AMA 3.0 & MVVM Binding :)

James Montemagno 9 years ago
parent
commit
b33c1d5512
27 changed files with 979 additions and 886 deletions
  1. 35 22
      Demos/app-tasks/DevDaysTasks.Droid/DevDaysTasks.Droid.csproj
  2. 2 4
      Demos/app-tasks/DevDaysTasks.Droid/MainActivity.cs
  3. 8 0
      Demos/app-tasks/DevDaysTasks.Droid/app.config
  4. 8 4
      Demos/app-tasks/DevDaysTasks.Droid/packages.config
  5. 0 0
      Demos/app-tasks/DevDaysTasks.Shared/App.cs
  6. 26 0
      Demos/app-tasks/DevDaysTasks.Shared/DevDaysTasks.Shared.projitems
  7. 13 0
      Demos/app-tasks/DevDaysTasks.Shared/DevDaysTasks.shproj
  8. 2 2
      Demos/app-tasks/DevDaysTasks.Shared/Helpers/Constants.cs
  9. 0 0
      Demos/app-tasks/DevDaysTasks.Shared/Model/TodoItem.cs
  10. 46 25
      Demos/app-tasks/DevDaysTasks.Shared/Services/TodoItemManager.cs
  11. 100 0
      Demos/app-tasks/DevDaysTasks.Shared/ViewModel/TodoListViewModel.cs
  12. 14 12
      Demos/app-tasks/DevDaysTasks.Shared/Views/TodoList.xaml
  13. 58 0
      Demos/app-tasks/DevDaysTasks.Shared/Views/TodoList.xaml.cs
  14. 1 11
      Demos/app-tasks/DevDaysTasks.UWP/DevDaysTasks.UWP.csproj
  15. 2 1
      Demos/app-tasks/DevDaysTasks.UWP/DevDaysTasks.UWP.nuget.targets
  16. 5 5
      Demos/app-tasks/DevDaysTasks.UWP/project.json
  17. 600 434
      Demos/app-tasks/DevDaysTasks.UWP/project.lock.json
  18. 0 6
      Demos/app-tasks/DevDaysTasks.iOS/AppDelegate.cs
  19. 31 23
      Demos/app-tasks/DevDaysTasks.iOS/DevDaysTasks.iOS.csproj
  20. 8 0
      Demos/app-tasks/DevDaysTasks.iOS/app.config
  21. 7 4
      Demos/app-tasks/DevDaysTasks.iOS/packages.config
  22. 13 22
      Demos/app-tasks/DevDaysTasks.sln
  23. 0 104
      Demos/app-tasks/DevDaysTasks/DevDaysTasks.csproj
  24. 0 29
      Demos/app-tasks/DevDaysTasks/Properties/AssemblyInfo.cs
  25. 0 157
      Demos/app-tasks/DevDaysTasks/Views/TodoList.xaml.cs
  26. 0 11
      Demos/app-tasks/DevDaysTasks/packages.config
  27. 0 10
      Demos/app-tasks/README.md

+ 35 - 22
Demos/app-tasks/DevDaysTasks.Droid/DevDaysTasks.Droid.csproj

@@ -52,22 +52,24 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
       <Private>True</Private>
     </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.2.1.0\lib\monoandroid\Microsoft.WindowsAzure.Mobile.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.3.0.1\lib\monoandroid\Microsoft.WindowsAzure.Mobile.dll</HintPath>
+      <Private>True</Private>
     </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile.Ext">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.2.1.0\lib\monoandroid\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile.Ext, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.3.0.1\lib\monoandroid\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath>
+      <Private>True</Private>
     </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.2.1.0\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.3.0.1\lib\portable-win+net45+wp8+wpa81+monotouch10+monoandroid10+xamarinios10\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
       <Private>True</Private>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
+      <Private>True</Private>
     </Reference>
     <Reference Include="SQLitePCL, Version=3.8.7.2, Culture=neutral, PublicKeyToken=bddade01e9c850c5, processorArchitecture=MSIL">
       <HintPath>..\packages\SQLitePCL.3.8.7.2\lib\MonoAndroid\SQLitePCL.dll</HintPath>
@@ -77,6 +79,22 @@
       <HintPath>..\packages\SQLitePCL.3.8.7.2\lib\MonoAndroid\SQLitePCL.Ext.dll</HintPath>
       <Private>True</Private>
     </Reference>
+    <Reference Include="SQLitePCLRaw.batteries_green, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a84b7dcfb1391f7f, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.bundle_green.1.0.1\lib\MonoAndroid\SQLitePCLRaw.batteries_green.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.core.1.0.1\lib\MonoAndroid\SQLitePCLRaw.core.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="SQLitePCLRaw.lib.e_sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e4ad490600e2234c, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.lib.e_sqlite3.android.1.0.1\lib\MonoAndroid\SQLitePCLRaw.lib.e_sqlite3.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="SQLitePCLRaw.provider.e_sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c301db686d0bd12, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.provider.e_sqlite3.android.1.0.1\lib\MonoAndroid\SQLitePCLRaw.provider.e_sqlite3.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Extensions.dll</HintPath>
@@ -123,28 +141,22 @@
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
       <Private>True</Private>
     </Reference>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\devdaystasks\devdaystasks.csproj">
-      <Project>{3AFA591D-C115-4AC9-9519-F788373ECDE9}</Project>
-      <Name>devdaystasks</Name>
-    </ProjectReference>
-  </ItemGroup>
   <ItemGroup>
     <Compile Include="MainActivity.cs" />
     <Compile Include="Resources\Resource.designer.cs" />
@@ -179,6 +191,7 @@
   <ItemGroup>
     <AndroidResource Include="Resources\values-v21\style.xml" />
   </ItemGroup>
+  <Import Project="..\DevDaysTasks.Shared\DevDaysTasks.Shared.projitems" Label="Shared" />
   <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
@@ -186,9 +199,9 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
     <Error Condition="!Exists('..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
-    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
+    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
   </Target>
   <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
   <Import Project="..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
-  <Import Project="..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
+  <Import Project="..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
 </Project>

+ 2 - 4
Demos/app-tasks/DevDaysTasks.Droid/MainActivity.cs

@@ -20,14 +20,12 @@ namespace DevDaysTasks.Droid
     {
 		protected override void OnCreate (Bundle bundle)
 		{
-            FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar;
-            FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs;
+            ToolbarResource = Resource.Layout.toolbar;
+            TabLayoutResource = Resource.Layout.tabs;
 
             base.OnCreate (bundle);
 
 			Forms.Init (this, bundle);
-			Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
-            
 			LoadApplication (new App ());
 		}
 	}

+ 8 - 0
Demos/app-tasks/DevDaysTasks.Droid/app.config

@@ -10,6 +10,14 @@
         <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.WindowsAzure.Mobile" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 8 - 4
Demos/app-tasks/DevDaysTasks.Droid/packages.config

@@ -1,12 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Microsoft.Azure.Mobile.Client" version="2.1.0" targetFramework="MonoAndroid50" />
-  <package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="2.1.0" targetFramework="monoandroid60" />
+  <package id="Microsoft.Azure.Mobile.Client" version="3.0.1" targetFramework="monoandroid60" />
+  <package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="3.0.1" targetFramework="monoandroid60" />
   <package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid60" />
   <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid60" />
   <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="monoandroid60" />
-  <package id="Newtonsoft.Json" version="6.0.4" targetFramework="MonoAndroid50" />
+  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
   <package id="SQLitePCL" version="3.8.7.2" targetFramework="monoandroid60" />
+  <package id="SQLitePCLRaw.bundle_green" version="1.0.1" targetFramework="monoandroid60" />
+  <package id="SQLitePCLRaw.core" version="1.0.1" targetFramework="monoandroid60" />
+  <package id="SQLitePCLRaw.lib.e_sqlite3.android" version="1.0.1" targetFramework="monoandroid60" />
+  <package id="SQLitePCLRaw.provider.e_sqlite3.android" version="1.0.1" targetFramework="monoandroid60" />
   <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
   <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
   <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
@@ -15,5 +19,5 @@
   <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
   <package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
   <package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
-  <package id="Xamarin.Forms" version="2.3.1.114" targetFramework="monoandroid60" />
+  <package id="Xamarin.Forms" version="2.3.2.127" targetFramework="monoandroid60" />
 </packages>

+ 0 - 0
Demos/app-tasks/DevDaysTasks/App.cs → Demos/app-tasks/DevDaysTasks.Shared/App.cs


+ 26 - 0
Demos/app-tasks/DevDaysTasks.Shared/DevDaysTasks.Shared.projitems

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+    <HasSharedItems>true</HasSharedItems>
+    <SharedGUID>f8693ec5-0dd4-487c-96e2-2e8c99ace4af</SharedGUID>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration">
+    <Import_RootNamespace>DevDaysTasks</Import_RootNamespace>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="$(MSBuildThisFileDirectory)App.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Helpers\Constants.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Model\TodoItem.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Services\TodoItemManager.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)ViewModel\TodoListViewModel.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Views\TodoList.xaml.cs">
+      <DependentUpon>TodoList.xaml</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="$(MSBuildThisFileDirectory)Views\TodoList.xaml">
+      <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+    </EmbeddedResource>
+  </ItemGroup>
+</Project>

+ 13 - 0
Demos/app-tasks/DevDaysTasks.Shared/DevDaysTasks.shproj

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>f8693ec5-0dd4-487c-96e2-2e8c99ace4af</ProjectGuid>
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
+  <PropertyGroup />
+  <Import Project="DevDaysTasks.Shared.projitems" Label="Shared" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
+</Project>

+ 2 - 2
Demos/app-tasks/DevDaysTasks/Helpers/Constants.cs → Demos/app-tasks/DevDaysTasks.Shared/Helpers/Constants.cs

@@ -5,8 +5,8 @@ namespace DevDaysTasks
 	public static class Constants
 	{
 		// Replace strings with your mobile services and gateway URLs.
-		public static string ApplicationURL = 
-            @"https://YOUR-APP-NAME-HERE.azurewebsites.net";
+		public static string ApplicationURL =
+            @"https://motzcoffee.azurewebsites.net";
 	}
 }
 

+ 0 - 0
Demos/app-tasks/DevDaysTasks/Model/TodoItem.cs → Demos/app-tasks/DevDaysTasks.Shared/Model/TodoItem.cs


+ 46 - 25
Demos/app-tasks/DevDaysTasks/Services/TodoItemManager.cs → Demos/app-tasks/DevDaysTasks.Shared/Services/TodoItemManager.cs

@@ -1,22 +1,13 @@
-// To add offline sync support: add the NuGet package Microsoft.Azure.Mobile.Client.SQLiteStore
-// to all projects in the solution and uncomment the symbol definition OFFLINE_SYNC_ENABLED
-// For Xamarin.iOS, also edit AppDelegate.cs and uncomment the call to SQLitePCL.CurrentPlatform.Init()
-// For more information, see: http://go.microsoft.com/fwlink/?LinkId=620342 
-#define OFFLINE_SYNC_ENABLED
 
 using System;
-using System.Collections.Generic;
+using System.IO;
 using System.Collections.ObjectModel;
 using System.Diagnostics;
-using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using Microsoft.WindowsAzure.MobileServices;
 
-#if OFFLINE_SYNC_ENABLED
 using Microsoft.WindowsAzure.MobileServices.SQLiteStore;
 using Microsoft.WindowsAzure.MobileServices.Sync;
-#endif
 
 namespace DevDaysTasks
 {
@@ -27,18 +18,45 @@ namespace DevDaysTasks
 
         IMobileServiceSyncTable<TodoItem> todoTable;
 
-        private TodoItemManager()
+
+        public async Task Initialize()
         {
-            this.client = new MobileServiceClient(Constants.ApplicationURL);
+            if (client?.SyncContext?.IsInitialized ?? false)
+                return;
+
 
-            var store = new MobileServiceSQLiteStore("localstore.db");
+            client = new MobileServiceClient(Constants.ApplicationURL);
+
+            var path = InitializeDatabase();
+            var store = new MobileServiceSQLiteStore(path);
             store.DefineTable<TodoItem>();
 
             //Initializes the SyncContext using the default IMobileServiceSyncHandler.
-            this.client.SyncContext.InitializeAsync(store);
+            await client.SyncContext.InitializeAsync(store);
+
+            todoTable = client.GetSyncTable<TodoItem>();
+
+        }
+
+        private string InitializeDatabase()
+        {
+#if __ANDROID__ || __IOS__
+            CurrentPlatform.Init();
+#endif
+            SQLitePCL.Batteries.Init();
 
-            this.todoTable = client.GetSyncTable<TodoItem>();
+            var path = "localstore.db";
 
+#if __ANDROID__
+            path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), path);
+
+            if (!File.Exists(path))
+            {
+                File.Create(path).Dispose();
+            }
+#endif
+
+            return path;
         }
 
         public static TodoItemManager DefaultManager
@@ -58,23 +76,20 @@ namespace DevDaysTasks
             get { return client; }
         }
 
-        public bool IsOfflineEnabled
-        {
-            get { return todoTable is Microsoft.WindowsAzure.MobileServices.Sync.IMobileServiceSyncTable<TodoItem>; }
-        }
-
         public async Task<ObservableCollection<TodoItem>> GetTodoItemsAsync(bool syncItems = false)
         {
             try
             {
+                await Initialize();
 
                 if (syncItems)
                 {
-                    await this.SyncAsync();
+                    await SyncAsync();
                 }
 
                 var items = await todoTable
                     .Where(todoItem => !todoItem.Done)
+                    .OrderBy(todoItem => todoItem.Name)
                     .ToEnumerableAsync();
 
                 return new ObservableCollection<TodoItem>(items);
@@ -82,16 +97,20 @@ namespace DevDaysTasks
             catch (MobileServiceInvalidOperationException msioe)
             {
                 Debug.WriteLine(@"Invalid sync operation: {0}", msioe.Message);
+                throw;
             }
             catch (Exception e)
             {
                 Debug.WriteLine(@"Sync error: {0}", e.Message);
+                throw;
             }
             return null;
         }
 
         public async Task SaveTaskAsync(TodoItem item)
         {
+            await Initialize();
+
             if (item.Id == null)
             {
                 await todoTable.InsertAsync(item);
@@ -106,17 +125,19 @@ namespace DevDaysTasks
 
         public async Task SyncAsync()
         {
+            await Initialize();
+
             ReadOnlyCollection<MobileServiceTableOperationError> syncErrors = null;
 
             try
             {
-                await this.client.SyncContext.PushAsync();
+                await client.SyncContext.PushAsync();
 
-                await this.todoTable.PullAsync(
+                await todoTable.PullAsync(
                     //The first parameter is a query name that is used internally by the client SDK to implement incremental sync.
                     //Use a different query name for each unique query in your program
                     "allTodoItems",
-                    this.todoTable.CreateQuery());
+                    todoTable.CreateQuery());
             }
             catch (MobileServicePushFailedException exc)
             {
@@ -137,7 +158,7 @@ namespace DevDaysTasks
                         //Update failed, reverting to server's copy.
                         await error.CancelAndUpdateItemAsync(error.Result);
                     }
-                    else
+                    else if(error.OperationKind != MobileServiceTableOperationKind.Update)
                     {
                         // Discard local change.
                         await error.CancelAndDiscardItemAsync();

+ 100 - 0
Demos/app-tasks/DevDaysTasks.Shared/ViewModel/TodoListViewModel.cs

@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using Xamarin.Forms;
+
+namespace DevDaysTasks
+{
+    public class TodoListViewModel : INotifyPropertyChanged
+    {
+        TodoItemManager manager;
+        
+
+        public TodoListViewModel()
+        {
+            manager = TodoItemManager.DefaultManager;
+            Items = new ObservableCollection<TodoItem>();
+
+            AddCommand = new Command(async () => await AddAsync());
+            CompleteCommand = new Command<TodoItem>(async (item) => await CompleteAsync(item));
+            SyncCommand = new Command(async () => await RefreshAsync(true));
+            RefreshCommand = new Command(async () => await RefreshAsync(false));
+        }
+
+        ObservableCollection<TodoItem> items;
+        public ObservableCollection<TodoItem> Items
+        {
+            get { return items; }
+            set { items = value;  OnPropertyChanged(); }
+        }
+
+        string name;
+        public string Name
+        {
+            get { return name; }
+            set { name = value;  OnPropertyChanged(); }
+        }
+        
+
+        bool busy;
+        public bool IsBusy
+        {
+            get { return busy; }
+            set { busy = value; OnPropertyChanged(); }
+        }
+
+
+
+        public Command AddCommand { get; }
+
+        async Task AddAsync()
+        {
+            IsBusy = true;
+            var item = new TodoItem { Name = Name };
+            await manager.SaveTaskAsync(item);
+            Items = await manager.GetTodoItemsAsync();
+            Name = string.Empty;
+            IsBusy = false;
+        }
+
+        public Command<TodoItem> CompleteCommand { get; }
+
+        public async Task CompleteAsync(TodoItem item)
+        {
+            IsBusy = true;
+            item.Done = true;
+            await manager.SaveTaskAsync(item);
+            Items = await manager.GetTodoItemsAsync();
+            IsBusy = false;
+        }
+
+
+        public Command SyncCommand { get; } 
+
+        public Command RefreshCommand { get; }
+
+        async Task RefreshAsync(bool? sync)
+        {
+            IsBusy = true;
+            try
+            {
+                Items = await manager.GetTodoItemsAsync(sync.HasValue && sync.Value);
+            }
+            catch (Exception ex)
+            {
+                await Application.Current.MainPage.DisplayAlert("Refresh Error", "Couldn't refresh data (" + ex.Message + ")", "OK");
+            }
+            finally
+            {
+                IsBusy = false;
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        void OnPropertyChanged([CallerMemberName]string name = "")
+            => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+    }
+}

+ 14 - 12
Demos/app-tasks/DevDaysTasks/Views/TodoList.xaml → Demos/app-tasks/DevDaysTasks.Shared/Views/TodoList.xaml

@@ -9,34 +9,36 @@
       <RowDefinition Height="*" />
     </Grid.RowDefinitions>
     <ActivityIndicator Grid.RowSpan="2"
-                       HorizontalOptions="Center"
+                       HorizontalOptions="FillAndExpand"
                        VerticalOptions="Center"
-                       IsVisible="False"
-                       IsEnabled="True"
-                       x:Name="syncIndicator"/>
+                       IsVisible="{Binding IsBusy}"
+                       IsRunning="{Binding IsBusy}"/>
     <StackLayout Grid.Row="0" BackgroundColor="#5ABAFF" Padding="10,10,10,5">
       <Grid>
         <Grid.ColumnDefinitions>
           <ColumnDefinition/>
           <ColumnDefinition Width="Auto"/>
         </Grid.ColumnDefinitions>
-        <Entry x:Name="newItemName"
-                  Placeholder="Item name" />
-        <StackLayout x:Name="buttonsPanel" Grid.Column="1" Orientation="Horizontal" HorizontalOptions="StartAndExpand">
+        <Entry Text="{Binding Name}" 
+               Placeholder="Item name" />
+        <StackLayout Grid.Column="1" 
+                     Orientation="Horizontal" 
+                     HorizontalOptions="StartAndExpand">
           <Button Text="Add"
                   MinimumHeightRequest="30"
-                  Clicked="OnAdd" />
+                  Command="{Binding AddCommand}" />
           <Button Text="Sync"
                 MinimumHeightRequest="30"
-                Clicked="OnSyncItems" />
+                Command="{Binding SyncCommand}" />
         </StackLayout>
       </Grid>
     </StackLayout>
-    <ListView x:Name="todoList"
+    <ListView 
+        ItemsSource="{Binding Items}"
 				ItemSelected="OnSelected"
 				IsPullToRefreshEnabled="true" 
-        
-        Refreshing="OnRefresh"
+        IsRefreshing="{Binding IsBusy, Mode=OneWay}"
+        RefreshCommand="{Binding SyncCommand}"
         HasUnevenRows="true"
 				Grid.Row="1">
       <ListView.ItemTemplate>

+ 58 - 0
Demos/app-tasks/DevDaysTasks.Shared/Views/TodoList.xaml.cs

@@ -0,0 +1,58 @@
+using System;
+using Xamarin.Forms;
+
+namespace DevDaysTasks
+{
+    public partial class TodoList : ContentPage
+    {
+
+        TodoListViewModel viewModel;
+        public TodoList()
+        {
+            InitializeComponent();
+            BindingContext = viewModel = new TodoListViewModel();
+        }
+
+        protected override void OnAppearing()
+        {
+            base.OnAppearing();
+
+            viewModel.RefreshCommand.Execute(false);
+        }
+
+        // Event handlers
+        public async void OnSelected(object sender, SelectedItemChangedEventArgs e)
+        {
+            var list = (ListView)sender;
+            var todo = e.SelectedItem as TodoItem;
+            if (Device.OS != TargetPlatform.iOS && todo != null)
+            {
+                // Not iOS - the swipe-to-delete is discoverable there
+                if (Device.OS == TargetPlatform.Android)
+                {
+                    await DisplayAlert(todo.Name, "Press-and-hold to complete task " + todo.Name, "Got it!");
+                }
+                else
+                {
+                    // Windows, not all platforms support the Context Actions yet
+                    if (await DisplayAlert("Mark completed?", "Do you wish to complete " + todo.Name + "?", "Complete", "Cancel"))
+                    {
+                        viewModel.CompleteCommand.Execute(todo);
+                    }
+                }
+            }
+
+            // prevents background getting highlighted
+            list.SelectedItem = null;
+        }
+
+        // http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/listview/#context
+        public void OnComplete(object sender, EventArgs e)
+        {
+            var mi = ((MenuItem)sender);
+            var todo = mi.CommandParameter as TodoItem;
+            viewModel.CompleteCommand.Execute(todo);
+        }
+    }
+}
+

+ 1 - 11
Demos/app-tasks/DevDaysTasks.UWP/DevDaysTasks.UWP.csproj

@@ -126,17 +126,7 @@
       <SubType>Designer</SubType>
     </Page>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\DevDaysTasks\DevDaysTasks.csproj">
-      <Project>{3afa591d-c115-4ac9-9519-f788373ecde9}</Project>
-      <Name>DevDaysTasks</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <SDKReference Include="SQLite.UWP.2015, Version=3.14.2">
-      <Name>SQLite for Universal Windows Platform</Name>
-    </SDKReference>
-  </ItemGroup>
+  <Import Project="..\DevDaysTasks.Shared\DevDaysTasks.Shared.projitems" Label="Shared" />
   <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
     <VisualStudioVersion>14.0</VisualStudioVersion>
   </PropertyGroup>

+ 2 - 1
Demos/app-tasks/DevDaysTasks.UWP/DevDaysTasks.UWP.nuget.targets

@@ -6,6 +6,7 @@
   <ImportGroup>
     <Import Project="$(NuGetPackageRoot)\Microsoft.Bcl.Build\1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('$(NuGetPackageRoot)\Microsoft.Bcl.Build\1.0.21\build\Microsoft.Bcl.Build.targets')" />
     <Import Project="$(NuGetPackageRoot)\SQLitePCL\3.8.7.2\build\netcore451\SQLitePCL.targets" Condition="Exists('$(NuGetPackageRoot)\SQLitePCL\3.8.7.2\build\netcore451\SQLitePCL.targets')" />
-    <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
+    <Import Project="$(NuGetPackageRoot)\SQLitePCLRaw.lib.e_sqlite3.v140\1.0.0\build\SQLitePCLRaw.lib.e_sqlite3.v140.targets" Condition="Exists('$(NuGetPackageRoot)\SQLitePCLRaw.lib.e_sqlite3.v140\1.0.0\build\SQLitePCLRaw.lib.e_sqlite3.v140.targets')" />
+    <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
   </ImportGroup>
 </Project>

+ 5 - 5
Demos/app-tasks/DevDaysTasks.UWP/project.json

@@ -1,14 +1,14 @@
 {
   "dependencies": {
-    "Microsoft.Azure.Mobile.Client": "2.1.0",
-    "Microsoft.Azure.Mobile.Client.SQLiteStore": "2.1.0",
+    "Microsoft.Azure.Mobile.Client": "3.0.1",
+    "Microsoft.Azure.Mobile.Client.SQLiteStore": "3.0.1",
     "Microsoft.Bcl": "1.1.10",
     "Microsoft.Bcl.Build": "1.0.21",
     "Microsoft.Net.Http": "2.2.29",
-    "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
-    "Newtonsoft.Json": "6.0.4",
+    "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
+    "Newtonsoft.Json": "9.0.1",
     "SQLitePCL": "3.8.7.2",
-    "Xamarin.Forms": "2.3.1.114"
+    "Xamarin.Forms": "2.3.2.127"
   },
   "frameworks": {
     "uap10.0": {}

File diff suppressed because it is too large
+ 600 - 434
Demos/app-tasks/DevDaysTasks.UWP/project.lock.json


+ 0 - 6
Demos/app-tasks/DevDaysTasks.iOS/AppDelegate.cs

@@ -14,12 +14,6 @@ namespace DevDaysTasks.iOS
 		{
 			global::Xamarin.Forms.Forms.Init ();
 
-			Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
-
-            // IMPORTANT: uncomment this code to enable sync on Xamarin.iOS
-            // For more information, see: http://go.microsoft.com/fwlink/?LinkId=620342
-            SQLitePCL.CurrentPlatform.Init();
-
 			LoadApplication (new App ());
 
 			return base.FinishedLaunching (app, options);

+ 31 - 23
Demos/app-tasks/DevDaysTasks.iOS/DevDaysTasks.iOS.csproj

@@ -63,21 +63,21 @@
     <MtouchDebug>true</MtouchDebug>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.WindowsAzure.Mobile">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.2.1.0\lib\Xamarin.iOS10\Microsoft.WindowsAzure.Mobile.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.3.0.1\lib\Xamarin.iOS10\Microsoft.WindowsAzure.Mobile.dll</HintPath>
+      <Private>True</Private>
     </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile.Ext">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.2.1.0\lib\Xamarin.iOS10\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile.Ext, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.3.0.1\lib\Xamarin.iOS10\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath>
+      <Private>True</Private>
     </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.2.1.0\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
+    <Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.3.0.1\lib\portable-win+net45+wp8+wpa81+monotouch10+monoandroid10+xamarinios10\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
       <Private>True</Private>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
+      <Private>True</Private>
     </Reference>
     <Reference Include="SQLitePCL, Version=3.8.7.2, Culture=neutral, PublicKeyToken=bddade01e9c850c5, processorArchitecture=MSIL">
       <HintPath>..\packages\SQLitePCL.3.8.7.2\lib\Xamarin.iOS10\SQLitePCL.dll</HintPath>
@@ -87,7 +87,20 @@
       <HintPath>..\packages\SQLitePCL.3.8.7.2\lib\Xamarin.iOS10\SQLitePCL.Ext.dll</HintPath>
       <Private>True</Private>
     </Reference>
+    <Reference Include="SQLitePCLRaw.batteries_green, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a84b7dcfb1391f7f, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.bundle_green.1.0.1\lib\Xamarin.iOS10\SQLitePCLRaw.batteries_green.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.core.1.0.1\lib\Xamarin.iOS10\SQLitePCLRaw.core.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="SQLitePCLRaw.provider.sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=62684c7b4f184e3f, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.ios_unified.1.0.1\lib\Xamarin.iOS10\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Net.Http" />
     <Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\Xamarin.iOS10\System.Net.Http.Extensions.dll</HintPath>
       <Private>True</Private>
@@ -99,19 +112,19 @@
     <Reference Include="System.Xml" />
     <Reference Include="System.Core" />
     <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
+      <HintPath>..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="Xamarin.iOS" />
@@ -150,20 +163,15 @@
     <ITunesArtwork Include="ITunesArtwork" />
     <ITunesArtwork Include="ITunesArtwork%402x" />
   </ItemGroup>
+  <Import Project="..\DevDaysTasks.Shared\DevDaysTasks.Shared.projitems" Label="Shared" />
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
-  <ItemGroup>
-    <ProjectReference Include="..\devdaystasks\devdaystasks.csproj">
-      <Project>{3AFA591D-C115-4AC9-9519-F788373ECDE9}</Project>
-      <Name>devdaystasks</Name>
-    </ProjectReference>
-  </ItemGroup>
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
-    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
+    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
   </Target>
   <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
-  <Import Project="..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
+  <Import Project="..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
 </Project>

+ 8 - 0
Demos/app-tasks/DevDaysTasks.iOS/app.config

@@ -10,6 +10,14 @@
         <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.WindowsAzure.Mobile" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 7 - 4
Demos/app-tasks/DevDaysTasks.iOS/packages.config

@@ -1,11 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Microsoft.Azure.Mobile.Client" version="2.1.0" targetFramework="xamarinios10" />
-  <package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="2.1.0" targetFramework="xamarinios10" />
+  <package id="Microsoft.Azure.Mobile.Client" version="3.0.1" targetFramework="xamarinios10" />
+  <package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="3.0.1" targetFramework="xamarinios10" />
   <package id="Microsoft.Bcl" version="1.1.10" targetFramework="xamarinios10" />
   <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="xamarinios10" />
   <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="xamarinios10" />
-  <package id="Newtonsoft.Json" version="6.0.4" targetFramework="xamarinios10" />
+  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="xamarinios10" />
   <package id="SQLitePCL" version="3.8.7.2" targetFramework="xamarinios10" />
-  <package id="Xamarin.Forms" version="2.3.1.114" targetFramework="xamarinios10" />
+  <package id="SQLitePCLRaw.bundle_green" version="1.0.1" targetFramework="xamarinios10" />
+  <package id="SQLitePCLRaw.core" version="1.0.1" targetFramework="xamarinios10" />
+  <package id="SQLitePCLRaw.provider.sqlite3.ios_unified" version="1.0.1" targetFramework="xamarinios10" />
+  <package id="Xamarin.Forms" version="2.3.2.127" targetFramework="xamarinios10" />
 </packages>

+ 13 - 22
Demos/app-tasks/DevDaysTasks.sln

@@ -3,15 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
 VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevDaysTasks", "DevDaysTasks\DevDaysTasks.csproj", "{3AFA591D-C115-4AC9-9519-F788373ECDE9}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevDaysTasks.iOS", "DevDaysTasks.iOS\DevDaysTasks.iOS.csproj", "{5FA0219F-B063-4D07-800B-CC38BDB5B916}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevDaysTasks.Droid", "DevDaysTasks.Droid\DevDaysTasks.Droid.csproj", "{34B9099E-4B00-4707-BFDE-0B95997F8893}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevDaysTasks.UWP", "DevDaysTasks.UWP\DevDaysTasks.UWP.csproj", "{3BA8F68B-3F85-44E7-86DF-37D4529C5912}"
 EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DevDaysTasks", "DevDaysTasks.Shared\DevDaysTasks.shproj", "{F8693EC5-0DD4-487C-96E2-2E8C99ACE4AF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BF28773B-3826-4CB3-9D48-9A836F6D1FA4}"
+	ProjectSection(SolutionItems) = preProject
+		README.md = README.md
+	EndProjectSection
+EndProject
 Global
+	GlobalSection(SharedMSBuildProjectFiles) = preSolution
+		DevDaysTasks.Shared\DevDaysTasks.Shared.projitems*{34b9099e-4b00-4707-bfde-0b95997f8893}*SharedItemsImports = 4
+		DevDaysTasks.Shared\DevDaysTasks.Shared.projitems*{3ba8f68b-3f85-44e7-86df-37d4529c5912}*SharedItemsImports = 4
+		DevDaysTasks.Shared\DevDaysTasks.Shared.projitems*{5fa0219f-b063-4d07-800b-cc38bdb5b916}*SharedItemsImports = 4
+		DevDaysTasks.Shared\DevDaysTasks.Shared.projitems*{f8693ec5-0dd4-487c-96e2-2e8c99ace4af}*SharedItemsImports = 13
+	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|ARM = Debug|ARM
@@ -29,26 +40,6 @@ Global
 		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|ARM.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|iPhone.Build.0 = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|ARM.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|iPhone.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|x64.ActiveCfg = Release|Any CPU
-		{3AFA591D-C115-4AC9-9519-F788373ECDE9}.Release|x86.ActiveCfg = Release|Any CPU
 		{5FA0219F-B063-4D07-800B-CC38BDB5B916}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
 		{5FA0219F-B063-4D07-800B-CC38BDB5B916}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
 		{5FA0219F-B063-4D07-800B-CC38BDB5B916}.Debug|ARM.ActiveCfg = Debug|iPhone

+ 0 - 104
Demos/app-tasks/DevDaysTasks/DevDaysTasks.csproj

@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <ProjectGuid>{3AFA591D-C115-4AC9-9519-F788373ECDE9}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <RootNamespace>DevDaysTasks</RootNamespace>
-    <AssemblyName>DevDaysTasks</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
-    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>full</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="App.cs" />
-    <Compile Include="Views\TodoList.xaml.cs">
-      <DependentUpon>TodoList.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Helpers\Constants.cs" />
-    <Compile Include="Model\TodoItem.cs" />
-    <Compile Include="Services\TodoItemManager.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
-  <Import Project="..\packages\Xamarin.Forms.1.4.2.6359\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.1.4.2.6359\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
-  <ItemGroup>
-    <Reference Include="Microsoft.WindowsAzure.Mobile">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.2.1.0\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.2.1.0\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Newtonsoft.Json">
-      <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="SQLitePCL, Version=3.8.7.2, Culture=neutral, PublicKeyToken=bddade01e9c850c5, processorArchitecture=MSIL">
-      <HintPath>..\packages\SQLitePCL.3.8.7.2\lib\portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\SQLitePCL.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Xamarin.Forms.2.3.1.114\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Views\TodoList.xaml">
-      <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
-    </EmbeddedResource>
-  </ItemGroup>
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
-    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
-  </Target>
-  <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
-  <Import Project="..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
-</Project>

+ 0 - 29
Demos/app-tasks/DevDaysTasks/Properties/AssemblyInfo.cs

@@ -1,29 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using Xamarin.Forms.Xaml;
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
-
-[assembly: AssemblyTitle ("DevDaysTasks")]
-[assembly: AssemblyDescription ("")]
-[assembly: AssemblyConfiguration ("")]
-[assembly: AssemblyCompany ("")]
-[assembly: AssemblyProduct ("")]
-[assembly: AssemblyCopyright ("craigdunn")]
-[assembly: AssemblyTrademark ("")]
-[assembly: AssemblyCulture ("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion ("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
-

+ 0 - 157
Demos/app-tasks/DevDaysTasks/Views/TodoList.xaml.cs

@@ -1,157 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Xamarin.Forms;
-
-namespace DevDaysTasks
-{
-    public partial class TodoList : ContentPage
-    {
-        TodoItemManager manager;
-
-        public TodoList()
-        {
-            InitializeComponent();
-
-            manager = TodoItemManager.DefaultManager;
-        }
-
-        protected override async void OnAppearing()
-        {
-            base.OnAppearing();
-
-            // Set syncItems to true in order to synchronize the data on startup when running in offline mode
-            await RefreshItems(true, syncItems: false);
-        }
-
-        // Data methods
-        async Task AddItem(TodoItem item)
-        {
-            await manager.SaveTaskAsync(item);
-            todoList.ItemsSource = await manager.GetTodoItemsAsync();
-        }
-
-        async Task CompleteItem(TodoItem item)
-        {
-            item.Done = true;
-            await manager.SaveTaskAsync(item);
-            todoList.ItemsSource = await manager.GetTodoItemsAsync();
-        }
-
-        public async void OnAdd(object sender, EventArgs e)
-        {
-            var todo = new TodoItem { Name = newItemName.Text };
-            await AddItem(todo);
-
-            newItemName.Text = string.Empty;
-            newItemName.Unfocus();
-        }
-
-        // Event handlers
-        public async void OnSelected(object sender, SelectedItemChangedEventArgs e)
-        {
-            var todo = e.SelectedItem as TodoItem;
-            if (Device.OS != TargetPlatform.iOS && todo != null)
-            {
-                // Not iOS - the swipe-to-delete is discoverable there
-                if (Device.OS == TargetPlatform.Android)
-                {
-                    await DisplayAlert(todo.Name, "Press-and-hold to complete task " + todo.Name, "Got it!");
-                }
-                else
-                {
-                    // Windows, not all platforms support the Context Actions yet
-                    if (await DisplayAlert("Mark completed?", "Do you wish to complete " + todo.Name + "?", "Complete", "Cancel"))
-                    {
-                        await CompleteItem(todo);
-                    }
-                }
-            }
-
-            // prevents background getting highlighted
-            todoList.SelectedItem = null;
-        }
-
-        // http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/listview/#context
-        public async void OnComplete(object sender, EventArgs e)
-        {
-            var mi = ((MenuItem)sender);
-            var todo = mi.CommandParameter as TodoItem;
-            await CompleteItem(todo);
-        }
-
-        // http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/listview/#pulltorefresh
-        public async void OnRefresh(object sender, EventArgs e)
-        {
-            var list = (ListView)sender;
-            Exception error = null;
-            try
-            {
-                await RefreshItems(false, true);
-            }
-            catch (Exception ex)
-            {
-                error = ex;
-            }
-            finally
-            {
-                list.EndRefresh();
-            }
-
-            if (error != null)
-            {
-                await DisplayAlert("Refresh Error", "Couldn't refresh data (" + error.Message + ")", "OK");
-            }
-        }
-
-        public async void OnSyncItems(object sender, EventArgs e)
-        {
-            await RefreshItems(true, true);
-        }
-
-        private async Task RefreshItems(bool showActivityIndicator, bool syncItems)
-        {
-            using (var scope = new ActivityIndicatorScope(syncIndicator, showActivityIndicator))
-            {
-                todoList.ItemsSource = await manager.GetTodoItemsAsync(syncItems);
-            }
-        }
-
-        private class ActivityIndicatorScope : IDisposable
-        {
-            private bool showIndicator;
-            private ActivityIndicator indicator;
-            private Task indicatorDelay;
-
-            public ActivityIndicatorScope(ActivityIndicator indicator, bool showIndicator)
-            {
-                this.indicator = indicator;
-                this.showIndicator = showIndicator;
-
-                if (showIndicator)
-                {
-                    indicatorDelay = Task.Delay(2000);
-                    SetIndicatorActivity(true);
-                }
-                else
-                {
-                    indicatorDelay = Task.FromResult(0);
-                }
-            }
-
-            private void SetIndicatorActivity(bool isActive)
-            {
-                this.indicator.IsVisible = isActive;
-                this.indicator.IsRunning = isActive;
-            }
-
-            public void Dispose()
-            {
-                if (showIndicator)
-                {
-                    indicatorDelay.ContinueWith(t => SetIndicatorActivity(false), TaskScheduler.FromCurrentSynchronizationContext());
-                }
-            }
-        }
-    }
-}
-

+ 0 - 11
Demos/app-tasks/DevDaysTasks/packages.config

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Microsoft.Azure.Mobile.Client" version="2.1.0" targetFramework="portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
-  <package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="2.1.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
-  <package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8+wp8+wpa81" />
-  <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8+wp8+wpa81" />
-  <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable45-net45+win8+wp8+wpa81" />
-  <package id="Newtonsoft.Json" version="6.0.4" targetFramework="portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
-  <package id="SQLitePCL" version="3.8.7.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
-  <package id="Xamarin.Forms" version="2.3.1.114" targetFramework="portable45-net45+win8+wp8+wpa81" />
-</packages>

+ 0 - 10
Demos/app-tasks/README.md

@@ -50,13 +50,3 @@ Now give it about 3-5 minutes and you will be completely setup.
 * Open DevDaysTasks.sln.
 * You will find DevDaysTasks/Helpers/Constants.cs
 * Update with your app name and run!
-
-
-## Windows UWP SQLite
-Inside of Visual Studio go to **Tools->Extensions and Updates**
-
-Under **Online->Visual Studio Gallery** search for **SQlite** 
-
-Ensure you install SQLite for Universal Windows Platform (version 3.13.0).
-
-![](images/sqliteuwp.PNG)

Some files were not shown because too many files changed in this diff