public SessionCell(UITableViewCellStyle style, NSString ident, MonkeySpace.Core.Session session, string big, string small) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; bigLabel = new UILabel () { TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.Clear }; smallLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.Clear }; button = UIButton.FromType (UIButtonType.Custom); button.TouchDown += delegate { UpdateImage (ToggleFavorite ()); }; UpdateCell (session, big, small); ContentView.Add (bigLabel); ContentView.Add (smallLabel); ContentView.Add (button); }
public void SetLocation(MonkeySpace.Core.MapLocation toLocation) { var targetLocation = toLocation.Location.To2D(); if (toLocation.Location.X == 0 && toLocation.Location.Y == 0) { // use the 'location manager' current coordinate if (locationManager.Location == null) { return; } { // catch a possible null reference that i saw once [CD] targetLocation = locationManager.Location.Coordinate; ConferenceAnnotation a = new ConferenceAnnotation(targetLocation, "My location".GetText(), ""); mapView.AddAnnotationObject(a); } } else if (toLocation.Title == "MonkeySpace") { // no need to drop anything } else { // drop a new pin ConferenceAnnotation a = new ConferenceAnnotation(toLocation.Location.To2D(), toLocation.Title,toLocation.Subtitle); mapView.AddAnnotationObject(a); } mapView.CenterCoordinate = targetLocation; }
public void Flip(MonkeySpace.Core.MapLocation toLocation) { mapView.SetLocation(toLocation); // assume not null, since it's created in ViewDidLoad ?? Flip(); }
public void Update(MonkeySpace.Core.Speaker speaker) { this.speaker = speaker; LoadHtmlString (FormatText ()); }
public SpeakerBioViewController(MonkeySpace.Core.Speaker speaker) : base() { this.speaker = speaker; }
public void UpdateFavorite(MonkeySpace.Core.Session session, bool isFavorite) { var fs = (from s in App.ViewModel.FavoriteSessions where s.Code == session.Code select s).ToList(); if (fs.Count > 0) { // remove, as it might be old data persisted anyway (from previous conf.xml file) App.ViewModel.FavoriteSessions.Remove(fs[0]); } if (isFavorite) { // add it again App.ViewModel.FavoriteSessions.Add(session); } var temp = favoriteSessions.OrderBy(s => s.Start.Ticks); favoriteSessions = new ObservableCollection<MonkeySpace.Core.Session>(); foreach (var t in temp) { favoriteSessions.Add(t); } NotifyPropertyChanged("FavoriteSessions"); string currentConf = (string)IsolatedStorageSettings.ApplicationSettings["LastConferenceCode"]; App.ViewModel.LoadWhatsOn(currentConf); }
public void Update(MonkeySpace.Core.Session session) { DisplaySession = session; LoadHtmlString(FormatText()); }
public SessionViewController(MonkeySpace.Core.Session session, bool isFromFavs) : this(session) { IsFromFavoritesView = isFromFavs; DisplaySession = session; }
public SessionViewController(MonkeySpace.Core.Session session) : base() { DisplaySession = session; }
public SessionElement(MonkeySpace.Core.Session session) : base(session.Title) { this.session = session; if(String.IsNullOrEmpty(session.Location)) subtitle = String.Format ("{0}", session.GetSpeakerList ()); else if (String.IsNullOrEmpty(session.GetSpeakerList())) subtitle = String.Format("{0}", session.LocationDisplay); else subtitle = String.Format ("{0}; {1}", session.LocationDisplay, session.GetSpeakerList ()); }
public void UpdateCell(MonkeySpace.Core.Session session, string big, string small) { this.session = session; UpdateImage (AppDelegate.UserData.IsFavorite (session.Id.ToString ())); bigLabel.Font = big.Length > 35 ? midFont : bigFont; bigLabel.Text = big; smallLabel.Text = small; }
public void UpdateFavorite(MonkeySpace.Core.Session session, bool isFavorite) { var isAlreadyFavorite = UserData.IsFavorite(session.Code); if (isAlreadyFavorite && isFavorite) return; // no change if (!isAlreadyFavorite && !isFavorite) return; // no change if (isFavorite) UserData.AddFavoriteSession(session.Code); else // not Favorite UserData.RemoveFavoriteSession(session.Code); favoriteSessions = null; // so it gets reloaded next use // This updates the 'whats on next' with favourites (if required) LoadWhatsOn(CurrentConferenceCode); }