From 83b42c73ea608bc461fd04d1fb16afe8832141da Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Tue, 17 Jun 2014 07:04:36 +0200 Subject: [PATCH] WeatherInformation: using Windows Phone toolkit --- .../WeatherInformation/README_FIRST.txt | 3 + .../Resources/AppResources.Designer.cs | 141 ++++++++++----------- .../WeatherInformation/Resources/AppResources.resx | 62 +++++---- .../WeatherInformation/SettingsPage.xaml | 53 ++++---- .../WeatherInformation/SettingsPage.xaml.cs | 19 --- .../SettingsTemperatureUnitsPage.xaml | 38 ------ .../SettingsTemperatureUnitsPage.xaml.cs | 31 ----- .../Toolkit.Content/ApplicationBar.Add.png | Bin 0 -> 339 bytes .../Toolkit.Content/ApplicationBar.Cancel.png | Bin 0 -> 350 bytes .../Toolkit.Content/ApplicationBar.Check.png | Bin 0 -> 414 bytes .../Toolkit.Content/ApplicationBar.Delete.png | Bin 0 -> 445 bytes .../Toolkit.Content/ApplicationBar.Select.png | Bin 0 -> 863 bytes .../WeatherInformation/WeatherInformation.csproj | 16 ++- .../WeatherInformation/packages.config | 1 + 14 files changed, 143 insertions(+), 221 deletions(-) create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/README_FIRST.txt delete mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml delete mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml.cs create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Add.png create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Cancel.png create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Check.png create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Delete.png create mode 100644 WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Select.png diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/README_FIRST.txt b/WindowsPhone/WeatherInformation/WeatherInformation/README_FIRST.txt new file mode 100644 index 0000000..ce40c01 --- /dev/null +++ b/WindowsPhone/WeatherInformation/WeatherInformation/README_FIRST.txt @@ -0,0 +1,3 @@ +For the Windows Phone toolkit make sure that you have +marked the icons in the "Toolkit.Content" folder as content. That way they +can be used as the icons for the ApplicationBar control. \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs index 78ffd40..0600eb5 100644 --- a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs +++ b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.Designer.cs @@ -1,138 +1,135 @@ //------------------------------------------------------------------------------ // // Este código fue generado por una herramienta. -// Versión de runtime:4.0.30319.17626 +// Versión de runtime:4.0.30319.34014 // // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si // se vuelve a generar el código. // //------------------------------------------------------------------------------ -namespace WeatherInformation.Resources -{ +namespace WeatherInformation.Resources { using System; - - + + /// - /// Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc. + /// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc. /// // 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. + // con la opción /str o recompile su proyecto de VS. [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 - { - + 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() - { + internal AppResources() { } - + /// - /// Devuelve la instancia de ResourceManager almacenada en caché usada por esta clase. + /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager - { - get - { - if (object.ReferenceEquals(resourceMan, null)) - { + 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; } } - + /// - /// Invalida la propiedad CurrentUICulture del subproceso actual para todas las - /// búsquedas de recursos usando esta clase de recursos fuertemente tipados. + /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las + /// búsquedas de recursos mediante esta clase de recurso fuertemente tipado. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture - { - get - { + public static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } - + /// - /// Busca una cadena traducida similar a LeftToRight. + /// Busca una cadena traducida similar a agregar. /// - public static string ResourceFlowDirection - { - get - { - return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); + public static string AppBarButtonText { + get { + return ResourceManager.GetString("AppBarButtonText", resourceCulture); } } - + /// - /// Busca una cadena traducida similar a us-EN. + /// Busca una cadena traducida similar a Elemento de menú. /// - public static string ResourceLanguage - { - get - { - return ResourceManager.GetString("ResourceLanguage", resourceCulture); + public static string AppBarMenuItemText { + get { + return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); } } - + /// /// Busca una cadena traducida similar a MI APLICACIÓN. /// - public static string ApplicationTitle - { - get - { + public static string ApplicationTitle { + get { return ResourceManager.GetString("ApplicationTitle", resourceCulture); } } - + /// - /// Busca una cadena traducida similar a Valor de propiedad en tiempo de ejecución de ejemplo. + /// Busca una cadena traducida similar a Language. /// - public static string SampleProperty - { - get - { - return ResourceManager.GetString("SampleProperty", resourceCulture); + public static string LanguageSettingsText { + get { + return ResourceManager.GetString("LanguageSettingsText", resourceCulture); } } - + /// - /// Busca una cadena traducida similar al texto del botón. + /// Busca una cadena traducida similar a LeftToRight. /// - public static string AppBarButtonText - { - get - { - return ResourceManager.GetString("AppBarButtonText", resourceCulture); + public static string ResourceFlowDirection { + get { + return ResourceManager.GetString("ResourceFlowDirection", resourceCulture); } } - + /// - /// Busca una cadena traducida similar a elemento de menú. + /// Busca una cadena traducida similar a es-ES. /// - public static string AppBarMenuItemText - { - get - { - return ResourceManager.GetString("AppBarMenuItemText", resourceCulture); + public static string ResourceLanguage { + get { + return ResourceManager.GetString("ResourceLanguage", resourceCulture); + } + } + + /// + /// Busca una cadena traducida similar a Valor de propiedad en tiempo de ejecución de ejemplo. + /// + public static string SampleProperty { + get { + return ResourceManager.GetString("SampleProperty", resourceCulture); + } + } + + /// + /// Busca una cadena traducida similar a Temperature units. + /// + public static string TemperatureSettingsText { + get { + return ResourceManager.GetString("TemperatureSettingsText", resourceCulture); } } } -} \ No newline at end of file +} diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx index 7f350d6..10bd5a6 100644 --- a/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx +++ b/WindowsPhone/WeatherInformation/WeatherInformation/Resources/AppResources.resx @@ -1,17 +1,17 @@  - @@ -137,4 +137,12 @@ Elemento de menú + + Language + Text in settings page + + + Temperature units + Text in settings page + \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml index 0095553..f75296e 100644 --- a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml +++ b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml @@ -6,6 +6,7 @@ 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:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" mc:Ignorable="d" d:DataContext="{d:DesignData SampleData/SettingsViewModelSampleData.xaml}" FontFamily="{StaticResource PhoneFontFamilyNormal}" @@ -20,40 +21,38 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml.cs b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml.cs index 194be6a..df7243f 100644 --- a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml.cs +++ b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsPage.xaml.cs @@ -28,24 +28,5 @@ namespace WeatherInformation App.SettingsViewModel.LoadData(); } } - - private void LongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - LongListSelector selector = sender as LongListSelector; - ItemViewModel item = selector.SelectedItem as ItemViewModel; - switch(item.LineOne) - { - case "Temperature units": - NavigationService.Navigate(new Uri("/SettingsTemperatureUnitsPage.xaml", UriKind.Relative)); - break; - default: - break; - } - } - - private void StackPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) - { - - } } } \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml deleted file mode 100644 index 9af9e90..0000000 --- a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml.cs b/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml.cs deleted file mode 100644 index fbb95d6..0000000 --- a/WindowsPhone/WeatherInformation/WeatherInformation/SettingsTemperatureUnitsPage.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -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; - -namespace WeatherInformation -{ - public partial class SettingsTemperatureUnitsPage : PhoneApplicationPage - { - public SettingsTemperatureUnitsPage() - { - InitializeComponent(); - - // Establecer el contexto de datos del control ListBox control en los datos de ejemplo - DataContext = App.TemperatureUnitsViewModel; - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - if (!App.TemperatureUnitsViewModel.IsDataLoaded) - { - App.TemperatureUnitsViewModel.LoadData(); - } - } - } -} \ No newline at end of file diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Add.png b/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Add.png new file mode 100644 index 0000000000000000000000000000000000000000..4b524d6f14c6da928c2c8d2568b08eb761eee4c8 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^J|N7&1|*M957Y)yk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XzIwVihE&{obH|bQkby))pqEyH(1eB-&x1@t0S&Bk5*Rrr zH#E6OB%7>L{{E>|uIG6qT_6*FX_@{z`E0Aq@!sV2sTGcDH*{Hz%Q5{C literal 0 HcmV?d00001 diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Cancel.png b/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..4dd724f087fca227e7ee7ceefd19649c5b9a0351 GIT binary patch literal 350 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@j0~PGjv*Dd-pstndsuh8nf>utOJ$E-| zFMsKu(zG#v;j7MF|Bk8EhY|vq1bJt~%r2K|N*h>MBE_mo8I)a0re`rF7#CSG>=3>0W57K1`hkcQ(~r!$GJ9*p z?7J^}*Zj7-P^!Ld*7+GL)%c2oK8M@g*FW_)Q8xIRi*ftTeeam9og;U5O?&)R@IyN& fc;MjbBjp1O$7bzju+Ww91&MmP`njxgN@xNA$Y_JF literal 0 HcmV?d00001 diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Check.png b/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Check.png new file mode 100644 index 0000000000000000000000000000000000000000..7a074666878744c35a6e72079704f59854bcd0f6 GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@j1HbIjv*Dd-ppv^ZB`I)JigUd?>+BXY}mz^(R1xr>8d*3 z9hUEcPwQ#LFnr&Y`fQK+yeI9Up%a-6qFb~CA3XDn^MCp|ok65`dD97xPq7IXPhH)2 zgki@rHDlw|J3|DMQ};1WW_oD2+B0_JxrUu=PncYU4YgypY>fa vyGFQQU`yqNo#K29|GeN{1u_!ktGEmprf?gTe~DWM4f^R}GR literal 0 HcmV?d00001 diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Delete.png b/WindowsPhone/WeatherInformation/WeatherInformation/Toolkit.Content/ApplicationBar.Delete.png new file mode 100644 index 0000000000000000000000000000000000000000..95bb16dabef0d95b3da01ce2f4a46b8cdeeabea2 GIT binary patch literal 445 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@jPaf>jv*DdlK%YvZ+|#|&4d;OZygJZ2cnV&Ec^6}?Y@@$LQ_f1qNPc*1{U?{g!y?Lu?730b{iAiTO zBci6ME_%7hY*r_GH+#WXez)CIQX1qv-fT~q7QpPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi+5i9!+5vdBQZE1i0`y5lK~!i%?N-Z+ zQc)P!>uY?4gDJEbE1^w`fe^~dF>BfcwkRm57C}U-pch1B;HE{3RxM`J9}q4QB5a{y zx^R@0{Vp_y_IaY+r8E4biP+AmE#NHM7>@=*J`z%_7W$;=#yBwOX}lG@3W~&(Rv*X&vwji9}+3b#*mQgGKEC0YeBKLzq-_ zI^ECh;PH4|p3mo}b^y4%!{Oj*$O~Q*3ODl*Y)g5rV-JIQS=SYDe?=F|?HTt2ONTU~#CElYhNUc`uL4=s#UI+;yqu1-J zg1i{F2}GZP+^2LpZN?qAi%c^_HVQY=7}yI?bex( SettingsPage.xaml - - SettingsTemperatureUnitsPage.xaml - @@ -162,10 +159,6 @@ Designer MSBuild:Compile - - Designer - MSBuild:Compile - @@ -196,6 +189,12 @@ + + + + + + @@ -205,6 +204,9 @@ + + ..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll + ..\packages\Newtonsoft.Json.6.0.3\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll diff --git a/WindowsPhone/WeatherInformation/WeatherInformation/packages.config b/WindowsPhone/WeatherInformation/WeatherInformation/packages.config index b1d93b5..226e900 100644 --- a/WindowsPhone/WeatherInformation/WeatherInformation/packages.config +++ b/WindowsPhone/WeatherInformation/WeatherInformation/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file -- 2.1.4