private void WorldMap_MapSpotClick(object sender, UIWorldMap.MapSpotEventArgs e) { int mapID = e.MapID; var callback = new EmptyKeys.UserInterface.Input.RelayCommand <MessageBoxResult>(r => { if (r == MessageBoxResult.OK) { this.MoveToPortal(mapID, "sp"); } }); StringResult sr = null; this.StringLinker?.StringMap.TryGetValue(mapID, out sr); var message = string.Format("是否传送到地图\r\n{0} ({1})?", sr?.Name ?? "null", mapID); MessageBox.Show(message, "提示", MessageBoxButton.OKCancel, callback, false); }
private void WorldMap_MapSpotClick(object sender, UIWorldMap.MapSpotEventArgs e) { int mapID = e.MapID; var callback = new EmptyKeys.UserInterface.Input.RelayCommand <MessageBoxResult>(r => { if (r == MessageBoxResult.OK) { this.MoveToPortal(mapID, "sp"); } }); StringResult sr = null; this.StringLinker?.StringMap.TryGetValue(mapID, out sr); string mapName = sr?["mapName"] ?? "(null)"; int last = (mapName.LastOrDefault(c => c >= '가' && c <= '힣') - '가') % 28; var message = string.Format("Will you teleport to this map?\r\n[" + mapName + "]\r\n({1})", sr?.Name ?? "null", mapID); MessageBox.Show(message, "", MessageBoxButton.OKCancel, callback, false); }