Commit 2c7f9b7c by Luis

Incidencia en el recetario

parent e37bfb03
......@@ -6,6 +6,10 @@
<assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
......
......@@ -2,12 +2,11 @@
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid90" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid90" />
<package id="Microsoft.CSharp" version="4.6.0" targetFramework="monoandroid90" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="monoandroid90" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="monoandroid90" />
<package id="Microsoft.NETCore.Platforms" version="3.0.0" targetFramework="monoandroid90" />
<package id="Microsoft.NETCore.Platforms" version="3.1.0" targetFramework="monoandroid90" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid90" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid90" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="monoandroid81" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="monoandroid90" />
<package id="Rg.Plugins.Popup" version="1.2.0.223" targetFramework="monoandroid90" />
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid90" />
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid90" />
......@@ -98,8 +97,8 @@
<package id="Xamarin.Android.Support.Vector.Drawable" version="28.0.0.3" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.VersionedParcelable" version="28.0.0.3" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.ViewPager" version="28.0.0.3" targetFramework="monoandroid90" />
<package id="Xamarin.Build.Download" version="0.4.11" targetFramework="monoandroid90" />
<package id="Xamarin.Build.Download" version="0.8.0" targetFramework="monoandroid90" />
<package id="Xamarin.FFImageLoading" version="2.4.11.982" targetFramework="monoandroid81" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.11.982" targetFramework="monoandroid81" />
<package id="Xamarin.Forms" version="4.2.0.848062" targetFramework="monoandroid90" />
<package id="Xamarin.Forms" version="4.4.0.991537" targetFramework="monoandroid90" />
</packages>
\ No newline at end of file
......@@ -67,7 +67,7 @@
<HintPath>..\packages\Refractored.MvvmHelpers.1.3.0\lib\netstandard1.0\MvvmHelpers.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\portable-net45+win8+wp8+wpa81\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\portable-net45+win8+wp8+wpa81\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="portable45-net45+win8+wp8" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="portable45-net45+win8+wp8" />
<package id="Refractored.MvvmHelpers" version="1.3.0" targetFramework="portable45-net45+win8+wp8" />
</packages>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<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="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.props')" />
<Import Project="..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
......@@ -50,6 +50,7 @@
<CodesignResourceRules />
<CodesignEntitlements />
<OptimizePNGs>true</OptimizePNGs>
<MtouchExtraArgs>-v -v -v -v</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
......@@ -138,33 +139,31 @@
<AppExtensionDebugBundleId />
</PropertyGroup>
<ItemGroup>
<Reference Include="FFImageLoading, Version=2.4.3.840, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.2.4.3.840\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
<Reference Include="FFImageLoading, Version=2.4.11.982, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.2.4.11.982\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
</Reference>
<Reference Include="FFImageLoading.Forms, Version=2.4.3.840, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.Forms.2.4.3.840\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
<Reference Include="FFImageLoading.Forms, Version=2.4.11.982, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.Forms.2.4.11.982\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Forms.Platform, Version=2.4.3.840, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.Forms.2.4.3.840\lib\Xamarin.iOS10\FFImageLoading.Forms.Platform.dll</HintPath>
<Reference Include="FFImageLoading.Forms.Platform, Version=2.4.11.982, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.Forms.2.4.11.982\lib\Xamarin.iOS10\FFImageLoading.Forms.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FFImageLoading.Platform, Version=2.4.3.840, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.2.4.3.840\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
<Reference Include="FFImageLoading.Platform, Version=2.4.11.982, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.FFImageLoading.2.4.11.982\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Plugin.Settings, Version=2.5.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xam.Plugins.Settings.2.5.8\lib\Xamarin.iOS10\Plugin.Settings.dll</HintPath>
<Reference Include="Rg.Plugins.Popup, Version=1.2.0.223, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Rg.Plugins.Popup.1.2.0.223\lib\Xamarin.IOS\Rg.Plugins.Popup.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Plugin.Settings.Abstractions, Version=2.5.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xam.Plugins.Settings.2.5.8\lib\Xamarin.iOS10\Plugin.Settings.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Rg.Plugins.Popup, Version=1.1.5.188, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Rg.Plugins.Popup.1.1.5.188\lib\Xamarin.IOS\Rg.Plugins.Popup.dll</HintPath>
</Reference>
<Reference Include="Rg.Plugins.Popup.IOS, Version=1.1.5.188, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Rg.Plugins.Popup.1.1.5.188\lib\Xamarin.IOS\Rg.Plugins.Popup.IOS.dll</HintPath>
<Reference Include="Rg.Plugins.Popup.IOS, Version=1.2.0.223, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Rg.Plugins.Popup.1.2.0.223\lib\Xamarin.IOS\Rg.Plugins.Popup.IOS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Rg.Plugins.Popup.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Rg.Plugins.Popup.1.0.4\lib\Xamarin.IOS\Rg.Plugins.Popup.Platform.dll</HintPath>
......@@ -202,16 +201,16 @@
<HintPath>..\packages\WebP.Touch.1.0.8\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.4.0.991537\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
<Reference Include="Xamarin.Forms.Platform, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.4.4.0.991537\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.4.0.991537\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.4.0.991537\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Xml.Linq" />
......@@ -324,7 +323,6 @@
</ImageAsset>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<ITunesArtwork Include="iTunesArtwork%402x" />
......@@ -425,11 +423,11 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use 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\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets'))" />
<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.4.4.0.991537\build\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.targets'))" />
</Target>
<Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
<Import Project="..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets')" />
<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.4.4.0.991537\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.4.4.0.991537\build\Xamarin.Forms.targets')" />
</Project>
\ No newline at end of file
......@@ -2,13 +2,13 @@
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="xamarinios10" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="xamarinios10" />
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="xamarinios10" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="xamarinios10" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="xamarinios10" />
<package id="Microsoft.NETCore.Platforms" version="2.2.0" targetFramework="xamarinios10" />
<package id="Microsoft.NETCore.Platforms" version="3.1.0" targetFramework="xamarinios10" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="xamarinios10" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="xamarinios10" />
<package id="Rg.Plugins.Popup" version="1.1.5.188" targetFramework="xamarinios10" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="xamarinios10" />
<package id="Rg.Plugins.Popup" version="1.2.0.223" targetFramework="xamarinios10" />
<package id="System.AppContext" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Collections" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="xamarinios10" />
......@@ -27,7 +27,7 @@
<package id="System.Linq" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Net.Http" version="4.3.4" targetFramework="xamarinios10" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Net.Primitives" version="4.3.1" targetFramework="xamarinios10" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Reflection" version="4.3.0" targetFramework="xamarinios10" />
......@@ -48,7 +48,7 @@
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="xamarinios10" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="xamarinios10" />
<package id="System.Threading" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="xamarinios10" />
......@@ -60,7 +60,7 @@
<package id="UXDivers.Effects" version="0.6.3" targetFramework="xamarinios10" />
<package id="WebP.Touch" version="1.0.8" targetFramework="xamarinios10" />
<package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading" version="2.4.3.840" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.3.840" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="3.4.0.1008975" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading" version="2.4.11.982" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.11.982" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="4.4.0.991537" targetFramework="xamarinios10" />
</packages>
\ No newline at end of file
......@@ -2,9 +2,9 @@
{
using inutralia.Abstractions;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
/// <summary>
/// Interfaz genérico de comunicación con un Web Service
......
......@@ -43,7 +43,8 @@
string path = string.Format("Models/{0}/{1}", GetDataPath(typeof(T)), id);
if (AppSettings.Contains(path))
{
var content = AppSettings.GetValueOrDefault<string>(path);
var content = AppSettings.GetValueOrDefault(path,"");
//var content = AppSettings.GetValueOrDefault<string>(path);
return JsonConvert.DeserializeObject<T>(content);
} //endif
......@@ -55,7 +56,8 @@
string path = GetItemPath(item);
if (AppSettings.Contains(path))
{
var content = AppSettings.GetValueOrDefault<string>(path);
//var content = AppSettings.GetValueOrDefault<string>(path);
var content = AppSettings.GetValueOrDefault(path,"");
JsonConvert.PopulateObject(content, item);
return true;
} //endif
......@@ -76,7 +78,8 @@
string path = string.Format("Models/{0}/{1}", basePath, id);
if (AppSettings.Contains(path))
{
var content = AppSettings.GetValueOrDefault<string>(path);
//var content = AppSettings.GetValueOrDefault<string>(path);
var content = AppSettings.GetValueOrDefault(path,"");
retVal.Add(JsonConvert.DeserializeObject<T>(content));
}
else
......@@ -137,7 +140,8 @@
if (AppSettings.Contains(path))
{
// Deserializar valor json
string value = AppSettings.GetValueOrDefault<string>(path);
//string value = AppSettings.GetValueOrDefault<string>(path);
string value = AppSettings.GetValueOrDefault(path,"");
JsonConvert.PopulateObject(value, retVal);
} //endif
......
......@@ -136,7 +136,7 @@ namespace inutralia.API
string dataPath = GetDataPath(item.GetType());
string fullPath = isNew ? dataPath : string.Format("{0}/{1}", dataPath, item.Id);
// Crear uri a partir de la URL base y el path
var uri = new Uri(string.Format(Constants.ApiUrlTemplate, fullPath));
......
namespace inutralia
{
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using inutralia.Views;
using inutralia.API;
using inutralia.Models;
using System.Reflection;
using System.IO;
using inutralia.Views;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Xamarin.Forms;
public partial class App : Application
{
private static bool _IsUserLoggedIn = false;
public static bool IsUserLoggedIn
{
get { return _IsUserLoggedIn; }
set
{
_IsUserLoggedIn = value;
if (!value)
{
API.Reset ();
{
private static bool _IsUserLoggedIn = false;
public static bool IsUserLoggedIn
{
get { return _IsUserLoggedIn; }
set
{
_IsUserLoggedIn = value;
if (!value)
{
API.Reset();
Current.MainPage = new NavigationPage(new LoginView());
}
}
}
}
}
}
public static bool _IsMenuConsultado = false;
......@@ -47,52 +47,54 @@ namespace inutralia
protected static List<RecipeOptionGroup> _FilterOptions = null;
public static List<RecipeOptionGroup> FilterOptions =>
_FilterOptions ?? (_FilterOptions = LoadFilterOptions() );
_FilterOptions ?? (_FilterOptions = LoadFilterOptions());
private static List<RecipeOptionGroup> LoadFilterOptions ()
private static List<RecipeOptionGroup> LoadFilterOptions()
{
var assembly = typeof (App).GetTypeInfo ().Assembly;
Stream stream = assembly.GetManifestResourceStream ("inutralia.filterOptions.json");
var assembly = typeof(App).GetTypeInfo().Assembly;
Stream stream = assembly.GetManifestResourceStream("inutralia.filterOptions.json");
List<RecipeOptionGroup> retVal;
using (var reader = new System.IO.StreamReader (stream))
using (var reader = new System.IO.StreamReader(stream))
{
var json = reader.ReadToEnd ();
var json = reader.ReadToEnd();
var serializerSettings = new JsonSerializerSettings { ObjectCreationHandling = ObjectCreationHandling.Replace, NullValueHandling = NullValueHandling.Ignore };
retVal = JsonConvert.DeserializeObject<List<RecipeOptionGroup>> (json);
retVal = JsonConvert.DeserializeObject<List<RecipeOptionGroup>>(json);
}
return retVal;
}
public App()
{
InitializeComponent();
{
InitializeComponent();
MainPage = new NavigationPage(new Page(
))
{ BarBackgroundColor = Color.FromHex("#FFa2c300"),
BarTextColor = Color.White};
API = new WebService();
LocalData = new LocalDataService ();
_FilterOptions = LoadFilterOptions ();
IsUserLoggedIn = false;
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
{
BarBackgroundColor = Color.FromHex("#FFa2c300"),
BarTextColor = Color.White
};
API = new WebService();
LocalData = new LocalDataService();
_FilterOptions = LoadFilterOptions();
IsUserLoggedIn = false;
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}
\ No newline at end of file
......@@ -4,40 +4,40 @@ using Plugin.Settings.Abstractions;
namespace inutralia.Helpers
{
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with getters
/// and setters.
/// </summary>
public static class Settings
{
private static ISettings AppSettings
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with getters
/// and setters.
/// </summary>
public static class Settings
{
get
{
return CrossSettings.Current;
}
}
private static ISettings AppSettings
{
get
{
return CrossSettings.Current;
}
}
#region Setting Constants
#region Setting Constants
private const string SettingsKey = "settings_key";
private static readonly string SettingsDefault = string.Empty;
private const string SettingsKey = "settings_key";
private static readonly string SettingsDefault = string.Empty;
#endregion
#endregion
public static string GeneralSettings
{
get
{
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
}
set
{
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
}
}
public static string GeneralSettings
{
get
{
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
}
set
{
AppSettings.AddOrUpdateValue(SettingsKey, value);
}
}
}
}
}
\ No newline at end of file
using inutralia;
using System.Reflection;
using Xamarin.Forms.Xaml;
using inutralia;
[assembly: AssemblyTitle(AssemblyGlobal.ProductLine + " - " + "Grial Xamarin.Forms UIKit")]
[assembly: AssemblyConfiguration(AssemblyGlobal.Configuration)]
......
namespace inutralia.ViewModels
{
using inutralia.Models;
using System.Threading.Tasks;
using MvvmHelpers;
using System.Diagnostics;
using System.Threading.Tasks;
using Xamarin.Forms;
public class ArticleListViewModel : BaseViewModel
......
namespace inutralia
{
using MvvmHelpers;
using Xamarin.Forms;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xamarin.Forms;
/// <summary>
/// Implements the INavigation interface on top of BaseViewModel.
......
namespace inutralia.ViewModels
{
using inutralia.Models;
using System.Threading.Tasks;
using Xamarin.Forms;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
public class CustomMenuViewModel : MenuBaseViewModel
{
......@@ -221,7 +220,7 @@
IsBusy = true;
OnPropertyChanged("NoMenuPanel");
// Obtener menú local
var lista = await App.LocalData.RefreshListAsync<LocalMenu>();
if (lista.Count > 0)
......
namespace inutralia.ViewModels
{
using inutralia.Models;
using System.Threading.Tasks;
using MvvmHelpers;
using System.Threading.Tasks;
using Xamarin.Forms;
public class GenericListViewModel : BaseViewModel
......
......@@ -2,9 +2,9 @@
{
using inutralia.Models;
using inutralia.Views;
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
using System;
/// <summary>
/// ViewModel de un menú semanal
......
namespace inutralia.ViewModels
{
using inutralia.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
......@@ -11,14 +9,14 @@
public CreateNutriQuestionViewModel()
{
Conversation = new Conversation();
}
public Conversation Conversation { get; private set; }
public async Task RefreshData()
{
if (Conversation == null)
......@@ -54,6 +52,6 @@
}
}
}
\ No newline at end of file
......@@ -40,11 +40,11 @@
}
public Conversation Conversation { get; private set; }
public async Task RefreshData()
{
......@@ -59,7 +59,7 @@
// Cambiar título
/*Title = Conversation.Subject;*/
} //endif
IsBusy = false;
......
......@@ -2,15 +2,16 @@
{
using inutralia.Models;
using System.Threading.Tasks;
using MvvmHelpers;
using System.Diagnostics;
using System.Threading.Tasks;
using Xamarin.Forms;
public class NutriQuestionListViewModel : BaseNavigationViewModel
{
public NutriQuestionListViewModel() {
public NutriQuestionListViewModel()
{
}
// Lista de conversaciones
......
namespace inutralia.ViewModels
{
using inutralia.Models.Questions;
using System;
using System.Threading.Tasks;
using inutralia.Models.Questions;
public class PendingReadViewModel : BaseNavigationViewModel
{
......
namespace inutralia.Views
{
using inutralia.Views.Question;
using inutralia.Views.NutriQuestion;
using System;
......
namespace inutralia.Views
{
using System;
using inutralia.Models;
using System;
using Xamarin.Forms;
public partial class LoginView : ContentPage
......
namespace inutralia.Views
{
// using inutralia.Views.Question;
// using inutralia.Views.Question;
using inutralia.Views.NutriQuestion;
using Xamarin.Forms;
......
......@@ -2,14 +2,11 @@
using inutralia.ViewModels;
using System;
using Xamarin.Forms;
using System.Threading.Tasks;
using Xamarin.Forms.Xaml;
namespace inutralia.Views.NutriQuestion
{
public partial class CreateNutriQuestion : ContentPage
{
public partial class CreateNutriQuestion : ContentPage
{
protected CreateNutriQuestionViewModel ViewModel => BindingContext as CreateNutriQuestionViewModel;
public CreateNutriQuestion()
......@@ -34,7 +31,7 @@ namespace inutralia.Views.NutriQuestion
var messageValue = consultaEditor.Text;
if (subjectValue==null || messageValue==null)
if (subjectValue == null || messageValue == null)
{
await DisplayAlert("Fallo", "El campo asunto y consulta no pueden ir vacíos. Son campos obligatorios.", "Entendido");
......@@ -49,10 +46,10 @@ namespace inutralia.Views.NutriQuestion
}
}
catch (Exception )
catch (Exception)
{
await DisplayAlert("Error", "Se ha producido un error. Por favor, intentelo más tarde", "Entendido");
}
......
......@@ -8,7 +8,7 @@ namespace inutralia.Views.NutriQuestion
{
public partial class DetailsNutriQuestionListView : ContentPage
{
protected DetailsNutriQuestionListViewModel ViewModel => BindingContext as DetailsNutriQuestionListViewModel;
protected DetailsNutriQuestionListViewModel ViewModel => BindingContext as DetailsNutriQuestionListViewModel;
public DetailsNutriQuestionListView()
......@@ -17,7 +17,7 @@ namespace inutralia.Views.NutriQuestion
InitializeComponent();
}
protected override async void OnAppearing()
{
base.OnAppearing();
......@@ -44,7 +44,7 @@ namespace inutralia.Views.NutriQuestion
messageEntry.Text = "";
messageEntry.IsVisible = false;
btnEnviar.IsVisible = false;
infoText.Text="Si estás viendo este mensaje, es que todavía no puedes responder a la consulta. Cada consulta a tu nutricionista tiene un máximo de dos mensajaes por tu parte. Una vez escrito un mensaje no podrás volver a contestar hasta que tu nutricionista haya leido y contestado tu mensaje anterior. Una vez sobrepasado el límite de mensajes la consulta pasa a estado cerrado y no se podra seguir conversando. Si te quedas con más dudas tendrás que crear una consulta nueva.";
infoText.Text = "Si estás viendo este mensaje, es que todavía no puedes responder a la consulta. Cada consulta a tu nutricionista tiene un máximo de dos mensajaes por tu parte. Una vez escrito un mensaje no podrás volver a contestar hasta que tu nutricionista haya leido y contestado tu mensaje anterior. Una vez sobrepasado el límite de mensajes la consulta pasa a estado cerrado y no se podra seguir conversando. Si te quedas con más dudas tendrás que crear una consulta nueva.";
await ViewModel.RefreshData();
......@@ -58,6 +58,6 @@ namespace inutralia.Views.NutriQuestion
}
}
}
}
......@@ -2,7 +2,6 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="inutralia.Views.NutriQuestion.NutriQuestionListView"
x:Name="NutriQuestionListView"
Title="Consultas">
<StackLayout Padding="15,15,15,30">
......
......@@ -16,7 +16,7 @@ namespace inutralia.Views.NutriQuestion
InitializeComponent();
BindingContext = new NutriQuestionListViewModel();
}
/// <summary>
......@@ -31,9 +31,9 @@ namespace inutralia.Views.NutriQuestion
// y con él se crea la página de detalle y se navega a ella
Navigation.PushAsync(
new DetailsNutriQuestionListView()
{
BindingContext = new DetailsNutriQuestionListViewModel(e.Item as Conversation)
}
{
BindingContext = new DetailsNutriQuestionListViewModel(e.Item as Conversation)
}
);
// Deselecciona el item para que no le cambie el color de fondo
......
namespace inutralia.Views
{
using System;
using inutralia.ViewModels;
using System;
using Xamarin.Forms;
public partial class ProfileView : ContentPage
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Esta es la página con el listado de menus genericos.
Tiene una lista con las siguientes características:
- Utiliza un ViewModel (paradigma MVVM) como BindingContext
- Muestra el listado de los menús genéricos
- Actualiza el listado al deslizar hacia abajo (pull-to-refresh)
- Tiene menú contextual (slide-right en iOS, mantener pulsado en Android)
con un botón para borrar una notificación
-->
<!-- Importante: La página necesita x:Name para poder referenciarla en la descripción
de los elementos del menú contextual
-->
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:conv="clr-namespace:inutralia.Converters;assembly=inutralia"
......@@ -19,8 +6,8 @@
x:Class="inutralia.Views.RecipeListView"
x:Name="recipeListView"
BackgroundColor="White"
Title="Recetas"
>
Title="Recetas">
<ContentPage.ToolbarItems>
<ToolbarItem Icon="icon_filter.png" Clicked="ToolbarFiltersClicked" />
</ContentPage.ToolbarItems>
......@@ -31,28 +18,32 @@
</ResourceDictionary>
</ContentPage.Resources>
<!-- Este es el componente para el listado. Primero configura de dónde obtiene los datos
y el método al que llamar cuando se hace tap en un elemento de la lista. Luego
configura el pull-to-refresh. Por último algunas opciones de visionado y gestión
de memoria
-->
<StackLayout VerticalOptions="FillAndExpand">
<ActivityIndicator HorizontalOptions="FillAndExpand" IsRunning="{Binding IsBusy}" IsVisible="{Binding IsBusy}"/>
<Label Text="Buscando recetas..." VerticalOptions="CenterAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" IsVisible="{Binding IsBusy}"/>
<Label Margin="8,0,8,0" Text="No se encontraron resultados. Cambie los filtros y pulse Aplicar" VerticalOptions="CenterAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" IsVisible="{Binding IsEmpty}"/>
<Label Text="Buscando recetas..."
VerticalOptions="CenterAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"
IsVisible="{Binding IsBusy}"/>
<Label Margin="8,0,8,0"
Text="No se encontraron resultados. Cambie los filtros y pulse Aplicar"
VerticalOptions="CenterAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"
IsVisible="{Binding IsEmpty}"/>
<ListView VerticalOptions="FillAndExpand"
SeparatorVisibility="None"
SeparatorColor="{ DynamicResource ListViewSeparatorColor }"
Footer=""
ItemsSource="{Binding Recipes}"
RowHeight="240"
ItemTapped="ItemTapped"
HasUnevenRows="false"
x:Name="listRecipe"
IsVisible="{Binding IsNotEmpty}">
SeparatorVisibility="None"
SeparatorColor="{ DynamicResource ListViewSeparatorColor }"
ItemsSource="{Binding Recipes}"
RowHeight="240"
ItemTapped="ItemTapped"
HasUnevenRows="false"
x:Name="listRecipe"
IsVisible="{Binding IsNotEmpty}">
<ListView.ItemTemplate>
<DataTemplate>
......@@ -64,3 +55,4 @@
</ListView>
</StackLayout>
</ContentPage>
......@@ -20,16 +20,8 @@
BindingContext = new RecipeListViewModel();
}
/// <summary>
/// Método llamado al hacer tap en un elemento de la lista. Navega a la página de detalle
/// de la receta seleccionada
/// </summary>
/// <param name="sender">La ListView</param>
/// <param name="e">Argumentos del evento</param>
void ItemTapped(object sender, ItemTappedEventArgs e)
{
// e.Item apunta a la receta seleccionada. A partir de ella se crea su ViewModel
// y con él se crea la página de detalle y se navega a ella
Navigation.PushAsync(
new RecipeDetailView() { BindingContext = new RecipeViewModel(e.Item as Recipe) }
);
......@@ -42,47 +34,35 @@
ViewModel.RefreshRecipesCommand.Execute(BindingContext);
}
/// <summary>
/// Método llamado cada vez que una página pasa a ser visible
/// </summary>
protected override async void OnAppearing()
{
base.OnAppearing();
// La primera vez forzamos la aparición del modal de filtrado
if (firstTime)
{
firstTime = false;
await DoFiltersAsync();
} //endif
}
}
/// <summary>
/// Método llamado al pulsar el toolbar 'Filtros'
/// </summary>
private async void ToolbarFiltersClicked(object sender, EventArgs e)
{
if (ViewModel.IsNotBusy)
await DoFiltersAsync();
}
/// <summary>
/// Tarea de filtrado. Muestra el modal, espera a que se cierre, y actualiza el listado
/// </summary>
protected async Task DoFiltersAsync()
{
// Crear la página de filtros si todavía no existe
if (filtersPage == null)
{
filtersPage = new ModalFiltersRecipe(this)
{
BindingContext = ViewModel.Filters
};
} //endif
}
// Mostrarla
await Navigation.PushAsync(filtersPage);
}
}
}
......@@ -4,6 +4,7 @@
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.Essentials;
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ListDelSuper : ContentPage
......@@ -20,7 +21,7 @@
((ListView)sender).SelectedItem = null;
}
private void BuyModalButton(object sender, WebNavigatingEventArgs e)
async void BuyModalButton(object sender, EventArgs e)
{
var browser = API.Constants.ApiUrl;
......@@ -30,7 +31,9 @@
}
browser = browser.TrimEnd(',');
Device.OpenUri(new Uri(browser));
await Xamarin.Essentials.Launcher.OpenAsync(new Uri(browser));
//Device.OpenUri(new Uri(browser));
}
async void CancelModalButton(object sender, EventArgs e)
......
namespace inutralia.Views
{
using System;
using inutralia.ViewModels;
using System;
using Xamarin.Forms;
......
......@@ -6,6 +6,10 @@
<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="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
......@@ -3,11 +3,11 @@
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8+wp8" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8+wp8" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable45-net45+win8+wp8" />
<package id="Microsoft.NETCore.Platforms" version="2.2.0" targetFramework="portable45-net45+win8+wp8" />
<package id="Microsoft.NETCore.Platforms" version="3.1.0" targetFramework="portable45-net45+win8+wp8" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="portable45-net45+win8+wp8" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="portable45-net45+win8+wp8" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="portable45-net45+win8+wp8" />
<package id="Refractored.MvvmHelpers" version="1.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="Rg.Plugins.Popup" version="1.1.5.188" targetFramework="portable45-net45+win8+wp8" />
<package id="Rg.Plugins.Popup" version="1.2.0.223" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Collections" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
......@@ -15,7 +15,8 @@
<package id="System.IO" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Linq" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Net.Primitives" version="4.3.1" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Reflection" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
......@@ -25,16 +26,18 @@
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Threading" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="portable45-net45+win8+wp8" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="portable45-net45+win8+wp8" />
<package id="UXDivers.Artina.Shared" version="2.0.35" targetFramework="portable45-net45+win8+wp8" />
<package id="UXDivers.Artina.Shared.Base" version="2.0.35" targetFramework="portable45-net45+win8+wp8" />
<package id="UXDivers.Effects" version="0.6.3" targetFramework="portable45-net45+win8+wp8" />
<package id="Xam.Plugins.Settings" version="2.5.8" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.Forms" version="3.0.0.561731" targetFramework="portable45-net45+win8+wp8" />
<package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.Essentials" version="1.3.1" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading" version="2.4.11.982" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.11.982" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.Forms" version="4.4.0.991537" targetFramework="portable45-net45+win8+wp8" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment