WindowsPhone: WeatherInformation
authorGustavo Martin <gu.martinm@gmail.com>
Mon, 19 May 2014 05:43:57 +0000 (07:43 +0200)
committerGustavo Martin <gu.martinm@gmail.com>
Mon, 19 May 2014 05:43:57 +0000 (07:43 +0200)
43 files changed:
WindowsPhone/WeatherInformation/WeatherInformation.sln [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/App.xaml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/App.xaml.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/AlignmentGrid.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/ApplicationIcon.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileLarge.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileMedium.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileSmall.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileMediumLarge.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileSmall.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Images/add.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Images/feature.settings.png [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/LocalizedStrings.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Clouds.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Coord.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/CurrentWeather.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Main.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Rain.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Sys.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Weather.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Wind.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/City.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Coord.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/ForecastWeather.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/List.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Temp.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Weather.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/JsonDataParser/JsonParser.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Model/Services/ServiceParser.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Properties/AppManifest.xml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Properties/AssemblyInfo.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Properties/WMAppManifest.xml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/SampleData/MainViewModelSampleData.xaml [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/ItemViewModel.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/MainViewModel.cs [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/WeatherInformation.csproj [new file with mode: 0644]
WindowsPhone/WeatherInformation/WeatherInformation/packages.config [new file with mode: 0644]

diff --git a/WindowsPhone/WeatherInformation/WeatherInformation.sln b/WindowsPhone/WeatherInformation/WeatherInformation.sln
new file mode 100644 (file)
index 0000000..54c1b02
--- /dev/null
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30110.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherInformation", "WeatherInformation\WeatherInformation.csproj", "{71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Debug|ARM = Debug|ARM
+               Debug|x86 = Debug|x86
+               Release|Any CPU = Release|Any CPU
+               Release|ARM = Release|ARM
+               Release|x86 = Release|x86
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|ARM.ActiveCfg = Debug|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|ARM.Build.0 = Debug|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|ARM.Deploy.0 = Debug|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|x86.ActiveCfg = Debug|x86
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|x86.Build.0 = Debug|x86
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Debug|x86.Deploy.0 = Debug|x86
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|Any CPU.Build.0 = Release|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|Any CPU.Deploy.0 = Release|Any CPU
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|ARM.ActiveCfg = Release|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|ARM.Build.0 = Release|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|ARM.Deploy.0 = Release|ARM
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|x86.ActiveCfg = Release|x86
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|x86.Build.0 = Release|x86
+               {71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}.Release|x86.Deploy.0 = Release|x86
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/App.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/App.xaml
new file mode 100644 (file)
index 0000000..895af5e
--- /dev/null
@@ -0,0 +1,20 @@
+<Application
+    x:Class="WeatherInformation.App"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
+
+    <!--Recursos de la aplicación-->
+    <Application.Resources>
+        <local:LocalizedStrings xmlns:local="clr-namespace:WeatherInformation" x:Key="LocalizedStrings"/>
+    </Application.Resources>
+
+    <Application.ApplicationLifetimeObjects>
+        <!--Objeto requerido que controla los eventos de duración de la aplicación-->
+        <shell:PhoneApplicationService
+            Launching="Application_Launching" Closing="Application_Closing"
+            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
+    </Application.ApplicationLifetimeObjects>
+
+</Application>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/App.xaml.cs b/WindowsPhone/WeatherInformation/WeatherInformation/App.xaml.cs
new file mode 100644 (file)
index 0000000..fcf2361
--- /dev/null
@@ -0,0 +1,247 @@
+using System;
+using System.Diagnostics;
+using System.Resources;
+using System.Windows;
+using System.Windows.Markup;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using WeatherInformation.Resources;
+using WeatherInformation.ViewModels;
+
+namespace WeatherInformation
+{
+    public partial class App : Application
+    {
+        private static MainViewModel viewModel = null;
+
+        /// <summary>
+        /// ViewModel estático que usan las vistas con el que se van a enlazar.
+        /// </summary>
+        /// <returns>Objeto MainViewModel.</returns>
+        public static MainViewModel ViewModel
+        {
+            get
+            {
+                // Retrasar la creación del modelo de vista hasta que sea necesario
+                if (viewModel == null)
+                    viewModel = new MainViewModel();
+
+                return viewModel;
+            }
+        }
+
+        /// <summary>
+        /// Proporcionar acceso sencillo al marco raíz de la aplicación telefónica.
+        /// </summary>
+        /// <returns>Marco raíz de la aplicación telefónica.</returns>
+        public static PhoneApplicationFrame RootFrame { get; private set; }
+
+        /// <summary>
+        /// Constructor para el objeto Application.
+        /// </summary>
+        public App()
+        {
+            // Controlador global para excepciones no detectadas.
+            UnhandledException += Application_UnhandledException;
+
+            // Inicialización XAML estándar
+            InitializeComponent();
+
+            // Inicialización especifica del teléfono
+            InitializePhoneApplication();
+
+            // Inicialización del idioma
+            InitializeLanguage();
+
+            // Mostrar información de generación de perfiles gráfica durante la depuración.
+            if (Debugger.IsAttached)
+            {
+                // Mostrar los contadores de velocidad de marcos actual
+                Application.Current.Host.Settings.EnableFrameRateCounter = true;
+
+                // Mostrar las áreas de la aplicación que se están volviendo a dibujar en cada marco.
+                //Application.Current.Host.Settings.EnableRedrawRegions = true;
+
+                // Habilitar el modo de visualización de análisis de no producción,
+                // que muestra áreas de una página que se entregan a la GPU con una superposición coloreada.
+                //Application.Current.Host.Settings.EnableCacheVisualization = true;
+
+                // Impedir que la pantalla se apague mientras se realiza la depuración deshabilitando
+                // la detección de inactividad de la aplicación.
+                // Precaución: solo debe usarse en modo de depuración. Las aplicaciones que deshabiliten la detección de inactividad del usuario seguirán en ejecución
+                // y consumirán energía de la batería cuando el usuario no esté usando el teléfono.
+                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
+            }
+        }
+
+        // Código para ejecutar cuando la aplicación se inicia (p.ej. a partir de Inicio)
+        // Este código no se ejecutará cuando la aplicación se reactive
+        private void Application_Launching(object sender, LaunchingEventArgs e)
+        {
+        }
+
+        // Código para ejecutar cuando la aplicación se activa (se trae a primer plano)
+        // Este código no se ejecutará cuando la aplicación se inicie por primera vez
+        private void Application_Activated(object sender, ActivatedEventArgs e)
+        {
+            // Asegurarse de que el estado de la aplicación se restaura adecuadamente
+            if (!App.ViewModel.IsDataLoaded)
+            {
+                App.ViewModel.LoadData();
+            }
+        }
+
+        // Código para ejecutar cuando la aplicación se desactiva (se envía a segundo plano)
+        // Este código no se ejecutará cuando la aplicación se cierre
+        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
+        {
+        }
+
+        // Código para ejecutar cuando la aplicación se cierra (p.ej., al hacer clic en Atrás)
+        // Este código no se ejecutará cuando la aplicación se desactive
+        private void Application_Closing(object sender, ClosingEventArgs e)
+        {
+            // Asegurarse de que el estado de la aplicación requerida persiste aquí.
+        }
+
+        // Código para ejecutar si hay un error de navegación
+        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
+        {
+            if (Debugger.IsAttached)
+            {
+                // Ha habido un error de navegación; interrumpir el depurador
+                Debugger.Break();
+            }
+        }
+
+        // Código para ejecutar en excepciones no controladas
+        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+        {
+            if (Debugger.IsAttached)
+            {
+                // Se ha producido una excepción no controlada; interrumpir el depurador
+                Debugger.Break();
+            }
+        }
+
+        #region Inicialización de la aplicación telefónica
+
+        // Evitar inicialización doble
+        private bool phoneApplicationInitialized = false;
+
+        // No agregar ningún código adicional a este método
+        private void InitializePhoneApplication()
+        {
+            if (phoneApplicationInitialized)
+                return;
+
+            // Crear el marco pero no establecerlo como RootVisual todavía; esto permite que
+            // la pantalla de presentación permanezca activa hasta que la aplicación esté lista para la presentación.
+            RootFrame = new PhoneApplicationFrame();
+            RootFrame.Navigated += CompleteInitializePhoneApplication;
+
+            // Controlar errores de navegación
+            RootFrame.NavigationFailed += RootFrame_NavigationFailed;
+
+            // Controlar solicitudes de restablecimiento para borrar la pila de retroceso
+            RootFrame.Navigated += CheckForResetNavigation;
+
+            // Asegurarse de que no volvemos a inicializar
+            phoneApplicationInitialized = true;
+        }
+
+        // No agregar ningún código adicional a este método
+        private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
+        {
+            // Establecer el objeto visual raíz para permitir que la aplicación se presente
+            if (RootVisual != RootFrame)
+                RootVisual = RootFrame;
+
+            // Quitar este controlador porque ya no es necesario
+            RootFrame.Navigated -= CompleteInitializePhoneApplication;
+        }
+
+        private void CheckForResetNavigation(object sender, NavigationEventArgs e)
+        {
+            // Si la aplicación ha recibido una navegación 'reset', tenemos que comprobarlo
+            // en la siguiente navegación para ver si se debe restablecer la pila de páginas
+            if (e.NavigationMode == NavigationMode.Reset)
+                RootFrame.Navigated += ClearBackStackAfterReset;
+        }
+
+        private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
+        {
+            // Anular registro del evento para que no se vuelva a llamar
+            RootFrame.Navigated -= ClearBackStackAfterReset;
+
+            // Borrar solo la pila de navegaciones 'new' (hacia delante) y 'refresh'
+            if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
+                return;
+
+            // Por coherencia de la IU, borrar toda la pila de páginas
+            while (RootFrame.RemoveBackEntry() != null)
+            {
+                ; // no hacer nada
+            }
+        }
+
+        #endregion
+
+        // Inicializar la fuente y la dirección de flujo de la aplicación según se define en sus cadenas de recursos traducidas.
+        //
+        // Para asegurarse de que la fuente de la aplicación está alineada con sus idiomas admitidos y que
+        // FlowDirection para todos esos idiomas sigue su dirección tradicional, ResourceLanguage
+        // y ResourceFlowDirection se debe inicializar en cada archivo resx para que estos valores coincidan con ese
+        // referencia cultural del archivo. Por ejemplo:
+        //
+        // AppResources.es-ES.resx
+        //    El valor de ResourceLanguage debe ser "es-ES"
+        //    El valor de ResourceFlowDirection debe ser "LeftToRight"
+        //
+        // AppResources.ar-SA.resx
+        //     El valor de ResourceLanguage debe ser "ar-SA"
+        //     El valor de ResourceFlowDirection debe ser "RightToLeft"
+        //
+        // Para obtener más información sobre cómo traducir aplicaciones para Windows Phone, consulta http://go.microsoft.com/fwlink/?LinkId=262072.
+        //
+        private void InitializeLanguage()
+        {
+            try
+            {
+                // Establecer la fuente para que coincida con el idioma definido por
+                // Cadena de recursos ResourceLanguage para cada idioma admitido.
+                //
+                // Recurrir a la fuente del idioma neutro si el idioma
+                // del teléfono no se admite.
+                //
+                // Si se produce un error del compilador, falta ResourceLanguage
+                // el archivo de recursos.
+                RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
+
+                // Establecer FlowDirection de todos los elementos del marco raíz según
+                // en la cadena de recursos ResourceFlowDirection para cada
+                // idioma admitido.
+                //
+                // Si se produce un error del compilador, falta ResourceFlowDirection
+                // el archivo de recursos.
+                FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
+                RootFrame.FlowDirection = flow;
+            }
+            catch
+            {
+                // Si se detecta aquí una excepción, lo más probable es que se deba a
+                // ResourceLanguage no se ha establecido correctamente en un idioma admitido
+                // o ResourceFlowDirection se ha establecido en un valor distinto de LeftToRight
+                // o RightToLeft.
+
+                if (Debugger.IsAttached)
+                {
+                    Debugger.Break();
+                }
+
+                throw;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/AlignmentGrid.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/AlignmentGrid.png
new file mode 100644 (file)
index 0000000..f7d2e97
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/AlignmentGrid.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/ApplicationIcon.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/ApplicationIcon.png
new file mode 100644 (file)
index 0000000..7d95d4e
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/ApplicationIcon.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileLarge.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileLarge.png
new file mode 100644 (file)
index 0000000..e0c59ac
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileLarge.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileMedium.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileMedium.png
new file mode 100644 (file)
index 0000000..e93b89d
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileMedium.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileSmall.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileSmall.png
new file mode 100644 (file)
index 0000000..550b1b5
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/FlipCycleTileSmall.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileMediumLarge.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileMediumLarge.png
new file mode 100644 (file)
index 0000000..686e6b5
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileMediumLarge.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileSmall.png b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileSmall.png
new file mode 100644 (file)
index 0000000..d4b5ede
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Assets/Tiles/IconicTileSmall.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Images/add.png b/WindowsPhone/WeatherInformation/WeatherInformation/Images/add.png
new file mode 100644 (file)
index 0000000..4b524d6
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Images/add.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Images/feature.settings.png b/WindowsPhone/WeatherInformation/WeatherInformation/Images/feature.settings.png
new file mode 100644 (file)
index 0000000..8efcfc2
Binary files /dev/null and b/WindowsPhone/WeatherInformation/WeatherInformation/Images/feature.settings.png differ
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/LocalizedStrings.cs b/WindowsPhone/WeatherInformation/WeatherInformation/LocalizedStrings.cs
new file mode 100644 (file)
index 0000000..f0b3b30
--- /dev/null
@@ -0,0 +1,14 @@
+using WeatherInformation.Resources;
+
+namespace WeatherInformation
+{
+    /// <summary>
+    /// Proporciona acceso a los recursos de cadena.
+    /// </summary>
+    public class LocalizedStrings
+    {
+        private static AppResources _localizedResources = new AppResources();
+
+        public AppResources LocalizedResources { get { return _localizedResources; } }
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml
new file mode 100644 (file)
index 0000000..8c1626b
--- /dev/null
@@ -0,0 +1,104 @@
+<phone:PhoneApplicationPage
+    x:Class="WeatherInformation.MainPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d"
+    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
+    shell:SystemTray.IsVisible="True">
+
+    <phone:PhoneApplicationPage.ApplicationBar>
+        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default">
+            <shell:ApplicationBar.MenuItems>
+                <shell:ApplicationBarMenuItem Click="Location_Click" Text="Location"/>
+                <shell:ApplicationBarMenuItem Click="Settings_Click" Text="Settings"/>
+            </shell:ApplicationBar.MenuItems>
+            <shell:ApplicationBarIconButton Click="Location_Click" IconUri="/Images/add.png"  Text="Location" />
+            <shell:ApplicationBarIconButton Click="Settings_Click" IconUri="/Images/feature.settings.png" Text="Settings"/>
+        </shell:ApplicationBar>
+    </phone:PhoneApplicationPage.ApplicationBar>
+    <!--LayoutRoot es la cuadrícula raíz donde se coloca todo el contenido de la página-->
+    <Grid x:Name="LayoutRoot" Background="Transparent">
+
+        <!-- NOTA PARA LA TRADUCCIÓN:
+            Para traducir las cadenas mostradas, copia sus valores a las claves con el nombre
+            correspondiente en el archivo de recursos del idioma neutro (AppResources.resx) de la aplicación y
+            reemplaza el valor de texto codificado de forma rígida entre las comillas de los atributos
+            con la cláusula de enlace cuya ruta de acceso apunte a ese nombre de cadena.
+
+            Por ejemplo:
+
+                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
+
+            Este enlace apunta al recurso de cadena de la plantilla denominado "ApplicationTitle".
+
+            Al agregar idiomas admitidos en la pestaña Propiedades del proyecto se creará un
+            nuevo archivo resx por idioma que puede contener los valores traducidos de las
+            cadenas de la interfaz de usuario. El enlace de estos ejemplos hará que el valor de los atributos
+            se tome del archivo .resx correspondiente al valor de
+            CurrentUICulture de la aplicación en tiempo de ejecución.
+         -->
+
+        <!--Control Pivot-->
+        <phone:Pivot Title="City, country">
+            <!--Elemento Pivot uno-->
+            <phone:PivotItem Header="forecast">
+                <!--Lista de líneas dobles con ajuste de texto-->
+                <phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding ForecastItems}" SelectionChanged="LongListSelector_SelectionChanged">
+                    <phone:LongListSelector.ItemTemplate>
+                        <DataTemplate>
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="*" />
+                                    <RowDefinition Height="*" />
+                                    <RowDefinition Height="*" />
+                                </Grid.RowDefinitions>
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="*" />
+                                </Grid.ColumnDefinitions>
+                                <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical" VerticalAlignment="Center">
+                                    <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                </StackPanel>
+                                <StackPanel Grid.Column="1" Grid.Row="0" Orientation="Vertical" VerticalAlignment="Center">
+                                    <TextBlock Text="{Binding LineThree}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    <TextBlock Text="{Binding LineFour}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                </StackPanel>
+                                <Image Grid.Column="2" Grid.Row="0" Source="{Binding LineFive}" Width="100" Height="100" Margin="12,-6,12,0" />
+                            </Grid>
+                        </DataTemplate>
+                    </phone:LongListSelector.ItemTemplate>
+                </phone:LongListSelector>
+            </phone:PivotItem>
+
+            <!--Elemento Pivot dos-->
+            <phone:PivotItem Header="second">
+                <!--Lista de líneas dobles sin ajuste de texto-->
+                <phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding ForecastItems}">
+                    <phone:LongListSelector.ItemTemplate>
+                        <DataTemplate>
+                        </DataTemplate>
+                    </phone:LongListSelector.ItemTemplate>
+                </phone:LongListSelector>
+            </phone:PivotItem>
+        </phone:Pivot>
+
+        <!--Quitar la marca de comentarios para ver una cuadrícula de alineación que
+            ayuda a comprobar que los controles están alineados en los límites normales.  La imagen tiene un margen superior de -32px para
+            tener en cuenta la bandeja del sistema. Establécelo en 0 (o quite el margen)
+            si la bandeja del sistema está oculta.
+
+            Antes de enviarla, quita este código XAML y la propia imagen.-->
+        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" IsHitTestVisible="False" />-->
+    </Grid>
+
+</phone:PhoneApplicationPage>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml.cs b/WindowsPhone/WeatherInformation/WeatherInformation/MainPage.xaml.cs
new file mode 100644 (file)
index 0000000..d53481a
--- /dev/null
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using WeatherInformation.Resources;
+
+namespace WeatherInformation
+{
+    public partial class MainPage : PhoneApplicationPage
+    {
+        // Constructor
+        public MainPage()
+        {
+            InitializeComponent();
+
+            // Establecer el contexto de datos del control ListBox control en los datos de ejemplo
+            DataContext = App.ViewModel;
+
+            // Código de ejemplo para traducir ApplicationBar
+            //BuildLocalizedApplicationBar();
+        }
+
+        // Cargar datos para los elementos ViewModel
+        protected override void OnNavigatedTo(NavigationEventArgs e)
+        {
+            if (!App.ViewModel.IsDataLoaded)
+            {
+                App.ViewModel.LoadData();
+            }
+        }
+
+        private void LongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+
+        }
+
+        private void Location_Click(object sender, EventArgs e)
+        {
+            NavigationService.Navigate(new Uri("/MapPage.xaml", UriKind.Relative));
+        }
+
+        private void Settings_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        // Código de ejemplo para compilar una ApplicationBar traducida
+        //private void BuildLocalizedApplicationBar()
+        //{
+        //    // Establecer ApplicationBar de la página en una nueva instancia de ApplicationBar.
+        //    ApplicationBar = new ApplicationBar();
+
+        //    // Crear un nuevo botón y establecer el valor de texto en la cadena traducida de AppResources.
+        //    ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
+        //    appBarButton.Text = AppResources.AppBarButtonText;
+        //    ApplicationBar.Buttons.Add(appBarButton);
+
+        //    // Crear un nuevo elemento de menú con la cadena traducida de AppResources.
+        //    ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
+        //    ApplicationBar.MenuItems.Add(appBarMenuItem);
+        //}
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml
new file mode 100644 (file)
index 0000000..c7d1ae2
--- /dev/null
@@ -0,0 +1,36 @@
+<phone:PhoneApplicationPage
+    x:Class="WeatherInformation.MapPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    SupportedOrientations="Portrait" Orientation="Portrait"
+    mc:Ignorable="d"
+    shell:SystemTray.IsVisible="True">
+
+    <!--LayoutRoot es la cuadrícula raíz donde se coloca todo el contenido de la página-->
+    <Grid x:Name="LayoutRoot" Background="Transparent">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+
+        <!--TitlePanel contiene el nombre de la aplicación y el título de la página-->
+        <StackPanel Grid.Row="0" Margin="12,17,0,28">
+            <TextBlock Text="Pick your location" Style="{StaticResource PhoneTextNormalStyle}"/>
+            <TextBlock Text="City, country" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
+        </StackPanel>
+
+        <!--ContentPanel. Colocar aquí el contenido adicional-->
+        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
+            <maps:Map x:Name="mapWeatherInformation" Grid.Row="1"/>
+        </Grid>
+    </Grid>
+
+</phone:PhoneApplicationPage>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml.cs b/WindowsPhone/WeatherInformation/WeatherInformation/MapPage.xaml.cs
new file mode 100644 (file)
index 0000000..2862df7
--- /dev/null
@@ -0,0 +1,134 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using System.IO.IsolatedStorage;
+using Windows.Devices.Geolocation;
+using System.Device.Location;
+using System.Windows.Shapes;
+using System.Windows.Media;
+using Microsoft.Phone.Maps.Controls;
+
+namespace WeatherInformation
+{
+    public partial class MapPage : PhoneApplicationPage
+    {
+        public MapPage()
+        {
+            InitializeComponent();
+        }
+
+        protected override void OnNavigatedTo(NavigationEventArgs e)
+        {
+            if (!IsolatedStorageSettings.ApplicationSettings.Contains("LocationConsent"))
+            {
+                MessageBoxResult result =
+                    MessageBox.Show("This app accesses your phone's location. Is that ok?",
+                    "Location",
+                    MessageBoxButton.OKCancel);
+
+                if (result == MessageBoxResult.OK)
+                {
+                    IsolatedStorageSettings.ApplicationSettings["LocationConsent"] = true;
+                }
+                else
+                {
+                    IsolatedStorageSettings.ApplicationSettings["LocationConsent"] = false;
+                }
+
+                IsolatedStorageSettings.ApplicationSettings.Save();
+            }
+
+            bool locationConsentValue;
+            if (IsolatedStorageSettings.ApplicationSettings.TryGetValue<bool>("LocationConsent", out locationConsentValue))
+            {
+                this.GetLocation();
+            }
+        }
+
+        private async void GetLocation()
+        {
+
+            if ((bool)IsolatedStorageSettings.ApplicationSettings["LocationConsent"] != true)
+            {
+                // The user has opted out of Location.
+                return;
+            }
+
+            Geolocator geolocator = new Geolocator();
+            geolocator.DesiredAccuracyInMeters = 50;
+
+            try
+            {
+                Geoposition geoposition = await geolocator.GetGeopositionAsync(
+                    maximumAge: TimeSpan.FromMinutes(5),
+                    timeout: TimeSpan.FromSeconds(10)
+                    );
+                GeoCoordinate myGeoCoordinate = CoordinateConverter.ConvertGeocoordinate(geoposition.Coordinate);
+
+                // Create a small circle to mark the current location.
+                Ellipse myCircle = new Ellipse();
+                myCircle.Fill = new SolidColorBrush(Colors.Blue);
+                myCircle.Height = 20;
+                myCircle.Width = 20;
+                myCircle.Opacity = 50;
+
+                // Create a MapOverlay to contain the circle.
+                MapOverlay myLocationOverlay = new MapOverlay();
+                myLocationOverlay.Content = myCircle;
+                myLocationOverlay.PositionOrigin = new Point(0.5, 0.5);
+                myLocationOverlay.GeoCoordinate = myGeoCoordinate;
+
+                // Create a MapLayer to contain the MapOverlay.
+                MapLayer myLocationLayer = new MapLayer();
+                myLocationLayer.Add(myLocationOverlay);
+
+                this.mapWeatherInformation.Center = myGeoCoordinate;
+                this.mapWeatherInformation.ZoomLevel = 13;
+
+                // Add the MapLayer to the Map.
+                this.mapWeatherInformation.Layers.Add(myLocationLayer);
+
+                
+
+                //LatitudeTextBlock.Text = geoposition.Coordinate.Latitude.ToString("0.00");
+                //LongitudeTextBlock.Text = geoposition.Coordinate.Longitude.ToString("0.00");
+            }
+            catch (Exception ex)
+            {
+                if ((uint)ex.HResult == 0x80004004)
+                {
+                    // the application does not have the right capability or the location master switch is off
+                    //StatusTextBlock.Text = "location  is disabled in phone settings.";
+                }
+                //else
+                {
+                    // something else happened acquring the location
+                }
+            }
+        }
+
+        public static class CoordinateConverter
+        {
+            public static GeoCoordinate ConvertGeocoordinate(Geocoordinate geocoordinate)
+            {
+                return new GeoCoordinate
+                    (
+                    geocoordinate.Latitude,
+                    geocoordinate.Longitude,
+                    geocoordinate.Altitude ?? Double.NaN,
+                    geocoordinate.Accuracy,
+                    geocoordinate.AltitudeAccuracy ?? Double.NaN,
+                    geocoordinate.Speed ?? Double.NaN,
+                    geocoordinate.Heading ?? Double.NaN
+                    );
+            }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Clouds.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Clouds.cs
new file mode 100644 (file)
index 0000000..5570271
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Clouds
+    {
+        public int all { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Coord.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Coord.cs
new file mode 100644 (file)
index 0000000..21a07b8
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Coord
+    {
+        public double lon { get; set; }
+        public int lat { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/CurrentWeather.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/CurrentWeather.cs
new file mode 100644 (file)
index 0000000..05d0c21
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class CurrentWeather
+    {
+        public Coord coord { get; set; }
+        public Sys sys { get; set; }
+        public List<Weather> weather { get; set; }
+        public string @base { get; set; }
+        public Main main { get; set; }
+        public Wind wind { get; set; }
+        public Rain rain { get; set; }
+        public Clouds clouds { get; set; }
+        public int dt { get; set; }
+        public int id { get; set; }
+        public string name { get; set; }
+        public int cod { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Main.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Main.cs
new file mode 100644 (file)
index 0000000..2840930
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Main
+    {
+        public double temp { get; set; }
+        public int pressure { get; set; }
+        public int humidity { get; set; }
+        public double temp_min { get; set; }
+        public double temp_max { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Rain.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Rain.cs
new file mode 100644 (file)
index 0000000..14229be
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Rain
+    {
+        private double threeHours;
+
+        public void set3h(double three)
+        {
+            this.threeHours = three;
+        }
+
+        public double get3h()
+        {
+            return this.threeHours;
+        }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Sys.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Sys.cs
new file mode 100644 (file)
index 0000000..002e8cd
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Sys
+    {
+        public double message { get; set; }
+        public string country { get; set; }
+        public int sunrise { get; set; }
+        public int sunset { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Weather.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Weather.cs
new file mode 100644 (file)
index 0000000..6f5529f
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Weather
+    {
+        public int id { get; set; }
+        public string main { get; set; }
+        public string description { get; set; }
+        public string icon { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Wind.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/CurrentWeatherParser/Wind.cs
new file mode 100644 (file)
index 0000000..6668990
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace WeatherInformation.Model.CurrentWeatherParser
+{
+    public class Wind
+    {
+        public double speed { get; set; }
+        public int deg { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/City.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/City.cs
new file mode 100644 (file)
index 0000000..6dd2b8b
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class City
+    {
+        public int id { get; set; }
+        public string name { get; set; }
+        public Coord coord { get; set; }
+        public string country { get; set; }
+        public int population { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Coord.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Coord.cs
new file mode 100644 (file)
index 0000000..3f2f2f8
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class Coord
+    {
+        public double lon { get; set; }
+        public double lat { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/ForecastWeather.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/ForecastWeather.cs
new file mode 100644 (file)
index 0000000..e8e6bfe
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class ForecastWeather
+    {
+        public string cod { get; set; }
+        public double message { get; set; }
+        public City city { get; set; }
+        public int cnt { get; set; }
+        public List<WeatherInformation.Model.ForecastWeatherParser.List> list { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/List.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/List.cs
new file mode 100644 (file)
index 0000000..6b9c0dd
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class List
+    {
+        public int dt { get; set; }
+        public Temp temp { get; set; }
+        public double pressure { get; set; }
+        public int humidity { get; set; }
+        public List<Weather> weather { get; set; }
+        public double speed { get; set; }
+        public int deg { get; set; }
+        public int clouds { get; set; }
+        public double rain { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Temp.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Temp.cs
new file mode 100644 (file)
index 0000000..cc420c3
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class Temp
+    {
+        public double day { get; set; }
+        public double min { get; set; }
+        public double max { get; set; }
+        public double night { get; set; }
+        public double eve { get; set; }
+        public double morn { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Weather.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/ForecastWeatherParser/Weather.cs
new file mode 100644 (file)
index 0000000..de25421
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+namespace WeatherInformation.Model.ForecastWeatherParser
+{
+    public class Weather
+    {
+        public int id { get; set; }
+        public string main { get; set; }
+        public string description { get; set; }
+        public string icon { get; set; }
+    }
+}
+
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/JsonDataParser/JsonParser.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/JsonDataParser/JsonParser.cs
new file mode 100644 (file)
index 0000000..3f077cb
--- /dev/null
@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+using WeatherInformation.Model.CurrentWeatherParser;
+using WeatherInformation.Model.ForecastWeatherParser;
+using System;
+
+namespace WeatherInformation.Model.JsonDataParser
+{
+    class JsonParser
+    {
+        /// <summary>
+        /// The _json settings.
+        /// </summary>
+        private static readonly JsonSerializerSettings _jsonSettings =
+            new JsonSerializerSettings
+            {
+                Error = delegate(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args)
+                {
+                    //Console.WriteLine(args.ErrorContext.Error.Message); No logs for WP8 :(
+                    args.ErrorContext.Handled = true;
+                }
+            };
+
+        public TWeatherData ParserWeatherData<TWeatherData>(String jsonData)
+        {
+            return JsonConvert.DeserializeObject<TWeatherData>(jsonData, _jsonSettings);
+        }
+    }
+}
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Model/Services/ServiceParser.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Model/Services/ServiceParser.cs
new file mode 100644 (file)
index 0000000..d855c90
--- /dev/null
@@ -0,0 +1,31 @@
+using WeatherInformation.Model.CurrentWeatherParser;
+using WeatherInformation.Model.ForecastWeatherParser;
+using WeatherInformation.Model.JsonDataParser;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WeatherInformation.Model.Services
+{
+    class ServiceParser
+    {
+        private readonly JsonParser _jsonParser;
+
+        public ServiceParser(JsonParser jsonParser)
+        {
+            this._jsonParser = jsonParser;
+        }
+
+        public CurrentWeather GetCurrentWeather(String jsonData)
+        {
+            return this._jsonParser.ParserWeatherData<CurrentWeather>(jsonData);
+        }
+
+        public ForecastWeather GetForecastWeather(String jsonData)
+        {
+            return this._jsonParser.ParserWeatherData<ForecastWeather>(jsonData);
+        }
+    }
+}
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Properties/AppManifest.xml b/WindowsPhone/WeatherInformation/WeatherInformation/Properties/AppManifest.xml
new file mode 100644 (file)
index 0000000..3b998eb
--- /dev/null
@@ -0,0 +1,4 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Deployment.Parts>
+    </Deployment.Parts>
+</Deployment>
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Properties/AssemblyInfo.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..1181882
--- /dev/null
@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// La información general de un ensamblado se controla mediante el siguiente 
+// conjunto de atributos. Cambie los valores de estos atributos para modificar la información
+// asociada a un ensamblado.
+[assembly: AssemblyTitle("WeatherInformation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WeatherInformation")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Si ComVisible se establece en False, los componentes COM no verán los 
+// tipos de este ensamblado.  Si necesita obtener acceso a un tipo de este ensamblado desde 
+// COM, establezca el atributo ComVisible en True en este tipo.
+[assembly: ComVisible(false)]
+
+// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
+[assembly: Guid("21be107b-f7de-4ff1-b103-90430c323fe2")]
+
+// La información de versión de un ensamblado consta de los cuatro valores siguientes:
+//
+//      Versión principal
+//      Versión secundaria 
+//      Número de compilación
+//      Revisión
+//
+// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y revisión 
+// mediante el carácter '*', como se muestra a continuación:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguageAttribute("es-ES")]
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Properties/WMAppManifest.xml b/WindowsPhone/WeatherInformation/WeatherInformation/Properties/WMAppManifest.xml
new file mode 100644 (file)
index 0000000..6f0fb18
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
+  <DefaultLanguage xmlns="" code="es-ES" />
+  <Languages xmlns="">
+    <Language code="en-US" />
+  </Languages>
+  <App xmlns="" ProductID="{71d9693c-af50-4d7f-ac37-811ba1f1a0d7}" Title="WeatherInformation" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="Gustavo Martin Morcuende" Description="Sample description" Publisher="gumartinm.name" PublisherID="{78440e1b-f001-4e24-a0ea-dce58b830f07}">
+    <IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
+    <Capabilities>
+      <Capability Name="ID_CAP_NETWORKING" />
+      <Capability Name="ID_CAP_MEDIALIB_AUDIO" />
+      <Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
+      <Capability Name="ID_CAP_SENSORS" />
+      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+      <Capability Name="ID_CAP_MAP" />
+      <Capability Name="ID_CAP_LOCATION" />
+    </Capabilities>
+    <Tasks>
+      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
+    </Tasks>
+    <Tokens>
+      <PrimaryToken TokenID="WeatherInformationToken" TaskName="_default">
+        <TemplateFlip>
+          <SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
+          <Count>0</Count>
+          <BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
+          <Title>WeatherInformation</Title>
+          <BackContent>
+          </BackContent>
+          <BackBackgroundImageURI>
+          </BackBackgroundImageURI>
+          <BackTitle>
+          </BackTitle>
+          <DeviceLockImageURI>
+          </DeviceLockImageURI>
+          <HasLarge>
+          </HasLarge>
+        </TemplateFlip>
+      </PrimaryToken>
+    </Tokens>
+    <ScreenResolutions>
+      <ScreenResolution Name="ID_RESOLUTION_WVGA" />
+      <ScreenResolution Name="ID_RESOLUTION_WXGA" />
+      <ScreenResolution Name="ID_RESOLUTION_HD720P" />
+    </ScreenResolutions>
+  </App>
+</Deployment>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs
new file mode 100644 (file)
index 0000000..78ffd40
--- /dev/null
@@ -0,0 +1,138 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Este código fue generado por una herramienta.
+//     Versión de runtime:4.0.30319.17626
+//
+//     Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
+//     se vuelve a generar el código.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WeatherInformation.Resources
+{
+    using System;
+
+
+    /// <summary>
+    ///   Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc.
+    /// </summary>
+    // StronglyTypedResourceBuilder generó automáticamente esta clase
+    // a través de una herramienta como ResGen o Visual Studio.
+    // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
+    // con la opción /str o recompila tu proyecto de Visual Studio.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    public class AppResources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal AppResources()
+        {
+        }
+
+        /// <summary>
+        ///   Devuelve la instancia de ResourceManager almacenada en caché usada por esta clase.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if (object.ReferenceEquals(resourceMan, null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeatherInformation.Resources.AppResources", typeof(AppResources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Invalida la propiedad CurrentUICulture del subproceso actual para todas las
+        ///   búsquedas de recursos usando esta clase de recursos fuertemente tipados.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar a LeftToRight.
+        /// </summary>
+        public static string ResourceFlowDirection
+        {
+            get
+            {
+                return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar a us-EN.
+        /// </summary>
+        public static string ResourceLanguage
+        {
+            get
+            {
+                return ResourceManager.GetString("ResourceLanguage", resourceCulture);
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar a MI APLICACIÓN.
+        /// </summary>
+        public static string ApplicationTitle
+        {
+            get
+            {
+                return ResourceManager.GetString("ApplicationTitle", resourceCulture);
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar a Valor de propiedad en tiempo de ejecución de ejemplo.
+        /// </summary>
+        public static string SampleProperty
+        {
+            get
+            {
+                return ResourceManager.GetString("SampleProperty", resourceCulture);
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar al texto del botón.
+        /// </summary>
+        public static string AppBarButtonText
+        {
+            get
+            {
+                return ResourceManager.GetString("AppBarButtonText", resourceCulture);
+            }
+        }
+
+        /// <summary>
+        ///   Busca una cadena traducida similar a elemento de menú.
+        /// </summary>
+        public static string AppBarMenuItemText
+        {
+            get
+            {
+                return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx
new file mode 100644 (file)
index 0000000..7f350d6
--- /dev/null
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!--
+    Microsoft ResX Schema
+
+    Version 2.0
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
+    associated with the data types.
+
+    Example:
+
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+
+    There are any number of "resheader" rows that contain simple
+    name/value pairs.
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
+    mimetype set.
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
+    extensible. For a given mimetype the value must be set accordingly:
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
+    read any of the formats listed below.
+
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="ResourceFlowDirection" xml:space="preserve">
+    <value>LeftToRight</value>
+    <comment>Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language</comment>
+  </data>
+  <data name="ResourceLanguage" xml:space="preserve">
+    <value>es-ES</value>
+    <comment>Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.</comment>
+  </data>
+  <data name="ApplicationTitle" xml:space="preserve">
+    <value>MI APLICACIÓN</value>
+  </data>
+  <data name="SampleProperty" xml:space="preserve">
+    <value>Valor de propiedad en tiempo de ejecución de ejemplo</value>
+  </data>
+  <data name="AppBarButtonText" xml:space="preserve">
+    <value>agregar</value>
+  </data>
+  <data name="AppBarMenuItemText" xml:space="preserve">
+    <value>Elemento de menú</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/SampleData/MainViewModelSampleData.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/SampleData/MainViewModelSampleData.xaml
new file mode 100644 (file)
index 0000000..4c4241e
--- /dev/null
@@ -0,0 +1,25 @@
+<vm:MainViewModel
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:vm="clr-namespace:WeatherInformation.ViewModels"
+    SampleProperty="Valor de propiedad Sample Text">
+
+    <vm:MainViewModel.ForecastItems>
+        <vm:ItemViewModel LineOne="MON" LineTwo="1" LineThree="15ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="TUE" LineTwo="2" LineThree="16ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="WED" LineTwo="3" LineThree="14ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="THU" LineTwo="4" LineThree="12ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="FRI" LineTwo="5" LineThree="13ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="SAT" LineTwo="6" LineThree="20ºC" LineFour="10ºC" LineFive="/Assets/Tiles/IconicTileMediumLarge.png"/>
+    </vm:MainViewModel.ForecastItems>
+
+    <vm:MainViewModel.CurrentItems>
+        <vm:ItemViewModel LineOne="MON 1" LineTwo="15ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="TUE 2" LineTwo="16ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="WED 3" LineTwo="14ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="THU 4" LineTwo="12ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="FRI 5" LineTwo="13ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+        <vm:ItemViewModel LineOne="SAT 6" LineTwo="20ºC" LineThree="/Assets/Tiles/IconicTileMediumLarge.png"/>
+    </vm:MainViewModel.CurrentItems>
+
+</vm:MainViewModel>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/ItemViewModel.cs b/WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/ItemViewModel.cs
new file mode 100644 (file)
index 0000000..7988bde
--- /dev/null
@@ -0,0 +1,130 @@
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+
+namespace WeatherInformation.ViewModels
+{
+    public class ItemViewModel : INotifyPropertyChanged
+    {
+        private string _lineOne;
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace.
+        /// </summary>
+        /// <returns></returns>
+        public string LineOne
+        {
+            get
+            {
+                return _lineOne;
+            }
+            set
+            {
+                if (value != _lineOne)
+                {
+                    _lineOne = value;
+                    NotifyPropertyChanged("LineOne");
+                }
+            }
+        }
+
+        private string _lineTwo;
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace.
+        /// </summary>
+        /// <returns></returns>
+        public string LineTwo
+        {
+            get
+            {
+                return _lineTwo;
+            }
+            set
+            {
+                if (value != _lineTwo)
+                {
+                    _lineTwo = value;
+                    NotifyPropertyChanged("LineTwo");
+                }
+            }
+        }
+
+        private string _lineThree;
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace.
+        /// </summary>
+        /// <returns></returns>
+        public string LineThree
+        {
+            get
+            {
+                return _lineThree;
+            }
+            set
+            {
+                if (value != _lineThree)
+                {
+                    _lineThree = value;
+                    NotifyPropertyChanged("LineThree");
+                }
+            }
+        }
+
+        private string _lineFour;
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace.
+        /// </summary>
+        /// <returns></returns>
+        public string LineFour
+        {
+            get
+            {
+                return _lineFour;
+            }
+            set
+            {
+                if (value != _lineFour)
+                {
+                    _lineFour = value;
+                    NotifyPropertyChanged("LineFour");
+                }
+            }
+        }
+
+        private string _lineFive;
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace.
+        /// </summary>
+        /// <returns></returns>
+        public string LineFive
+        {
+            get
+            {
+                return _lineFive;
+            }
+            set
+            {
+                if (value != _lineFive)
+                {
+                    _lineFive = value;
+                    NotifyPropertyChanged("LineFive");
+                }
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        private void NotifyPropertyChanged(String propertyName)
+        {
+            PropertyChangedEventHandler handler = PropertyChanged;
+            if (null != handler)
+            {
+                handler(this, new PropertyChangedEventArgs(propertyName));
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/MainViewModel.cs b/WindowsPhone/WeatherInformation/WeatherInformation/ViewModels/MainViewModel.cs
new file mode 100644 (file)
index 0000000..3deea79
--- /dev/null
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Globalization;
+using WeatherInformation.Model.ForecastWeatherParser;
+using WeatherInformation.Model.JsonDataParser;
+using WeatherInformation.Model.Services;
+using WeatherInformation.Resources;
+
+namespace WeatherInformation.ViewModels
+{
+    public class MainViewModel : INotifyPropertyChanged
+    {
+        public MainViewModel()
+        {
+            this.ForecastItems = new ObservableCollection<ItemViewModel>();
+            this.CurrentItems = new ObservableCollection<ItemViewModel>();
+            this._serviceParser = new ServiceParser(new JsonParser());
+        }
+
+        /// <summary>
+        /// Colección para objetos ItemViewModel.
+        /// </summary>
+        public ObservableCollection<ItemViewModel> ForecastItems { get; private set; }
+        public ObservableCollection<ItemViewModel> CurrentItems { get; private set; }
+        //public string ForecastHeader { get; private set; }
+
+        private string _sampleProperty = "Sample Runtime Property Value";
+
+        private readonly ServiceParser _serviceParser;
+
+        string _jsonForeCastWeatherData =
+    "{"
+    + "\"cod\":\"200\","
+    + "\"message\":0.0048,"
+    + "\"city\":{\"id\":2641549,\"name\":\"Newtonhill\",\"coord\":{\"lon\":-2.15,\"lat\":57.033329},\"country\":\"GB\",\"population\":0},"
+    + "\"cnt\":15,"
+    + "\"list\":["
+    + "{\"dt\":1397304000,\"temp\":{\"day\":286.15,\"min\":284.62,\"max\":286.15,\"night\":284.62,\"eve\":285.7,\"morn\":286.15},\"pressure\":1016.67,\"humidity\":84,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":7.68,\"deg\":252,\"clouds\":0,\"rain\":0.25},"
+    + "{\"dt\":1397390400,\"temp\":{\"day\":284.92,\"min\":282.3,\"max\":284.92,\"night\":282.3,\"eve\":283.79,\"morn\":284.24},\"pressure\":1021.62,\"humidity\":84,\"weather\":[{\"id\":804,\"main\":\"Clouds\",\"description\":\"overcast clouds\",\"icon\":\"04d\"}],\"speed\":7.91,\"deg\":259,\"clouds\":92},"
+    + "{\"dt\":1397476800,\"temp\":{\"day\":282.1,\"min\":280.32,\"max\":282.1,\"night\":280.32,\"eve\":281.51,\"morn\":281.65},\"pressure\":1033.84,\"humidity\":92,\"weather\":[{\"id\":801,\"main\":\"Clouds\",\"description\":\"few clouds\",\"icon\":\"02d\"}],\"speed\":8.37,\"deg\":324,\"clouds\":20},"
+    + "{\"dt\":1397563200,\"temp\":{\"day\":280.73,\"min\":280.11,\"max\":281.4,\"night\":281.4,\"eve\":280.75,\"morn\":280.11},\"pressure\":1039.27,\"humidity\":97,\"weather\":[{\"id\":801,\"main\":\"Clouds\",\"description\":\"few clouds\",\"icon\":\"02d\"}],\"speed\":7.31,\"deg\":184,\"clouds\":12},"
+    + "{\"dt\":1397649600,\"temp\":{\"day\":281.73,\"min\":281.03,\"max\":282.22,\"night\":281.69,\"eve\":282.22,\"morn\":281.03},\"pressure\":1036.05,\"humidity\":90,\"weather\":[{\"id\":803,\"main\":\"Clouds\",\"description\":\"broken clouds\",\"icon\":\"04d\"}],\"speed\":7.61,\"deg\":205,\"clouds\":68},"
+    + "{\"dt\":1397736000,\"temp\":{\"day\":282.9,\"min\":281.45,\"max\":283.21,\"night\":282.71,\"eve\":283.06,\"morn\":281.49},\"pressure\":1029.39,\"humidity\":83,\"weather\":[{\"id\":803,\"main\":\"Clouds\",\"description\":\"broken clouds\",\"icon\":\"04d\"}],\"speed\":6.17,\"deg\":268,\"clouds\":56},"
+    + "{\"dt\":1397822400,\"temp\":{\"day\":285.26,\"min\":281.55,\"max\":285.26,\"night\":282.48,\"eve\":285.09,\"morn\":281.55},\"pressure\":1025.83,\"humidity\":0,\"weather\":[{\"id\":800,\"main\":\"Clear\",\"description\":\"sky is clear\",\"icon\":\"01d\"}],\"speed\":5.31,\"deg\":221,\"clouds\":10},"
+    + "{\"dt\":1397908800,\"temp\":{\"day\":284.29,\"min\":281.5,\"max\":284.29,\"night\":282.53,\"eve\":283.58,\"morn\":281.5},\"pressure\":1024.55,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":5.51,\"deg\":192,\"clouds\":6},"
+    + "{\"dt\":1397995200,\"temp\":{\"day\":283.36,\"min\":281.62,\"max\":284.34,\"night\":284.04,\"eve\":284.34,\"morn\":281.62},\"pressure\":1019.58,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":7.66,\"deg\":149,\"clouds\":0,\"rain\":0.48},"
+    + "{\"dt\":1398081600,\"temp\":{\"day\":282.24,\"min\":280.51,\"max\":282.41,\"night\":280.51,\"eve\":282.41,\"morn\":280.9},\"pressure\":1027.35,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":8.17,\"deg\":221,\"clouds\":10,\"rain\":0.94},"
+    + "{\"dt\":1398168000,\"temp\":{\"day\":282.28,\"min\":279.76,\"max\":282.28,\"night\":280.69,\"eve\":281.13,\"morn\":279.76},\"pressure\":1038.31,\"humidity\":0,\"weather\":[{\"id\":800,\"main\":\"Clear\",\"description\":\"sky is clear\",\"icon\":\"01d\"}],\"speed\":6.33,\"deg\":172,\"clouds\":1},"
+    + "{\"dt\":1398254400,\"temp\":{\"day\":281.54,\"min\":280.52,\"max\":281.54,\"night\":281.44,\"eve\":281.23,\"morn\":280.52},\"pressure\":1022.4,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":7.84,\"deg\":140,\"clouds\":91,\"rain\":1.24},"
+    + "{\"dt\":1398340800,\"temp\":{\"day\":282.1,\"min\":280.66,\"max\":282.78,\"night\":280.97,\"eve\":282.78,\"morn\":280.66},\"pressure\":1013.39,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":9.43,\"deg\":164,\"clouds\":98,\"rain\":1.03},"
+    + "{\"dt\":1398427200,\"temp\":{\"day\":282.11,\"min\":280.72,\"max\":282.32,\"night\":282.32,\"eve\":280.99,\"morn\":280.72},\"pressure\":1018.65,\"humidity\":0,\"weather\":[{\"id\":502,\"main\":\"Rain\",\"description\":\"heavy intensity rain\",\"icon\":\"10d\"}],\"speed\":5.26,\"deg\":158,\"clouds\":83,\"rain\":14.4},"
+    + "{\"dt\":1398513600,\"temp\":{\"day\":282.75,\"min\":280.61,\"max\":282.75,\"night\":280.61,\"eve\":281.75,\"morn\":281.96},\"pressure\":1007.4,\"humidity\":0,\"weather\":[{\"id\":500,\"main\":\"Rain\",\"description\":\"light rain\",\"icon\":\"10d\"}],\"speed\":9.18,\"deg\":198,\"clouds\":35,\"rain\":0.55}"
+    + "]}";
+
+        /// <summary>
+        /// Propiedad Sample ViewModel; esta propiedad se usa en la vista para mostrar su valor mediante un enlace
+        /// </summary>
+        /// <returns></returns>
+        public string SampleProperty
+        {
+            get
+            {
+                return _sampleProperty;
+            }
+            set
+            {
+                if (value != _sampleProperty)
+                {
+                    _sampleProperty = value;
+                    NotifyPropertyChanged("SampleProperty");
+                }
+            }
+        }
+
+        /// <summary>
+        /// Propiedad de ejemplo que devuelve una cadena traducida
+        /// </summary>
+        public string LocalizedSampleProperty
+        {
+            get
+            {
+                return AppResources.SampleProperty;
+            }
+        }
+
+        public bool IsDataLoaded
+        {
+            get;
+            private set;
+        }
+
+        /// <summary>
+        /// Crear y agregar unos pocos objetos ItemViewModel a la colección Items.
+        /// </summary>
+        public void LoadData()
+        {
+            ForecastWeather weather = this._serviceParser.GetForecastWeather(this._jsonForeCastWeatherData);
+
+            foreach (WeatherInformation.Model.ForecastWeatherParser.List item in weather.list)
+            {
+                DateTime unixTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+                DateTime date = unixTime.AddSeconds(item.dt).ToLocalTime();
+                this.ForecastItems.Add(new ItemViewModel()
+                {
+                    LineOne = date.ToString("ddd", CultureInfo.InvariantCulture),
+                    LineTwo = date.ToString("dd", CultureInfo.InvariantCulture),
+                    LineThree = String.Format("{0:0.##}", item.temp.max),
+                    LineFour = String.Format("{0:0.##}", item.temp.min),
+                    LineFive = "/Assets/Tiles/IconicTileMediumLarge.png"
+                });
+            }
+
+            this.IsDataLoaded = true;
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        private void NotifyPropertyChanged(String propertyName)
+        {
+            PropertyChangedEventHandler handler = PropertyChanged;
+            if (null != handler)
+            {
+                handler(this, new PropertyChangedEventArgs(propertyName));
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/WeatherInformation.csproj b/WindowsPhone/WeatherInformation/WeatherInformation/WeatherInformation.csproj
new file mode 100644 (file)
index 0000000..9bd64e9
--- /dev/null
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.20506</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{71D9693C-AF50-4D7F-AC37-811BA1F1A0D7}</ProjectGuid>
+    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>WeatherInformation</RootNamespace>
+    <AssemblyName>WeatherInformation</AssemblyName>
+    <TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
+    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+    <SilverlightApplication>true</SilverlightApplication>
+    <SupportedCultures>
+    </SupportedCultures>
+    <XapOutputs>true</XapOutputs>
+    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+    <XapFilename>WeatherInformation_$(Configuration)_$(Platform).xap</XapFilename>
+    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+    <SilverlightAppEntry>WeatherInformation.App</SilverlightAppEntry>
+    <ValidateXaml>true</ValidateXaml>
+    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\x86\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\x86\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\ARM\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\ARM\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="LocalizedStrings.cs" />
+    <Compile Include="MainPage.xaml.cs">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="MapPage.xaml.cs">
+      <DependentUpon>MapPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Model\CurrentWeatherParser\Clouds.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Coord.cs" />
+    <Compile Include="Model\CurrentWeatherParser\CurrentWeather.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Main.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Rain.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Sys.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Weather.cs" />
+    <Compile Include="Model\CurrentWeatherParser\Wind.cs" />
+    <Compile Include="Model\ForecastWeatherParser\City.cs" />
+    <Compile Include="Model\ForecastWeatherParser\Coord.cs" />
+    <Compile Include="Model\ForecastWeatherParser\ForecastWeather.cs" />
+    <Compile Include="Model\ForecastWeatherParser\List.cs" />
+    <Compile Include="Model\ForecastWeatherParser\Temp.cs" />
+    <Compile Include="Model\ForecastWeatherParser\Weather.cs" />
+    <Compile Include="Model\JsonDataParser\JsonParser.cs" />
+    <Compile Include="Model\Services\ServiceParser.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Resources\AppResources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>AppResources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="ViewModels\ItemViewModel.cs" />
+    <Compile Include="ViewModels\MainViewModel.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </ApplicationDefinition>
+    <Page Include="MainPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <DesignData Include="SampleData\MainViewModelSampleData.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </DesignData>
+    <Page Include="MapPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+    <None Include="Properties\AppManifest.xml" />
+    <None Include="Properties\WMAppManifest.xml">
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Assets\AlignmentGrid.png" />
+    <Content Include="Assets\ApplicationIcon.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Assets\Tiles\FlipCycleTileLarge.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Assets\Tiles\FlipCycleTileMedium.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Assets\Tiles\FlipCycleTileSmall.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Assets\Tiles\IconicTileMediumLarge.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Assets\Tiles\IconicTileSmall.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Images\add.png" />
+    <Content Include="Images\feature.settings.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Resources\AppResources.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+      <LastGenOutput>AppResources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Newtonsoft.Json">
+      <HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ProjectExtensions />
+</Project>
\ No newline at end of file
diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/packages.config b/WindowsPhone/WeatherInformation/WeatherInformation/packages.config
new file mode 100644 (file)
index 0000000..b1d93b5
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Newtonsoft.Json" version="6.0.3" targetFramework="wp80" />
+</packages>
\ No newline at end of file