private void UpgradePlace(Uri navigationUri, Dictionary <string, string> queryString) { if (!_stopUpgrading) { string id; if (queryString.TryGetValue("id", out id)) { // don't want more than one prompt. _stopUpgrading = true; Model.Venue venue = DataManager.Current.Load <Model.Venue>(new LoadContext(id), (venu) => { Dispatcher.BeginInvoke(() => { var result = MessageBox.Show( string.Format(CultureInfo.CurrentCulture, "This new tile management feature needs to upgrade your existing tile for {0} to be shown here. Is it OK to remove it and re-pin it now?" + Environment.NewLine + Environment.NewLine + "You can press the Back button after it is pinned again to make changes to your tiles.", venu.Name), "Re-pin " + venu.Name, MessageBoxButton.OKCancel); if (result == MessageBoxResult.OK) { PinVenueToStartHelper.PinToStartVenue(venu, navigationUri); } }); }, (exc) => { var x = exc; // ? }); } } }
private void ReplaceExistingTilePhoto(Uri tileUri, Uri newPhotoUri) { AppTileSettings.TileSettings ts; if (AppTileSettings.Instance.Tiles.TryGetValue(tileUri, out ts)) { System.Diagnostics.Debug.WriteLine("Replacing tile photo..."); ts.FrontPhoto = PinVenueToStartHelper.GetTileResizedUri(newPhotoUri); ts.ShellFrontPhotoPath = null; // reset manually. ick. AppTileManager.Instance.UpdateOrPin(ts); RenameTile.TitleReturnValue = null; RenameTile.TileUri = null; } }