From 2de2c2485ef5671eb7ca50a10a83bf497bd99734 Mon Sep 17 00:00:00 2001 From: Claudiu Farcas Date: Mon, 4 Apr 2011 09:47:17 +0300 Subject: [PATCH] imrpovements --- .../MyFriendsAround.WP7.csproj | 6 +++ .../ViewModel/MainViewModel.cs | 26 +++++++++- main/MyFriendsAround.WP7/Views/MainPage.xaml | 49 +++++++++++------- .../icons/appbar.add.rest.png | Bin 0 -> 271 bytes .../icons/appbar.minus.rest.png | Bin 0 -> 204 bytes 5 files changed, 59 insertions(+), 22 deletions(-) create mode 100644 main/MyFriendsAround.WP7/icons/appbar.add.rest.png create mode 100644 main/MyFriendsAround.WP7/icons/appbar.minus.rest.png diff --git a/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj b/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj index 5573829..237d814 100644 --- a/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj +++ b/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj @@ -228,9 +228,15 @@ PreserveNewest + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs b/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs index f85c727..2e9dbfb 100644 --- a/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs +++ b/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs @@ -69,6 +69,8 @@ namespace MyFriendsAround.WP7.ViewModel CropCancelCommand = new RelayCommand(() => CropCancel()); MapViewChangedCommand = new RelayCommand(boundRectangle => MapViewChanged(boundRectangle)); ShowMyLocationCommand = new RelayCommand(() => ShowMyLocation()); + MapZoomInCommand = new RelayCommand(() => MapZoomIn()); + MapZoomOutCommand = new RelayCommand(() => MapZoomOut()); if (IsInDesignMode) { @@ -89,6 +91,24 @@ namespace MyFriendsAround.WP7.ViewModel InitGps(); } + private void MapZoomOut() + { + // + if(MapZoom<22) + { + MapZoom++; + } + } + + private void MapZoomIn() + { + // + if (MapZoom >2 ) + { + MapZoom--; + } + } + private void InitGps() { @@ -286,12 +306,12 @@ namespace MyFriendsAround.WP7.ViewModel /// The property's name. /// public const string MyPicturePropertyName = "MyPicture"; - private BitmapSource _myPicture = new BitmapImage(new Uri("/icons/anonymousIcon.png", UriKind.RelativeOrAbsolute)); + private ImageSource _myPicture = new BitmapImage(new Uri("/icons/anonymousIcon.png", UriKind.RelativeOrAbsolute)); /// /// Gets the MyPicture property. /// - public BitmapSource MyPicture + public ImageSource MyPicture { get { @@ -586,6 +606,8 @@ namespace MyFriendsAround.WP7.ViewModel public ICommand CropSaveCommand { get; set; } public ICommand CropCancelCommand { get; set; } public ICommand MapViewChangedCommand { get; set; } + public ICommand MapZoomInCommand { get; set; } + public ICommand MapZoomOutCommand { get; set; } #endregion diff --git a/main/MyFriendsAround.WP7/Views/MainPage.xaml b/main/MyFriendsAround.WP7/Views/MainPage.xaml index ef98f12..ef9ba31 100644 --- a/main/MyFriendsAround.WP7/Views/MainPage.xaml +++ b/main/MyFriendsAround.WP7/Views/MainPage.xaml @@ -144,31 +144,41 @@ + Width="64"> + Margin="0,0,-20,0"> - - - + + + + + + + + + + + + + + + @@ -200,8 +210,7 @@ Opacity="1" Source="{Binding MyPicture, Mode=OneWay}" Margin="0" - Stretch="Fill" - > + Stretch="Fill"> ~)xp9!Q!GOmhP?_(6ht(wEj@dgrt(%lzu;m3P zSG>{;Q4*_L(C&5l8|S12OQy`4n-xIICg2_9Zly`9MYElz< z@tadtWlvL^oZ#A`WnmyaNT8nejDFg;Cv&&$?(;b?iznjFf$RARD(_3|GT+5@BdG&2 cO^Z1V7!;m!355GTxdoE)boFyt=akR{0Ne#WHUIzs literal 0 HcmV?d00001