Exemple #1
0
        public void Initialize()
        {
            TabItems.Clear();

            TabItems.Add(new CommunityTopViewModel(this));
            Community = new NicoNicoCommunity(CommunityUrl);

            IsActive = true;
            Status   = "コミュニティ情報を取得中";

            Task.Run(() => {
                Content  = Community.GetCommunity();
                IsActive = false;
                Status   = "";

                Name = Content.CommunityTitle;
            });
        }
        public CommunityViewModel(string url) : base("読込中")
        {
            TabItems = new ObservableCollection <TabItemViewModel>();
            TabItems.Add(new CommunityTopViewModel(this));
            Community = new NicoNicoCommunity(url);
            App.ViewModelRoot.AddTabAndSetCurrent(this);

            IsActive = true;
            Status   = "コミュニティ情報を取得中";

            Task.Run(() => {
                Content  = Community.GetCommunity();
                IsActive = false;
                Status   = "";

                Name = Content.CommunityTitle;
            });
        }