public UserViewModel(string url) : base("ユーザー") { UserPageUrl = UserUrlPattern.Match(url).Value; UserInstance = new NicoNicoUser(this); }
//ログイン後の初期化処理 public void LogedInInit() { User = new NicoNicoUserEntry(); User.UserId = NicoNicoWrapperMain.Session.UserId; User.UserName = NicoNicoUser.LookupUserName(User.UserId); App.ViewModelRoot.Title += "(user:"******")"; TabItems.Add(WebView = new WebViewViewModel()); TabItems.Add(Ranking = new RankingViewModel()); TabItems.Add(Search = new SearchViewModel()); TabItems.Add(new FavoriteViewModel()); TabItems.Add(new NicoRepoViewModel()); TabItems.Add(new MylistViewModel()); TabItems.Add(NotifyLive = new NotifyLiveViewModel()); TabItems.Add(new HistoryViewModel()); TabItems.Add(new OtherViewModel()); TabItems.Add(Config = new ConfigViewModel()); //生放送通知を更新するタイマーを動かす StatusBar.StartRefreshTimer(); //サーバーからアップデートがあるか確認してあったらアップデートダイアログを出す Update.CheckUpdate(); //公式NG機能を初期化 NGCommentInstance = new NicoNicoNGComment(); //NGCommentInstance.GetNGClient(); if (Environment.GetCommandLineArgs().Length > 1) { Task.Run(() => NicoNicoOpener.Open(Environment.GetCommandLineArgs()[1])); } }
public void Initialize() { UserInstance = new NicoNicoUser(this, UserPageUrl); UserEntry = UserInstance.GetUserInfo(); Name = UserEntry.UserName; UserContentList.Clear(); UserContentList.Add(new UserNicoRepoViewModel(this)); UserContentList.Add(new UserMylistViewModel(this)); UserContentList.Add(new UserVideoViewModel(this)); }
public void Initialize() { UserInstance = new NicoNicoUser(this, UserPageUrl); UserEntry = UserInstance.GetUserInfo(); Name = UserEntry.UserName; UserContentList = new DispatcherCollection <TabItemViewModel>(DispatcherHelper.UIDispatcher) { new UserNicoRepoViewModel(this), new UserMylistViewModel(this), new UserVideoViewModel(this) }; }
//ログイン後の初期化処理 public void LogedInInit() { User = new NicoNicoUserEntry(); User.UserId = NicoNicoWrapperMain.GetSession().UserId; User.UserName = NicoNicoUser.LookupUserName(User.UserId); App.ViewModelRoot.Title += "(user:"******")"; TabItems.Add(Search = new SearchViewModel()); TabItems.Add(new FavoriteViewModel()); TabItems.Add(new NicoRepoViewModel()); TabItems.Add(new MylistViewModel()); TabItems.Add(new HistoryViewModel()); TabItems.Add(new OtherViewModel()); TabItems.Add(Config = new ConfigViewModel()); }