Exemplo n.º 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);
            }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public void Update(string sessionCode)
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
     if (DisplaySession != null) LoadHtmlString(FormatText());
 }
Exemplo n.º 5
0
 public SessionViewController(string sessionCode)
     : base()
 {
     foreach (var s in AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 10
0
 public SessionViewController(MIX10Xml.Session session, bool isFromFavs) : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession      = session;
 }
Exemplo n.º 11
0
 public SessionViewController(MIX10Xml.Session session) : base()
 {
     DisplaySession = session;
 }
Exemplo n.º 12
0
 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 ());
 }
Exemplo n.º 13
0
 public SessionViewController(MIX10Xml.Session session, bool isFromFavs)
     : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession = session;
 }
Exemplo n.º 14
0
 public SessionViewController(MIX10Xml.Session session)
     : base()
 {
     DisplaySession = session;
 }
Exemplo n.º 15
0
 public void Update(MIX10Xml.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
Exemplo n.º 16
0
 public void Update(MIX10Xml.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
Exemplo n.º 17
0
        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;
        }