public SessionEventCell (SessionEntity session) { this.Title = session.Title; this.DateRoom = session.Start.ToShortTimeString () + " | " + session.Room; this.Speaker = session.SpeakerName; this.Session = session; }
public void SetSession (SessionEntity session) { _session = session; }
public void SetSession (SessionEntity session) { //Console.WriteLine("RotatingSessionDetailViewController.SetSession - Session is null " + (session == null).ToString()); _session = session; LoadSession (); }
public RotatingSessionDetailViewController (SessionEntity session) : this() { //Console.WriteLine("RotatingSessionDetailViewController.ctor(session)"); _session = session; LoadSession (); }
public void SetSession (SessionEntity session) { this.Session = session; //this.sessionAbstractLabel = abstractLabel; //_sessionAbstractLabel.Text = session.Abstract; this.sessionDifficultyLabel.Text = session.Difficulty; this.sessionRoomLabel.Text = session.Room; this.sessionSpeakerNameLabel.SetTitle (session.SpeakerName, UIControlState.Normal); if (session.Start == DateTime.MinValue) { this.sessionStartLabel.Text = "No date/time - Please Refresh"; } else { this.sessionStartLabel.Text = session.Start.ToString (); } this.sessionTechnologyLabel.Text = session.Technology; SetImageUrl (); //_sessionTechnologyLabel.Text = GetTechnologyName (session.Technology); this.sessionTitleLabel.Text = session.Title; HLabel titleLabel; if (this.View.Subviews.Count () <= 19) { titleLabel = new HLabel (); } else { titleLabel = (HLabel)this.View.Subviews [19]; } titleLabel.VerticalAlignment = HLabel.VerticalAlignments.Top; titleLabel.Lines = 0; titleLabel.LineBreakMode = UILineBreakMode.WordWrap; titleLabel.Text = this.sessionTitleLabel.Text; titleLabel.Font = this.sessionTitleLabel.Font; titleLabel.Frame = this.sessionTitleLabel.Frame; titleLabel.BackgroundColor = UIColor.Clear; var countBeforeTitle = this.View.Subviews.Count (); if (this.View.Subviews.Count () <= 19) { this.View.AddSubview (titleLabel); } else { this.View.Subviews [19] = titleLabel; } this.sessionTitleLabel.Text = string.Empty; HLabel abstractLabel; if (this.View.Subviews.Count () <= 20) { abstractLabel = new HLabel (); //this.View.AddSubview (abstractLabel); } else { abstractLabel = (HLabel)this.View.Subviews [20]; //abstractLabel = (HLabel)this.View.Subviews[20]; } abstractLabel.VerticalAlignment = HLabel.VerticalAlignments.Top; abstractLabel.Lines = 0; abstractLabel.LineBreakMode = UILineBreakMode.WordWrap; abstractLabel.Text = session.Abstract; abstractLabel.Font = UIFont.FromName ("STHeitiTC-Light", 16); abstractLabel.Frame = this.sessionAbstractLabel.Frame; abstractLabel.BackgroundColor = UIColor.Clear; var countBeforeAbstract = this.View.Subviews.Count (); if (this.View.Subviews.Count () <= 20) { this.View.AddSubview (abstractLabel); } else { this.View.Subviews [20] = abstractLabel; } this.sessionAbstractLabel.Text = string.Empty; this.View.SetNeedsLayout (); this.View.LayoutIfNeeded (); //_sessionTrackLabel.Text = session.Track; SetAddToScheduleLabel (); //AddPopoverButton(null, null, toolbar.Items[0], new UIPopoverController(new TabBarController())); // if (this.popoverController != null) { // this.popoverController.Dismiss (true); // } }
protected void RemoveNotification (SessionEntity session) { var allNotifications = UIApplication.SharedApplication.ScheduledLocalNotifications.ToList (); var sessionNotification = allNotifications.Where (x => x.AlertBody.StartsWith (session.Title)).SingleOrDefault (); if (sessionNotification != null) { UIApplication.SharedApplication.CancelLocalNotification (sessionNotification); } }
protected void AddNotification (SessionEntity session) { if (session != null && session.Start != null && session.Start != DateTime.MinValue) { UILocalNotification notification = new UILocalNotification{ FireDate = session.Start.AddMinutes (-10), TimeZone = NSTimeZone.LocalTimeZone, AlertBody = session.Title + " will start in 10 minutes in " + session.Room + "(WHEN CODEMASH PUBLISHES REAL DATES, THIS WON'T SHOW IMMEDIATELY", RepeatInterval = 0 }; UIApplication.SharedApplication.ScheduleLocalNotification (notification); } }
public SessionDetailViewController (SessionEntity session) : base ("SessionDetailViewController", null) { _session = session; }