Merge branch 'vnext' of github.com:pazof/yavsc into vnext

main
Paul Schneider 9 years ago
commit 7283689059
36 changed files with 556 additions and 802 deletions

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.25123.0 VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar.Droid", "BookAStar\BookAStar.Droid\BookAStar.Droid.csproj", "{2A8C2BD7-B1B6-4D74-A3FC-3F5DB3BE325E}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar.Droid", "BookAStar\BookAStar.Droid\BookAStar.Droid.csproj", "{2A8C2BD7-B1B6-4D74-A3FC-3F5DB3BE325E}"
EndProject EndProject
@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar.iOS", "BookAStar\
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar", "BookAStar\BookAStar\BookAStar.csproj", "{A0815650-0A0A-47B0-8826-771F0E1AD137}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar", "BookAStar\BookAStar\BookAStar.csproj", "{A0815650-0A0A-47B0-8826-771F0E1AD137}"
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Yavsc.Server.Api", "Yavsc.Api\Yavsc.Server.Api.xproj", "{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client\Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client\Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"
EndProject EndProject
Global Global
@ -193,54 +191,6 @@ Global
{A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x64.Build.0 = Release|Any CPU {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x64.Build.0 = Release|Any CPU
{A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.ActiveCfg = Release|Any CPU {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.ActiveCfg = Release|Any CPU
{A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.Build.0 = Release|Any CPU {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|ARM.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhone.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x64.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x64.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x86.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x86.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|ARM.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|ARM.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhone.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x64.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x64.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x86.ActiveCfg = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x86.Build.0 = Debug|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|Any CPU.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|ARM.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|ARM.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhone.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhone.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x64.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x64.Build.0 = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x86.ActiveCfg = Release|Any CPU
{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x86.Build.0 = Release|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU

@ -35,7 +35,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime> <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode> <AndroidLinkMode>Full</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<BundleAssemblies>False</BundleAssemblies> <BundleAssemblies>False</BundleAssemblies>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi> <AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
@ -76,6 +76,10 @@
<HintPath>..\..\packages\Xamarin.Forms.2.3.0.107\lib\MonoAndroid10\FormsViewGroup.dll</HintPath> <HintPath>..\..\packages\Xamarin.Forms.2.3.0.107\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="MarkdownDeep, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\MonoAndroid10\MarkdownDeep.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Plugin, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Media.Plugin, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xam.Plugin.Media.1.0.1\lib\MonoAndroid10\Media.Plugin.dll</HintPath> <HintPath>..\..\packages\Xam.Plugin.Media.1.0.1\lib\MonoAndroid10\Media.Plugin.dll</HintPath>
<Private>True</Private> <Private>True</Private>
@ -100,10 +104,12 @@
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Drawing.dll</HintPath>
</Reference>
<Reference Include="System.Json" /> <Reference Include="System.Json" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath> <HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
<Private>True</Private> <Private>True</Private>
@ -264,7 +270,7 @@
<AndroidResource Include="Resources\drawable\ic_corp_icon.png" /> <AndroidResource Include="Resources\drawable\ic_corp_icon.png" />
<AndroidResource Include="Resources\drawable\nfqrcode.png" /> <AndroidResource Include="Resources\drawable\nfqrcode.png" />
<AndroidResource Include="Resources\drawable\visuel_sexion.jpg" /> <AndroidResource Include="Resources\drawable\visuel_sexion.jpg" />
<Content Include="Resources\values\values-21\styles.xml" /> <AndroidResource Include="Resources\values\values-21\styles.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Resources\drawable-hdpi\" /> <Folder Include="Resources\drawable-hdpi\" />

@ -3,4 +3,7 @@
<PropertyGroup> <PropertyGroup>
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice> <AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ReferencePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\</ReferencePath>
</PropertyGroup>
</Project> </Project>

@ -48,7 +48,7 @@ namespace Yavsc.Helpers
request.SendChunked = true; request.SendChunked = true;
request.TransferEncoding = "UTF-8"; request.TransferEncoding = "UTF-8";
if (authorizationHeader!=null) if (authorizationHeader!=null)
request.Headers.Add($"Authorization: Bearer {authorizationHeader}"); request.Headers.Add($"Authorization: {authorizationHeader}");
} }
public static string BasePath { get; private set; } = "http://dev.pschneider.fr/api/"; public static string BasePath { get; private set; } = "http://dev.pschneider.fr/api/";

@ -22,6 +22,7 @@ using BookAStar.Model.Auth.Account;
using BookAStar.Droid.OAuth; using BookAStar.Droid.OAuth;
using Yavsc.Helpers; using Yavsc.Helpers;
using Yavsc.Models.Identity; using Yavsc.Models.Identity;
using static Android.Content.Res.Resources;
namespace BookAStar.Droid namespace BookAStar.Droid
{ {
@ -37,8 +38,11 @@ namespace BookAStar.Droid
global::Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle);
global::Xamarin.FormsMaps.Init(this, bundle); global::Xamarin.FormsMaps.Init(this, bundle);
LoadApplication(new App(this)); LoadApplication(new App(this));
/* var x = typeof(Themes.DarkThemeResources);
x = typeof(Themes.LightThemeResources);
x = typeof(Themes.Android.UnderlineEffect); */
} }
public bool EnablePushNotifications(bool enable) public bool EnablePushNotifications(bool enable)
{ {
@ -293,7 +297,8 @@ namespace BookAStar.Droid
public TAnswer InvokeApi<TAnswer>(string method, object arg) public TAnswer InvokeApi<TAnswer>(string method, object arg)
{ {
using (var m = using (var m =
new SimpleJsonPostMethod(method, new SimpleJsonPostMethod(
method, "Bearer "+
MainSettings.CurrentUser.YavscTokens.AccessToken MainSettings.CurrentUser.YavscTokens.AccessToken
)) ))
{ {
@ -304,9 +309,10 @@ namespace BookAStar.Droid
public object InvokeApi(string method, object arg) public object InvokeApi(string method, object arg)
{ {
using (var m = using (var m =
new SimpleJsonPostMethod(method, new SimpleJsonPostMethod(
method, "Bearer " +
MainSettings.CurrentUser.YavscTokens.AccessToken MainSettings.CurrentUser.YavscTokens.AccessToken
)) ))
{ {
return m.InvokeJson(arg); return m.InvokeJson(arg);
} }

@ -29,13 +29,14 @@
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<permission android:name="com.xamarin.mobilecrm.permission.MAPS_RECEIVE" android:protectionLevel="signature" /> <permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<uses-permission android:name="com.xamarin.mobilecrm.permission.MAPS_RECEIVE" /> <uses-permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" />
<permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" /> <permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" /> <uses-permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.intent.RECEIVE" /> <uses-permission android:name="com.google.android.c2dm.intent.RECEIVE" />
<uses-permission android:name="com.google.android.c2dm.intent.REGISTRATION" /> <uses-permission android:name="com.google.android.c2dm.intent.REGISTRATION" />
<uses-permission android:name="com.google.android.c2dm.intent.RETRY" /> <uses-permission android:name="com.google.android.c2dm.intent.RETRY" />
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" /> <uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
</manifest> </manifest>

@ -44,9 +44,26 @@ namespace BookAStar.Droid
Log.Info ("RegistrationIntentService", "Calling InstanceID.GetToken"); Log.Info ("RegistrationIntentService", "Calling InstanceID.GetToken");
lock (locker) lock (locker)
{ {
var instanceID = InstanceID.GetInstance (this); var instanceID = InstanceID.GetInstance(this);
var senderid = MainSettings.GoogleSenderId;
#if DEBUG
// When debugging, and application data/cache is preserved,
// a previous instance comes from another application installation
// and the old registration against GCM fails,
// until one delete it.
try
{
instanceID.DeleteInstanceID();
}
catch(Exception ex)
{
Debug.WaitForDebugger();
Log.Debug("bas.GCM", ex.StackTrace.ToString());
}
#endif
var senderid = MainSettings.GoogleSenderId;
var token = instanceID.GetToken ( senderid, var token = instanceID.GetToken ( senderid,
GoogleCloudMessaging.InstanceIdScope, null); GoogleCloudMessaging.InstanceIdScope, null);
@ -83,7 +100,11 @@ namespace BookAStar.Droid
{ {
var pubSub = GcmPubSub.GetInstance(this); var pubSub = GcmPubSub.GetInstance(this);
pubSub.Subscribe(token, "/topics/global", null); pubSub.Subscribe(token, "/topics/global", null);
pubSub.Subscribe (token, "/topics/jobs", null);
// TODO if a Activity is specified,
// and general annonces in this activity are accepted:
//
// pubSub.Subscribe(token, "/topics/jobs/"+ActivityCode, null);
} }
} }

@ -99,7 +99,7 @@ namespace BookAStar.Droid
void SubscribeGCM () void SubscribeGCM ()
{ {
Context context = this.ApplicationContext; Context context = this.ApplicationContext;
string senders = "325408689282"; string senders = MainSettings.GoogleSenderId;
// Resources.GetString(GoogleSenderId); // Resources.GetString(GoogleSenderId);
Intent intent = new Intent ("com.google.android.c2dm.intent.REGISTER"); Intent intent = new Intent ("com.google.android.c2dm.intent.REGISTER");
intent.SetPackage ("com.google.android.gsf"); intent.SetPackage ("com.google.android.gsf");

@ -1,11 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlXml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Configuration" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MarkdownDeep-av.NET" version="1.5.2" targetFramework="monoandroid60" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" /> <package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
<package id="Xam.Plugin.Connectivity" version="1.0.1" targetFramework="monoandroid60" /> <package id="Xam.Plugin.Connectivity" version="1.0.1" targetFramework="monoandroid60" />
<package id="Xam.Plugin.DeviceInfo" version="1.0.0.2" targetFramework="monoandroid60" /> <package id="Xam.Plugin.DeviceInfo" version="1.0.0.2" targetFramework="monoandroid60" />

@ -90,6 +90,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Main.cs" /> <Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" /> <Compile Include="AppDelegate.cs" />
<None Include="app.config" />
<None Include="Entitlements.plist" /> <None Include="Entitlements.plist" />
<None Include="Info.plist" /> <None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
@ -151,4 +152,4 @@
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" /> <Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
</Target> </Target>
</Project> </Project>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<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>

@ -83,10 +83,11 @@ namespace BookAStar
else deviceInfoPage.Focus(); else deviceInfoPage.Focus();
} }
public async Task PostDeviceInfo() public void PostDeviceInfo()
{ {
var res = PlateformSpecificInstance.InvokeApi( var res = PlateformSpecificInstance.InvokeApi(
"gcm/register", PlateformSpecificInstance.GetDeviceInfo()); "gcm/register",
PlateformSpecificInstance.GetDeviceInfo());
} }
} }

@ -58,7 +58,7 @@ namespace BookAStar
}; };
private static readonly Dictionary<string, double> environ = new Dictionary<string, double>(); private static readonly Dictionary<string, double> environ = new Dictionary<string, double>();
public static readonly string YavscApiUrl = "dev.pschneider.fr"; public static readonly string YavscApiUrl = "http://dev.pschneider.fr/api";
#endregion #endregion
@ -78,9 +78,7 @@ namespace BookAStar
// Inform the server of it. // Inform the server of it.
if (oldregid != value) if (oldregid != value)
{ {
Task.Run( async () => { App.CurrentApp.PostDeviceInfo();
await App.CurrentApp.PostDeviceInfo();
});
} }
} }
get { return AppSettings.GetValueOrDefault<string>(GoogleRegIdKey); } get { return AppSettings.GetValueOrDefault<string>(GoogleRegIdKey); }
@ -109,8 +107,7 @@ namespace BookAStar
return accountList; return accountList;
} }
} }
private static User currentUser = null;
public static User CurrentUser { get public static User CurrentUser { get
{ {
var uname = UserName; var uname = UserName;
@ -121,8 +118,7 @@ namespace BookAStar
} }
set set
{ {
var olduserid = currentUser?.Id; var olduserid = CurrentUser?.Id;
currentUser = value;
AppSettings.AddOrUpdateValue<string>(userNameKey, value?.UserName); AppSettings.AddOrUpdateValue<string>(userNameKey, value?.UserName);
// TODO if it changes, for a valid // TODO if it changes, for a valid
// ident, and we've got a GoogleRedId, inform the server // ident, and we've got a GoogleRedId, inform the server
@ -131,11 +127,10 @@ namespace BookAStar
{ {
if (olduserid != value.Id) if (olduserid != value.Id)
{ {
Task.Run(async () => { App.CurrentApp.PostDeviceInfo();
await App.CurrentApp.PostDeviceInfo();
});
} }
} }
// TODO else Unregister the device
} }
} }

@ -1,20 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:local="clr-namespace:BookAStar.Views;assembly=BookAStar" xmlns:local="clr-namespace:BookAStar;assembly=BookAStar"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookAStar.SettingsPage" x:Class="BookAStar.SettingsPage"
Title="Paramètres Booking star"> Title="Paramètres Booking star"
BindingContext="." >
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontSize" Value="Large"/>
</Style>
</ResourceDictionary> </ResourceDictionary>
</ContentPage.Resources> </ContentPage.Resources>
<StackLayout> <StackLayout>
<Label Text="Compte utilisateur" /> <Label Text="Compte utilisateur" StyleClass="Header"/>
<Label x:Name="UserNameLabel" Text="{Binding ActiveUserName}" />
<ListView x:Name="AccountListView" <ListView x:Name="AccountListView"
SeparatorVisibility="Default" SeparatorVisibility="Default"
@ -44,57 +42,17 @@ Title="Paramètres Booking star">
</ListView> </ListView>
<StackLayout Orientation="Horizontal"> <StackLayout Orientation="Horizontal" VerticalOptions="Start">
<Label Text="Status" VerticalOptions="Start" <Label Text="Recevoir les notifications push" StyleClass="Header"/>
XAlign="Center" IsVisible="true"
FontSize="Large" FontAttributes="Bold" TextColor="Yellow" />
<Label Text="Recevoir les notifications push"/>
<Switch x:Name="pushstatus" /> <Switch x:Name="pushstatus" />
</StackLayout> </StackLayout>
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
<Label Text="Recevoir les demandes de devis de la part de professionnels uniquement"
StyleClass="Header"/>
<Switch x:Name="restrictToPro" />
</StackLayout>
<Label Text="Genres Musicaux"/> <Button x:Name="BtnViewDeviceInfo" Text="Device info" StyleClass="Info"></Button>
<ListView VerticalOptions="Start" x:Name="MusicalListView"
ItemsSource="{Binding Musical}"
>
<ListView.Header><StackLayout></StackLayout></ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer><StackLayout></StackLayout></ListView.Footer>
</ListView>
<Label Text="Lieux de prédileciton" />
<ListView x:Name="EnvironListView"
ItemsSource="{Binding Environ}" >
<ListView.Header>
<StackLayout></StackLayout>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer>
<StackLayout></StackLayout>
</ListView.Footer>
</ListView>
<Button x:Name="BtnViewDeviceInfo" Text="Device info"></Button>
</StackLayout> </StackLayout>
</ContentPage> </ContentPage>

@ -24,6 +24,7 @@ namespace BookAStar
this.Musical = MainSettings.Musical; this.Musical = MainSettings.Musical;
this.Environ = MainSettings.Environ; this.Environ = MainSettings.Environ;
this.BindingContext = this;
AddAccountBtn.Clicked += AddAccountBtn_Clicked; AddAccountBtn.Clicked += AddAccountBtn_Clicked;

@ -753,7 +753,7 @@
} }
} }
}, },
".NETFramework,Version=v4.5.1/debian.8-x86": { ".NETFramework,Version=v4.5.1/win7-x86": {
"EntityFramework.Commands/7.0.0-rc1-final": { "EntityFramework.Commands/7.0.0-rc1-final": {
"type": "package", "type": "package",
"dependencies": { "dependencies": {
@ -1504,7 +1504,7 @@
} }
} }
}, },
".NETFramework,Version=v4.5.1/debian.8-x64": { ".NETFramework,Version=v4.5.1/win7-x64": {
"EntityFramework.Commands/7.0.0-rc1-final": { "EntityFramework.Commands/7.0.0-rc1-final": {
"type": "package", "type": "package",
"dependencies": { "dependencies": {
@ -3043,4 +3043,4 @@
], ],
".NETFramework,Version=v4.5.1": [] ".NETFramework,Version=v4.5.1": []
} }
} }

@ -47,12 +47,12 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config"> <None Include="packages.config">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Helpers\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@ -67,4 +67,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="EmitMSBuildWarning" BeforeTargets="Build">
<Warning Text="Les packages contenant des cibles et des fichiers de propriétés MSBuild ne peuvent pas être installés complètement dans des projets ciblant plusieurs infrastructures. Les cibles et les fichiers de propriétés MSBuild ont été ignorés." />
</Target>
</Project>

@ -1,17 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<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>

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
</packages> </packages>

@ -12,10 +12,9 @@
"tooling": { "tooling": {
"defaultNamespace": "Yavsc" "defaultNamespace": "Yavsc"
}, },
"dependencies": { "dependencies": {},
"Microsoft.AspNet.SignalR.Client.Portable": "2.0.1"
},
"frameworks": { "frameworks": {
"net451": {} "net451": {},
".NETPortable,Version=v4.5,Profile=Profile111": {}
} }
} }

@ -2,254 +2,13 @@
"locked": false, "locked": false,
"version": 2, "version": 2,
"targets": { "targets": {
".NETFramework,Version=v4.5.1": { ".NETFramework,Version=v4.5.1": {},
"Microsoft.AspNet.SignalR.Client.Portable/2.0.1": { ".NETPortable,Version=v4.5,Profile=Profile111": {}
"type": "package",
"dependencies": {
"Microsoft.Net.Http": "2.2.18",
"Newtonsoft.Json": "5.0.6"
},
"compile": {
"lib/Microsoft.AspNet.SignalR.Client.dll": {}
},
"runtime": {
"lib/Microsoft.AspNet.SignalR.Client.dll": {}
}
},
"Microsoft.Bcl/1.1.3": {
"type": "package",
"dependencies": {
"Microsoft.Bcl.Build": "1.0.4"
},
"compile": {
"lib/net45/_._": {}
},
"runtime": {
"lib/net45/_._": {}
}
},
"Microsoft.Bcl.Build/1.0.10": {
"type": "package"
},
"Microsoft.Net.Http/2.2.18": {
"type": "package",
"dependencies": {
"Microsoft.Bcl": "1.1.3",
"Microsoft.Bcl.Build": "1.0.10"
},
"frameworkAssemblies": [
"System.Net.Http",
"System.Net.Http.WebRequest"
],
"compile": {
"lib/net45/System.Net.Http.Extensions.dll": {},
"lib/net45/System.Net.Http.Primitives.dll": {}
},
"runtime": {
"lib/net45/System.Net.Http.Extensions.dll": {},
"lib/net45/System.Net.Http.Primitives.dll": {}
}
},
"Newtonsoft.Json/5.0.6": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
}
},
"libraries": {
"Microsoft.AspNet.SignalR.Client.Portable/2.0.1": {
"sha512": "IrbSa4V7I+sQbhXiZV+4FFAp0FKZ2Q+zJsbGmBUtixzWVksDytSl5zIOov8dAk6FiZWdvNOUigz8pbOJZL82Lw==",
"type": "package",
"files": [
"Microsoft.AspNet.SignalR.Client.Portable.2.0.1.nupkg.sha512",
"Microsoft.AspNet.SignalR.Client.Portable.nuspec",
"lib/Microsoft.AspNet.SignalR.Client.XML",
"lib/Microsoft.AspNet.SignalR.Client.dll"
]
},
"Microsoft.Bcl/1.1.3": {
"sha512": "NlSh9kk1UyC25O5JJ6vM/omaEirx0Ysep3CMkFNluQbzlIE14eWNa2rHtmFV1NGAsA/OW6MYvuSi7T7aowD2jw==",
"type": "package",
"files": [
"License-RTM.rtf",
"Microsoft.Bcl.1.1.3.nupkg.sha512",
"Microsoft.Bcl.nuspec",
"ReleaseNotes.txt",
"content/net45/_._",
"content/portable-net45+win8+wp8/_._",
"content/sl4/_._",
"content/sl5/_._",
"content/win8/_._",
"content/wp8/_._",
"lib/net40/System.IO.dll",
"lib/net40/System.IO.xml",
"lib/net40/System.Runtime.dll",
"lib/net40/System.Runtime.xml",
"lib/net40/System.Threading.Tasks.dll",
"lib/net40/System.Threading.Tasks.xml",
"lib/net40/ensureRedirect.xml",
"lib/net45/_._",
"lib/portable-net40+sl4+win8+wp71/System.IO.dll",
"lib/portable-net40+sl4+win8+wp71/System.IO.xml",
"lib/portable-net40+sl4+win8+wp71/System.Runtime.dll",
"lib/portable-net40+sl4+win8+wp71/System.Runtime.xml",
"lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll",
"lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.xml",
"lib/portable-net40+sl4+win8+wp71/ensureRedirect.xml",
"lib/portable-net40+sl4+win8+wp8/System.IO.dll",
"lib/portable-net40+sl4+win8+wp8/System.IO.xml",
"lib/portable-net40+sl4+win8+wp8/System.Runtime.dll",
"lib/portable-net40+sl4+win8+wp8/System.Runtime.xml",
"lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll",
"lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.xml",
"lib/portable-net40+sl4+win8+wp8/ensureRedirect.xml",
"lib/portable-net40+sl4+win8/System.IO.dll",
"lib/portable-net40+sl4+win8/System.IO.xml",
"lib/portable-net40+sl4+win8/System.Runtime.dll",
"lib/portable-net40+sl4+win8/System.Runtime.xml",
"lib/portable-net40+sl4+win8/System.Threading.Tasks.dll",
"lib/portable-net40+sl4+win8/System.Threading.Tasks.xml",
"lib/portable-net40+sl4+win8/ensureRedirect.xml",
"lib/portable-net40+sl5+win8+wp8/System.IO.dll",
"lib/portable-net40+sl5+win8+wp8/System.IO.xml",
"lib/portable-net40+sl5+win8+wp8/System.Runtime.dll",
"lib/portable-net40+sl5+win8+wp8/System.Runtime.xml",
"lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll",
"lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.xml",
"lib/portable-net40+sl5+win8+wp8/ensureRedirect.xml",
"lib/portable-net40+win8+wp8/System.IO.dll",
"lib/portable-net40+win8+wp8/System.IO.xml",
"lib/portable-net40+win8+wp8/System.Runtime.dll",
"lib/portable-net40+win8+wp8/System.Runtime.xml",
"lib/portable-net40+win8+wp8/System.Threading.Tasks.dll",
"lib/portable-net40+win8+wp8/System.Threading.Tasks.xml",
"lib/portable-net40+win8+wp8/ensureRedirect.xml",
"lib/portable-net40+win8/System.IO.dll",
"lib/portable-net40+win8/System.IO.xml",
"lib/portable-net40+win8/System.Runtime.dll",
"lib/portable-net40+win8/System.Runtime.xml",
"lib/portable-net40+win8/System.Threading.Tasks.dll",
"lib/portable-net40+win8/System.Threading.Tasks.xml",
"lib/portable-net40+win8/ensureRedirect.xml",
"lib/portable-net45+win8+wp8/_._",
"lib/sl4-windowsphone71/System.IO.dll",
"lib/sl4-windowsphone71/System.IO.xml",
"lib/sl4-windowsphone71/System.Runtime.dll",
"lib/sl4-windowsphone71/System.Runtime.xml",
"lib/sl4-windowsphone71/System.Threading.Tasks.dll",
"lib/sl4-windowsphone71/System.Threading.Tasks.xml",
"lib/sl4-windowsphone71/ensureRedirect.xml",
"lib/sl4/System.IO.dll",
"lib/sl4/System.IO.xml",
"lib/sl4/System.Runtime.dll",
"lib/sl4/System.Runtime.xml",
"lib/sl4/System.Threading.Tasks.dll",
"lib/sl4/System.Threading.Tasks.xml",
"lib/sl5/System.IO.dll",
"lib/sl5/System.IO.xml",
"lib/sl5/System.Runtime.dll",
"lib/sl5/System.Runtime.xml",
"lib/sl5/System.Threading.Tasks.dll",
"lib/sl5/System.Threading.Tasks.xml",
"lib/win8/_._",
"lib/wp8/_._"
]
},
"Microsoft.Bcl.Build/1.0.10": {
"sha512": "JpazBBc/JT6o76Gx2q3mxJlGHfv2gK+GTzaJ+PZjf2XNGQOcajNU4PKJqc0udRwmPunZP5GrMhiWUuDVkabh+A==",
"type": "package",
"files": [
"License-Stable.rtf",
"Microsoft.Bcl.Build.1.0.10.nupkg.sha512",
"Microsoft.Bcl.Build.nuspec",
"content/net40/_._",
"content/netcore45/_._",
"content/portable-net40+win8+sl4+wp71/_._",
"content/sl4-windowsphone71/_._",
"content/sl4/_._",
"tools/Install.ps1",
"tools/Microsoft.Bcl.Build.Tasks.dll",
"tools/Microsoft.Bcl.Build.targets",
"tools/Uninstall.ps1"
]
},
"Microsoft.Net.Http/2.2.18": {
"sha512": "YSmLk8qh917EkfrP5ULL4Nu8mxpoz1fwd5pXwNPUlg4+grLWWpHyYPIMZKjxa7HOR5gsZ8ZfhaSoYzQyom8xUw==",
"type": "package",
"files": [
"License-Stable.rtf",
"Microsoft.Net.Http.2.2.18.nupkg.sha512",
"Microsoft.Net.Http.nuspec",
"lib/net40/System.Net.Http.Extensions.XML",
"lib/net40/System.Net.Http.Extensions.dll",
"lib/net40/System.Net.Http.Primitives.dll",
"lib/net40/System.Net.Http.Primitives.xml",
"lib/net40/System.Net.Http.WebRequest.dll",
"lib/net40/System.Net.Http.WebRequest.xml",
"lib/net40/System.Net.Http.dll",
"lib/net40/System.Net.Http.xml",
"lib/net40/ensureRedirect.xml",
"lib/net45/System.Net.Http.Extensions.XML",
"lib/net45/System.Net.Http.Extensions.dll",
"lib/net45/System.Net.Http.Primitives.dll",
"lib/net45/System.Net.Http.Primitives.xml",
"lib/net45/ensureRedirect.xml",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.Extensions.XML",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.Extensions.dll",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.Primitives.XML",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.Primitives.dll",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.dll",
"lib/portable-net40+sl4+win8+wp71/System.Net.Http.xml",
"lib/portable-net40+sl4+win8+wp71/ensureRedirect.xml",
"lib/portable-net45+win8/System.Net.Http.Extensions.XML",
"lib/portable-net45+win8/System.Net.Http.Extensions.dll",
"lib/portable-net45+win8/System.Net.Http.Primitives.dll",
"lib/portable-net45+win8/System.Net.Http.Primitives.xml",
"lib/portable-net45+win8/ensureRedirect.xml",
"lib/sl4-windowsphone71/System.Net.Http.Extensions.XML",
"lib/sl4-windowsphone71/System.Net.Http.Extensions.dll",
"lib/sl4-windowsphone71/System.Net.Http.Primitives.XML",
"lib/sl4-windowsphone71/System.Net.Http.Primitives.dll",
"lib/sl4-windowsphone71/System.Net.Http.dll",
"lib/sl4-windowsphone71/System.Net.Http.xml",
"lib/win8/System.Net.Http.Extensions.XML",
"lib/win8/System.Net.Http.Extensions.dll",
"lib/win8/System.Net.Http.Primitives.dll",
"lib/win8/System.Net.Http.Primitives.xml"
]
},
"Newtonsoft.Json/5.0.6": {
"sha512": "Z594WlU7Wndv4vQxwsS7ym2y2Izsuw5U86UxQbx6YIKIjVju7V7OU4l1QQl5fM9AmPdzWIOxSlonzuQzzulMaw==",
"type": "package",
"files": [
"Newtonsoft.Json.5.0.6.nupkg.sha512",
"Newtonsoft.Json.nuspec",
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
"lib/net35/Newtonsoft.Json.dll",
"lib/net35/Newtonsoft.Json.xml",
"lib/net40/Newtonsoft.Json.dll",
"lib/net40/Newtonsoft.Json.xml",
"lib/net45/Newtonsoft.Json.dll",
"lib/net45/Newtonsoft.Json.xml",
"lib/netcore45/Newtonsoft.Json.dll",
"lib/netcore45/Newtonsoft.Json.xml",
"lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll",
"lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.xml",
"lib/portable-net45+wp80+win8/Newtonsoft.Json.dll",
"lib/portable-net45+wp80+win8/Newtonsoft.Json.xml"
]
}
}, },
"libraries": {},
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
"": [ "": [],
"Microsoft.AspNet.SignalR.Client.Portable >= 2.0.1" ".NETFramework,Version=v4.5.1": [],
], ".NETPortable,Version=v4.5,Profile=Profile111": []
".NETFramework,Version=v4.5.1": []
} }
} }

@ -1,121 +1,121 @@
using System.Linq; using System.Linq;
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Yavsc.Models; using Yavsc.Models;
using Yavsc.Models.Billing; using Yavsc.Models.Billing;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[Authorize(Roles="Administrator")] [Authorize(Roles="Administrator")]
public class SIRENExceptionsController : Controller public class SIRENExceptionsController : Controller
{ {
private ApplicationDbContext _context; private ApplicationDbContext _context;
public SIRENExceptionsController(ApplicationDbContext context) public SIRENExceptionsController(ApplicationDbContext context)
{ {
_context = context; _context = context;
} }
// GET: SIRENExceptions // GET: SIRENExceptions
public IActionResult Index() public IActionResult Index()
{ {
return View(_context.ExceptionsSIREN.ToList()); return View(_context.ExceptionsSIREN.ToList());
} }
// GET: SIRENExceptions/Details/5 // GET: SIRENExceptions/Details/5
public IActionResult Details(string id) public IActionResult Details(string id)
{ {
if (id == null) if (id == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id);
if (exceptionSIREN == null) if (exceptionSIREN == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
return View(exceptionSIREN); return View(exceptionSIREN);
} }
// GET: SIRENExceptions/Create // GET: SIRENExceptions/Create
public IActionResult Create() public IActionResult Create()
{ {
return View(); return View();
} }
// POST: SIRENExceptions/Create // POST: SIRENExceptions/Create
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public IActionResult Create(ExceptionSIREN exceptionSIREN) public IActionResult Create(ExceptionSIREN exceptionSIREN)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
_context.ExceptionsSIREN.Add(exceptionSIREN); _context.ExceptionsSIREN.Add(exceptionSIREN);
_context.SaveChanges(); _context.SaveChanges();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
return View(exceptionSIREN); return View(exceptionSIREN);
} }
// GET: SIRENExceptions/Edit/5 // GET: SIRENExceptions/Edit/5
public IActionResult Edit(string id) public IActionResult Edit(string id)
{ {
if (id == null) if (id == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id);
if (exceptionSIREN == null) if (exceptionSIREN == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
return View(exceptionSIREN); return View(exceptionSIREN);
} }
// POST: SIRENExceptions/Edit/5 // POST: SIRENExceptions/Edit/5
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public IActionResult Edit(ExceptionSIREN exceptionSIREN) public IActionResult Edit(ExceptionSIREN exceptionSIREN)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
_context.Update(exceptionSIREN); _context.Update(exceptionSIREN);
_context.SaveChanges(); _context.SaveChanges();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
return View(exceptionSIREN); return View(exceptionSIREN);
} }
// GET: SIRENExceptions/Delete/5 // GET: SIRENExceptions/Delete/5
[ActionName("Delete")] [ActionName("Delete")]
public IActionResult Delete(string id) public IActionResult Delete(string id)
{ {
if (id == null) if (id == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id);
if (exceptionSIREN == null) if (exceptionSIREN == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
return View(exceptionSIREN); return View(exceptionSIREN);
} }
// POST: SIRENExceptions/Delete/5 // POST: SIRENExceptions/Delete/5
[HttpPost, ActionName("Delete")] [HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(string id) public IActionResult DeleteConfirmed(string id)
{ {
ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id);
_context.ExceptionsSIREN.Remove(exceptionSIREN); _context.ExceptionsSIREN.Remove(exceptionSIREN);
_context.SaveChanges(); _context.SaveChanges();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
} }
} }

@ -1,37 +1,37 @@
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Identity; using Yavsc.Models.Identity;
namespace Yavsc.Models namespace Yavsc.Models
{ {
public class ApplicationUser : IdentityUser public class ApplicationUser : IdentityUser
{ {
[Display(Name="AccountBalance")] [Display(Name="AccountBalance")]
public virtual AccountBalance AccountBalance { get; set; } public virtual AccountBalance AccountBalance { get; set; }
[InverseProperty("Author")] [InverseProperty("Author")]
public virtual List<Blog> Posts { get; set; } public virtual List<Blog> Posts { get; set; }
[InverseProperty("Owner")] [InverseProperty("Owner")]
public virtual List<Contact> Book { get; set; } public virtual List<Contact> Book { get; set; }
[InverseProperty("DeviceOwner")] [InverseProperty("DeviceOwner")]
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; } public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
[InverseProperty("Owner")] [InverseProperty("Owner")]
public virtual List<Circle> Circles { get; set; } public virtual List<Circle> Circles { get; set; }
public virtual Location PostalAddress { get; set; } public virtual Location PostalAddress { get; set; }
public string DedicatedGoogleCalendar { get; set; } public string DedicatedGoogleCalendar { get; set; }
public override string ToString() { public override string ToString() {
return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString(); return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString();
} }
} }
} }

@ -1,18 +1,18 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models namespace Yavsc.Models
{ {
public class Contact public class Contact
{ {
[Required()] [Required()]
public string UserId { get; set; } public string UserId { get; set; }
[Required()] [Required()]
public string OwnerId { get; set; } public string OwnerId { get; set; }
[ForeignKeyAttribute("OwnerId")] [ForeignKeyAttribute("OwnerId")]
public virtual ApplicationUser Owner { get; set; } public virtual ApplicationUser Owner { get; set; }
} }
} }

@ -1,40 +1,40 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market; using Yavsc.Models.Market;
namespace Yavsc.Models namespace Yavsc.Models
{ {
public class Activity public class Activity
{ {
[StringLength(512),Required,Key] [StringLength(512),Required,Key]
public string Code {get; set;} public string Code {get; set;}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[StringLength(512),Required()] [StringLength(512),Required()]
public string Name {get; set;} public string Name {get; set;}
public string Description {get; set;} public string Description {get; set;}
/// <summary> /// <summary>
/// Name to associate to a performer in this activity domain /// Name to associate to a performer in this activity domain
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public string ActorDenomination {get; set;} public string ActorDenomination {get; set;}
public string Photo {get; set;} public string Photo {get; set;}
[InverseProperty("Context")] [InverseProperty("Context")]
public List<Service> Services { get; set; } public List<Service> Services { get; set; }
/// <summary> /// <summary>
/// Moderation settings /// Moderation settings
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
string ModeratorGroupName { get; set; } string ModeratorGroupName { get; set; }
} }
} }

@ -1,30 +1,30 @@
@model BookQuery @model BookQuery
@using Yavsc.Models.Google.Messaging @using Yavsc.Models.Google.Messaging
@{ @{
ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode]; ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode];
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewData["Title"]</h2>
<div class="form-horizontal"> <div class="form-horizontal">
<h4>@SR["Your book query"]</h4> <h4>@SR["Your book query"]</h4>
<hr /> <hr />
<label for="EventDate">@SR["Event date"]</label>: @Html.DisplayFor(m => m.EventDate) <label for="EventDate">@SR["Event date"]</label>: @Html.DisplayFor(m => m.EventDate)
<br/> <br/>
<label for="Location">@SR["Location"]</label>: @Html.DisplayFor(m => m.Location) <label for="Location">@SR["Location"]</label>: @Html.DisplayFor(m => m.Location)
<br/> <br/>
@if (ViewBag.GooglePayload !=null) @if (ViewBag.GooglePayload !=null)
{ {
@if (ViewBag.GooglePayload.success>0) { @if (ViewBag.GooglePayload.success>0) {
<h4>@SR["GCM Notifications sent"]</h4> <h4>@SR["GCM Notifications sent"]</h4>
} }
else { else {
if (ViewBag.GooglePayload.failure>0) if (ViewBag.GooglePayload.failure>0)
{ {
<h4>@SR["GCM Notification sending failed"]</h4> <h4>@SR["GCM Notification sending failed"]</h4>
} }
} }
} }
</div> </div>

@ -1,22 +1,22 @@
@model Yavsc.Models.Billing.ExceptionSIREN @model Yavsc.Models.Billing.ExceptionSIREN
<form asp-action="Create"> <form asp-action="Create">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Exception SIREN</h4> <h4>Exception SIREN</h4>
<hr /> <hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div> <div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group"> <div class="form-group">
@Html.TextBox("SIREN") @Html.TextBox("SIREN")
<div class="col-md-offset-1 col-md-10"> <div class="col-md-offset-1 col-md-10">
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" /> <input type="submit" value="Create" class="btn btn-default" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<div> <div>
<a asp-action="Index">Back to List</a> <a asp-action="Index">Back to List</a>
</div> </div>

@ -1,31 +1,31 @@
@model Yavsc.Models.Billing.ExceptionSIREN @model Yavsc.Models.Billing.ExceptionSIREN
@{ @{
Layout = null; Layout = null;
} }
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>Delete</title> <title>Delete</title>
</head> </head>
<body> <body>
<h3>Are you sure you want to delete this?</h3> <h3>Are you sure you want to delete this?</h3>
<div> <div>
<h4>ExceptionSIREN</h4> <h4>ExceptionSIREN</h4>
<hr /> <hr />
<dl class="dl-horizontal"> <dl class="dl-horizontal">
</dl> </dl>
<form asp-action="Delete"> <form asp-action="Delete">
<div class="form-actions no-color"> <div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> | <input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a> <a asp-action="Index">Back to List</a>
</div> </div>
</form> </form>
</div> </div>
</body> </body>
</html> </html>

@ -1,27 +1,27 @@
@model Yavsc.Models.Billing.ExceptionSIREN @model Yavsc.Models.Billing.ExceptionSIREN
@{ @{
Layout = null; Layout = null;
} }
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>Details</title> <title>Details</title>
</head> </head>
<body> <body>
<div> <div>
<h4>ExceptionSIREN</h4> <h4>ExceptionSIREN</h4>
<hr /> <hr />
<dl class="dl-horizontal"> <dl class="dl-horizontal">
</dl> </dl>
</div> </div>
<p> <p>
<a asp-action="Edit" asp-route-id="@Model.SIREN">Edit</a> | <a asp-action="Edit" asp-route-id="@Model.SIREN">Edit</a> |
<a asp-action="Index">Back to List</a> <a asp-action="Index">Back to List</a>
</p> </p>
</body> </body>
</html> </html>

@ -1,39 +1,39 @@
@model Yavsc.Models.Billing.ExceptionSIREN @model Yavsc.Models.Billing.ExceptionSIREN
@{ @{
Layout = null; Layout = null;
} }
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>Edit</title> <title>Edit</title>
</head> </head>
<body> <body>
<form asp-action="Edit"> <form asp-action="Edit">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>ExceptionSIREN</h4> <h4>ExceptionSIREN</h4>
<hr /> <hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div> <div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
@Html.DisplayFor(model => model.SIREN) : @Html.DisplayFor(model => model.SIREN) :
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-1 col-md-10"> <div class="col-md-offset-1 col-md-10">
@Html.InputFor(model => model.SIREN) @Html.InputFor(model => model.SIREN)
</div> </div>
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" /> <input type="submit" value="Save" class="btn btn-default" />
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<div> <div>
<a asp-action="Index">Back to List</a> <a asp-action="Index">Back to List</a>
</div> </div>
</body> </body>
</html> </html>

@ -1,21 +1,21 @@
@model IEnumerable<Yavsc.Models.Billing.ExceptionSIREN> @model IEnumerable<Yavsc.Models.Billing.ExceptionSIREN>
<p> <p>
<a asp-action="Create">Create New</a> <a asp-action="Create">Create New</a>
</p> </p>
<table class="table"> <table class="table">
<tr> <tr>
<th>Exceptions à la validation des code SIREN</th> <th>Exceptions à la validation des code SIREN</th>
</tr> </tr>
@foreach (var item in Model) { @foreach (var item in Model) {
<tr> <tr>
<td>@item.SIREN</td> <td>@item.SIREN</td>
<td> <td>
<a asp-action="Edit" asp-route-id="@item.SIREN">Edit</a> | <a asp-action="Edit" asp-route-id="@item.SIREN">Edit</a> |
<a asp-action="Details" asp-route-id="@item.SIREN">Details</a> | <a asp-action="Details" asp-route-id="@item.SIREN">Details</a> |
<a asp-action="Delete" asp-route-id="@item.SIREN">Delete</a> <a asp-action="Delete" asp-route-id="@item.SIREN">Delete</a>
</td> </td>
</tr> </tr>
} }
</table> </table>

@ -6,6 +6,10 @@
"bin": { "bin": {
"assembly": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.dll", "assembly": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.dll",
"pdb": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.pdb" "pdb": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.pdb"
},
"dependencies": {
"Json.NET.Web": "1.0.49",
"Newtonsoft.Json": "9.0.1"
} }
} }
} }

Loading…