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 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 SessionViewController(string sessionCode) : base() { foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList()) //AppDelegate.ConferenceData.Sessions) { if (s.Code == sessionCode) { DisplaySession = s; } } }
public SessionViewController(string sessionCode) : base() { foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList () ) //AppDelegate.ConferenceData.Sessions) { if (s.Code == sessionCode) { DisplaySession = s; } } }
public void Update(string sessionCode) { foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList () ) //AppDelegate.ConferenceData.Sessions) { if (s.Code == sessionCode) { DisplaySession = s; } } if (DisplaySession != null) LoadHtmlString(FormatText()); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { string code = ""; if (NavigationContext.QueryString.TryGetValue("sessionCode", out code)) { var sess = from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList() //App.ViewModel.ConfItem.Sessions where s.Code == code select s; session = sess.FirstOrDefault(); DataContext = session; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); RequestWindowFeature(WindowFeatures.CustomTitle); // BETTER: http://www.anddev.org/my_own_titlebar_backbutton_like_on_the_iphone-t4591.html SetContentView(Resource.Layout.Session); Window.SetFeatureInt(WindowFeatures.CustomTitle, Resource.Layout.WindowTitle); // http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/ _favouriteButton = FindViewById <Button>(Resource.Id.FavouriteButton); _favouriteButton.Click += new EventHandler(_favouriteButton_Click); _code = Intent.GetStringExtra("Code"); Console.WriteLine("[SessionActivity] " + _code); _session = (from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList() where s.Code == _code select s).FirstOrDefault(); if (_session.Code != "") { FindViewById <TextView>(Resource.Id.Title).Text = _session.Title; FindViewById <TextView>(Resource.Id.SpeakerList).Text = _session.GetSpeakerList(); if (_session.Location != "") { FindViewById <TextView>(Resource.Id.Room).Text = _session.LocationDisplay; } FindViewById <TextView>(Resource.Id.DateTimeDisplay).Text = _session.DateTimeDisplay; FindViewById <TextView>(Resource.Id.Brief).Text = _session.Abstract; //FindViewById<TextView>(Resource.Id.TagList).Text = _session.TagList; var sess = from s in Conf.Current.FavoriteSessions where s.Code == _session.Code select s; foreach (var s in sess) { isFavourite = true; break; } if (isFavourite) { _favouriteButton.Text = "Un favorite"; } else { _favouriteButton.Text = "Add favorite"; } } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { string code = ""; if (NavigationContext.QueryString.TryGetValue("sessionCode", out code)) { var sess = from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList() //App.ViewModel.ConfItem.Sessions where s.Code == code select s; session = sess.FirstOrDefault(); DataContext = session; } }
public void Update(string sessionCode) { foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList()) //AppDelegate.ConferenceData.Sessions) { if (s.Code == sessionCode) { DisplaySession = s; } } if (DisplaySession != null) { LoadHtmlString(FormatText()); } }
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()); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); RequestWindowFeature(WindowFeatures.CustomTitle); // BETTER: http://www.anddev.org/my_own_titlebar_backbutton_like_on_the_iphone-t4591.html SetContentView(Resource.Layout.Session); Window.SetFeatureInt(WindowFeatures.CustomTitle, Resource.Layout.WindowTitle); // http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/ _favouriteButton = FindViewById<Button>(Resource.Id.FavouriteButton); _favouriteButton.Click += new EventHandler(_favouriteButton_Click); _code = Intent.GetStringExtra("Code"); Console.WriteLine("[SessionActivity] " + _code); _session = (from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList () where s.Code == _code select s).FirstOrDefault(); if (_session.Code != "") { FindViewById<TextView>(Resource.Id.Title).Text = _session.Title; FindViewById<TextView>(Resource.Id.SpeakerList).Text = _session.GetSpeakerList(); if (_session.Location != "") FindViewById<TextView>(Resource.Id.Room).Text = _session.LocationDisplay; FindViewById<TextView>(Resource.Id.DateTimeDisplay).Text = _session.DateTimeDisplay; FindViewById<TextView>(Resource.Id.Brief).Text = _session.Abstract; //FindViewById<TextView>(Resource.Id.TagList).Text = _session.TagList; var sess = from s in Conf.Current.FavoriteSessions where s.Code == _session.Code select s; foreach (var s in sess) { isFavourite = true; break; } if (isFavourite) _favouriteButton.Text = "Un favorite"; else _favouriteButton.Text = "Add favorite"; } }
public SessionViewController(MonkeySpace.Core.Session session, bool isFromFavs) : this(session) { IsFromFavoritesView = isFromFavs; DisplaySession = session; }
public SessionViewController(MonkeySpace.Core.Session session) : base() { DisplaySession = session; }
public void Update(MonkeySpace.Core.Session session) { DisplaySession = session; LoadHtmlString(FormatText()); }
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 SessionViewController(MonkeySpace.Core.Session session, bool isFromFavs) : this(session) { IsFromFavoritesView = isFromFavs; DisplaySession = session; }
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 Update(MonkeySpace.Core.Session session) { DisplaySession = session; LoadHtmlString(FormatText()); }
public SessionViewController(MonkeySpace.Core.Session session) : base() { DisplaySession = session; }