MakeCaption() 공개 정적인 메소드

public static MakeCaption ( string caption, System.DateTime start ) : string
caption string
start System.DateTime
리턴 string
예제 #1
0
        RootElement GenerateRoot()
        {
            // The full list
            var allSessions = new RootElement("All Sessions")
            {
                from s in AppDelegate.ConferenceData.Sessions
                orderby s.Start ascending
                group s by s.Start.Ticks into g
                select new Section(HomeViewController.MakeCaption("", new DateTime(g.Key)))
                {
                    from hs in g
                    select(Element) new SessionElement(hs)
                }
            };

            // Per tags
            var stags = new Section("By Category")
            {
                from tag in AppDelegate.ConferenceData.Tags
                orderby tag.Value
                select(Element) new RootElement(tag.Value)
                {
                    from s in tag.Sessions
                    group s by s.Start.Ticks into g
                    orderby g.Key
                select new Section(HomeViewController.MakeCaption("", new DateTime(g.Key)))
                    {
                        from hs in g
                        select(Element) new SessionElement(hs)
                    }
                }
            };

            var root = new RootElement("Sessions")
            {
                new Section("By Time")
                {
                    allSessions
                },
                stags
            };

            return(root);
        }
예제 #2
0
        RootElement GenerateRoot()
        {
            // The full list
            var allSessions = new RootElement("All Sessions")
            {
                from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList()                  //AppDelegate.ConferenceData.Sessions
                orderby s.Start ascending
                group s by s.Start.Ticks into g
                select new Section(HomeViewController.MakeCaption("", new DateTime(g.Key), true))
                {
                    from hs in g
                    select(Element) new SessionElement(hs)
                }
            };

            var root = new CustomRootElement("Sessions")
            {
                allSessions
            };

            return(root);
        }
        RootElement GenerateRoot()
        {
            var favs = AppDelegate.UserData.GetFavoriteCodes();
            var root = new RootElement("Favorites")
            {
                from s in MonkeySpace.Core.ConferenceManager.Sessions.Values.ToList()                  //AppDelegate.ConferenceData.Sessions
                where favs.Contains(s.Code)
                group s by s.Start.Ticks into g
                orderby g.Key
                select new Section(HomeViewController.MakeCaption("", new DateTime(g.Key)))
                {
                    from hs in g
                    select(Element) new SessionElement(hs)
                }
            };

            if (favs.Count == 0)
            {
                var section = new Section("Whoops, Star a few sessions first!");

                root.Add(section);
            }
            return(root);
        }