protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { _qrSettings = new QRSettings(); DataContext = _qrSettings; if (_destoyIfBack) { throw new QuitException(); } _wasFirstPage = MangoOnSeven.IsFirstPage(); _settings = DataManager.Current.Load <Model.UserSettings>("self"); }
private void OpenInBingMaps() { if (_itemLocation != null) { double zoom = 18.0; /*if (AppPlatform.IsMango) * { * var bingMaps = ((App)(App.Current)).Mango.Tasks.CreateBingMapsTask(); * bingMaps.Center = center; * bingMaps.ZoomLevel = zoom; * worked = true; * bingMaps.Show(); * } * else*/ if (_placePushpin != null && _placePushpin.Content is MapPlaceInformation) { var mpi = _placePushpin.Content as MapPlaceInformation; if (mpi != null) { var bing = new BingMapsDirectionsTask(); bing.End = new LabeledMapLocation { Label = mpi.Name, Location = _placePushpin.Location }; try { bing.Show(); } catch { MessageBox.Show("On some phones the map cannot be opened. Your culture may be set to a non-English culture where a known bug exists.", "Sorry!", MessageBoxButton.OK); } } } else if (MangoOnSeven.IsMangoRunning) { try { MangoOnSeven.TryBingMapsTask(_itemLocation, zoom); } catch (Exception) { MessageBox.Show("On some phones the map cannot be opened. Your culture may be set to a non-English culture where a known bug exists.", "Sorry!", MessageBoxButton.OK); } } } }
private void UpdateAppBars() { if (MangoOnSeven.IsMangoRunning) { bool?wasPinned = _isPinned; _isPinned = MangoOnSeven.IsPagePinned(NavigationService.Source); if (wasPinned != _isPinned) { InitAppBars(); } } if (ApplicationBar == null) { InitAppBars(); } }
private void OpenInBingMaps() { if (_itemLocation != null) { double zoom = 18.0; /*if (AppPlatform.IsMango) * { * var bingMaps = ((App)(App.Current)).Mango.Tasks.CreateBingMapsTask(); * bingMaps.Center = center; * bingMaps.ZoomLevel = zoom; * worked = true; * bingMaps.Show(); * } * else*/ if (MangoOnSeven.IsMangoRunning) { MangoOnSeven.TryBingMapsTask(_itemLocation, zoom); } } }