diff --git a/ZicMoove/ZicMoove.Droid/MainActivity.cs b/ZicMoove/ZicMoove.Droid/MainActivity.cs index cc4cc127..2f3bc08a 100644 --- a/ZicMoove/ZicMoove.Droid/MainActivity.cs +++ b/ZicMoove/ZicMoove.Droid/MainActivity.cs @@ -51,6 +51,7 @@ namespace ZicMoove.Droid using Java.Math; using Org.Json; using Xamarin.Forms; + using ViewModels.UserProfile; [Activity( Name = Constants.ApplicationName + ".MainActivity", @@ -107,6 +108,7 @@ namespace ZicMoove.Droid { var xfapp = new XFormsCompatAppDroid(); this.SetIoc(xfapp); + } else { @@ -203,7 +205,8 @@ namespace ZicMoove.Droid .Register() .Register( t => new SQLiteSimpleCache(new SQLitePlatformAndroid(), - new SQLiteConnectionString(pathToDatabase, true), t.Resolve())); + new SQLiteConnectionString(pathToDatabase, true), t.Resolve())) + .RegisterSingle(); Resolver.SetResolver(resolverContainer.GetResolver()); return resolverContainer; } diff --git a/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj b/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj index 21e18e8b..6d8bd499 100644 --- a/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj +++ b/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj @@ -176,10 +176,11 @@ ..\..\Components\GoogleMediaFramework-1.0\lib\android\GoogleMediaFramework.dll - - ..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\MonoAndroid10\MarkdownDeep.dll + + ..\..\packages\MarkdownDeep-av.NET.1.5.4\lib\MonoAndroid10\MarkdownDeep.dll True + False ..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\Mono.Android.dll @@ -190,8 +191,8 @@ - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + ..\..\packages\Newtonsoft.Json.10.0.1\lib\netstandard1.3\Newtonsoft.Json.dll True diff --git a/ZicMoove/ZicMoove.Droid/app.config b/ZicMoove/ZicMoove.Droid/app.config index c8df8462..9b4ce5e9 100644 --- a/ZicMoove/ZicMoove.Droid/app.config +++ b/ZicMoove/ZicMoove.Droid/app.config @@ -28,7 +28,7 @@ - + diff --git a/ZicMoove/ZicMoove.Droid/packages.config b/ZicMoove/ZicMoove.Droid/packages.config index 9c0a8475..da3dee02 100644 --- a/ZicMoove/ZicMoove.Droid/packages.config +++ b/ZicMoove/ZicMoove.Droid/packages.config @@ -2,9 +2,10 @@ - + - + + @@ -15,6 +16,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZicMoove/ZicMoove.iOS/ZicMoove.iOS.csproj b/ZicMoove/ZicMoove.iOS/ZicMoove.iOS.csproj index 67a73a13..86b4d40e 100644 --- a/ZicMoove/ZicMoove.iOS/ZicMoove.iOS.csproj +++ b/ZicMoove/ZicMoove.iOS/ZicMoove.iOS.csproj @@ -207,27 +207,27 @@ - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll True - ..\..\packages\Xamarin.Forms.Maps.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Maps.dll + ..\..\packages\Xamarin.Forms.Maps.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Maps.dll True - ..\..\packages\Xamarin.Forms.Maps.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Maps.iOS.dll + ..\..\packages\Xamarin.Forms.Maps.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Maps.iOS.dll True - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll True - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll True - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll True @@ -251,11 +251,11 @@ - + Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}. - + \ No newline at end of file diff --git a/ZicMoove/ZicMoove.iOS/app.config b/ZicMoove/ZicMoove.iOS/app.config index bb76392c..156067f8 100644 --- a/ZicMoove/ZicMoove.iOS/app.config +++ b/ZicMoove/ZicMoove.iOS/app.config @@ -4,7 +4,7 @@ - + diff --git a/ZicMoove/ZicMoove.iOS/packages.config b/ZicMoove/ZicMoove.iOS/packages.config index fa5dcff1..03470919 100644 --- a/ZicMoove/ZicMoove.iOS/packages.config +++ b/ZicMoove/ZicMoove.iOS/packages.config @@ -1,7 +1,7 @@  - - + + diff --git a/ZicMoove/ZicMoove/App.xaml.cs b/ZicMoove/ZicMoove/App.xaml.cs index 8fb19cc4..517c8a6c 100644 --- a/ZicMoove/ZicMoove/App.xaml.cs +++ b/ZicMoove/ZicMoove/App.xaml.cs @@ -63,7 +63,6 @@ namespace ZicMoove public void Init() { var app = Resolver.Resolve(); - if (app == null) { return; @@ -172,7 +171,6 @@ namespace ZicMoove ViewFactory.Register(); ViewFactory.Register(); ViewFactory.Register(); - ViewFactory.Register(); ViewFactory.Register(); ConfigManager = new GenericConfigSettingsMgr(s => MainSettings.AppSettings.GetValueOrDefault(s, MainSettings.SettingsDefault), null); @@ -233,7 +231,7 @@ namespace ZicMoove var bookQueries = new BookQueriesViewModel(); - var userprofile = new UserProfileViewModel(); + var userprofile = Resolver.Resolve(); bQueriesPage = new BookQueriesPage { diff --git a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs index aef8f833..36b972cc 100644 --- a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs @@ -12,26 +12,19 @@ namespace ZicMoove.Pages.UserProfile using System.IO; using System.Threading.Tasks; using Android.Content.Res; + using XLabs.Ioc; public partial class UserProfilePage { public UserProfilePage() { InitializeComponent(); + BindingContext = Resolver.Resolve(); AvatarButton.Clicked += AvatarButton_Clicked; btnPay.Clicked += BtnPay_Clicked; - } - public UserProfilePage(UserProfileViewModel model) - { - InitializeComponent(); - AvatarButton.Clicked += AvatarButton_Clicked; - BindingContext = model; - } - - - private async void BtnPay_Clicked(object sender, EventArgs e) + private void BtnPay_Clicked(object sender, EventArgs e) { App.PlatformSpecificInstance.Pay(0.1, Interfaces.PayMethod.Immediate, "test payment"); } diff --git a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs index b2a73672..f6e53a27 100644 --- a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs @@ -15,6 +15,14 @@ namespace ZicMoove.ViewModels.UserProfile public class UserProfileViewModel : ViewModel { + public UserProfileViewModel() + { + Accounts = MainSettings.AccountList; + User = MainSettings.CurrentUser; + UpdateUserMeta(); + Rating = 2; + MainSettings.UserChanged += MainSettings_UserChanged; + } public bool IsAPerformer { @@ -26,7 +34,7 @@ namespace ZicMoove.ViewModels.UserProfile get; set; } // TODO implementation - int rating ; + int rating = 0 ; public int Rating { get @@ -136,22 +144,7 @@ namespace ZicMoove.ViewModels.UserProfile } } - public UserProfileViewModel() - { - Accounts = MainSettings.AccountList; - User = MainSettings.CurrentUser; - UpdateUserMeta(); - Rating = 2; - UserNameGesture = new RelayGesture((g, x) => - { - if (g.GestureType == GestureType.LongPress) - { - NavigationService.NavigateTo("accountChooser"); - } - }); - MainSettings.UserChanged += MainSettings_UserChanged; - - } + private void MainSettings_UserChanged(object sender, System.EventArgs e) { diff --git a/ZicMoove/ZicMoove/ZicMoove.csproj b/ZicMoove/ZicMoove/ZicMoove.csproj index 5bf89488..0c4f0df8 100644 --- a/ZicMoove/ZicMoove/ZicMoove.csproj +++ b/ZicMoove/ZicMoove/ZicMoove.csproj @@ -290,7 +290,9 @@ - + + Designer + Designer @@ -335,8 +337,9 @@ ..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\Mono.Android.dll - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + ..\..\packages\Newtonsoft.Json.10.0.1\lib\portable-net45+win8+wpa81+wp8\Newtonsoft.Json.dll + True ..\..\packages\Xam.Plugin.Connectivity.2.2.12\lib\MonoAndroid10\Plugin.Connectivity.dll @@ -396,19 +399,19 @@ ..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll True - ..\..\packages\Xamarin.Forms.Maps.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Maps.dll + ..\..\packages\Xamarin.Forms.Maps.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10\Xamarin.Forms.Maps.dll True - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll True - ..\..\packages\Xamarin.Forms.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\..\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll True @@ -607,18 +610,15 @@ - - - - - - + Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}. - + + +