コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public SessionViewController(string sessionCode) : base()
 {
     foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList())               //AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
 }
コード例 #4
0
 public SessionViewController(string sessionCode)
     : base()
 {
     foreach (var s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList () ) //AppDelegate.ConferenceData.Sessions)
     {
         if (s.Code == sessionCode)
         {
             DisplaySession = s;
         }
     }
 }
コード例 #5
0
 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());
 }
コード例 #6
0
        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;
            }
        }
コード例 #7
0
        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";
                }
            }
        }
コード例 #8
0
        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;
            }
        }
コード例 #9
0
 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());
     }
 }
コード例 #10
0
 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());
     }
 }
コード例 #11
0
        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";
            }
        }
コード例 #12
0
 public SessionViewController(MonkeySpace.Core.Session session, bool isFromFavs) : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession      = session;
 }
コード例 #13
0
 public SessionViewController(MonkeySpace.Core.Session session) : base()
 {
     DisplaySession = session;
 }
コード例 #14
0
 public void Update(MonkeySpace.Core.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
コード例 #15
0
 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 ());
 }
コード例 #16
0
 public SessionViewController(MonkeySpace.Core.Session session, bool isFromFavs)
     : this(session)
 {
     IsFromFavoritesView = isFromFavs;
     DisplaySession = session;
 }
コード例 #17
0
        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;
        }
コード例 #18
0
 public void Update(MonkeySpace.Core.Session session)
 {
     DisplaySession = session;
     LoadHtmlString(FormatText());
 }
コード例 #19
0
 public SessionViewController(MonkeySpace.Core.Session session)
     : base()
 {
     DisplaySession = session;
 }