public void SelectSpeaker(int speakerID)
        {
            speakerId = speakerID;

            if (speakerId > 1)
            {
                sessionView.Update(speakerId, true);

                var session = BL.Managers.SessionManager.GetSession(speakerId);

                speakersInSession = session.Speakers;
                if (speakersInSession != null && speakersInSession.Count > 0)
                {
                    speakerView.Update(speakersInSession[0].ID);
                }
                else                            // no speaker (!?)
                {
                    speakerView.Clear();
                }
            }
            else
            {
                sessionView.Clear();
                speakerView.Clear();
            }

            if (Popover != null)
            {
                Popover.Dismiss(true);
            }
        }
        public void Update(int speakerID)         //, UIViewController view)
        {
            speakerId = speakerID;
            speakerView.Update(speakerID);

            if (speakerId > 1)
            {
                var speaker  = BL.Managers.SpeakerManager.GetSpeaker(speakerId);
                var sessions = BL.Managers.SessionManager.GetSessions();
                if (sessions != null)
                {
                    session = (from s in sessions
                               where s.SpeakerNames.IndexOf(speaker.Name) >= 0
                               select s).FirstOrDefault();
                }
                sessionView.Update(session);
            }
            speakerView.SetNeedsDisplay();


            if (Popover != null)
            {
                Popover.Dismiss(true);
            }
        }
Esempio n. 3
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
            sessionView.Update(sessionId, ShouldShowSpeakers);

            scrollView.Add(sessionView);
            scrollView.ContentOffset = new PointF(0, 0);
            scrollView.ContentSize   = sessionView.Bounds.Size.Height < 370 ? new SizeF(320, 370) : sessionView.Bounds.Size;
        }
Esempio n. 4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            sessionView       = new SessionView(this);
            sessionView.Frame = new System.Drawing.RectangleF(0, 0, 540, 620);
            sessionView.Update(session);

            View.AddSubview(sessionView);
        }