Exemple #1
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                MIX10Xml.Session s    = _svc.Sessions[indexPath.Row];
                bool             star = _svc.FavoriteCodes.Contains(s.Code);
                UITableViewCell  cell = null;

                if (star)
                {
                    cell = tableView.DequeueReusableCell("star");
                    if (cell == null)
                    {
                        cell = new UITableViewCell(UITableViewCellStyle.Subtitle, "star");
                    }
                    cell.ImageView.Image = starImage;
                    cell.Accessory       = UITableViewCellAccessory.DisclosureIndicator;
                }
                else
                {
                    cell = tableView.DequeueReusableCell("plain");
                    if (cell == null)
                    {
                        cell = new UITableViewCell(UITableViewCellStyle.Subtitle, "plain");
                    }
                    cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
                }
                try
                {
                    cell.TextLabel.Text       = s.Title;
                    cell.DetailTextLabel.Text = s.GetSpeakerList();
                } catch (Exception) {}
                return(cell);
            }
Exemple #2
0
 public SessionViewController(string sessionCode) : base()
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
 }
        public void UpdateCell(MIX10Xml.Session session, string big, string small)
        {
            this.session = session;
            UpdateImage(AppDelegate.UserData.IsFavorite(session.Code));

            bigLabel.Font = big.Length > 35 ? midFont : bigFont;
            bigLabel.Text = big;

            smallLabel.Text = small;
        }
 public void Update(string sessionCode)
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
     if (DisplaySession != null) LoadHtmlString(FormatText());
 }
 public SessionViewController(string sessionCode)
     : base()
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
 }
Exemple #6
0
 public void Update(string sessionCode)
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
     if (DisplaySession != null)
     {
         LoadHtmlString(FormatText());
     }
 }
Exemple #7
0
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     MIX10Xml.Session s = _svc.Sessions[indexPath.Row];
     if (sessVC == null)
     {
         sessVC = new SessionViewController(s);
     }
     else
     {
         sessVC.Update(s);
     }
     sessVC.Title = s.Title;
     _svc.NavigationController.PushViewController(sessVC, true);
     tableView.DeselectRow(indexPath, true);
 }
 public SessionElement(MIX10Xml.Session session) : base(session.Title)
 {
     this.session = session;
     if (String.IsNullOrEmpty(session.Room))
     {
         subtitle = String.Format("{0}", session.GetSpeakerList());
     }
     else if (String.IsNullOrEmpty(session.GetSpeakerList()))
     {
         subtitle = String.Format("{0} room", session.Room);
     }
     else
     {
         subtitle = String.Format("{0} room; {1}", session.Room, session.GetSpeakerList());
     }
 }
        public SessionCell(UITableViewCellStyle style, NSString ident, MIX10Xml.Session session, string big, string small) : base(style, ident)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Blue;

            bigLabel = new UILabel()
            {
                TextAlignment = UITextAlignment.Left,
            };
            smallLabel = new UILabel()
            {
                TextAlignment = UITextAlignment.Left,
                Font          = smallFont,
                TextColor     = UIColor.DarkGray
            };
            button            = UIButton.FromType(UIButtonType.Custom);
            button.TouchDown += delegate {
                UpdateImage(ToggleFavorite());
            };
            UpdateCell(session, big, small);

            ContentView.Add(bigLabel);
            ContentView.Add(smallLabel);
            ContentView.Add(button);
        }
Exemple #10
0
 public SessionViewController(MIX10Xml.Session session, bool isFromFavs) : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession      = session;
 }
Exemple #11
0
 public SessionViewController(MIX10Xml.Session session) : base()
 {
     DisplaySession = session;
 }
 public SessionElement(MIX10Xml.Session session)
     : base(session.Title)
 {
     this.session = session;
     if(String.IsNullOrEmpty(session.Room))
         subtitle = String.Format ("{0}", session.GetSpeakerList ());
     else if (String.IsNullOrEmpty(session.GetSpeakerList()))
         subtitle = String.Format("{0} room", session.Room);
     else
         subtitle = String.Format ("{0} room; {1}", session.Room, session.GetSpeakerList ());
 }
 public SessionViewController(MIX10Xml.Session session, bool isFromFavs)
     : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession = session;
 }
 public SessionViewController(MIX10Xml.Session session)
     : base()
 {
     DisplaySession = session;
 }
 public void Update(MIX10Xml.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
Exemple #16
0
 public void Update(MIX10Xml.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
        public void UpdateCell(MIX10Xml.Session session, string big, string small)
        {
            this.session = session;
            UpdateImage (AppDelegate.UserData.IsFavorite (session.Code));

            bigLabel.Font = big.Length > 35 ? midFont : bigFont;
            bigLabel.Text = big;

            smallLabel.Text = small;
        }