public MyCommentViewModel() { Comments = new IncrementalLoadingList <Comment>(GetComments, () => { IsActive = false; }, () => { IsActive = true; }); if (IsDesignMode) { LoadDesignTimeData(); } }
public MyFavoritePageViewModel() { Favorites = new IncrementalLoadingList <Document>(GetFavoritesDocument, () => { IsActive = false; }, () => { IsActive = true; }); if (IsDesignMode) { LoadDesignData(); } }
public MyContributePageViewModel() { Contributes = new IncrementalLoadingList <Contribute>(GetContributes, () => { IsActive = false; }, () => { IsActive = true; }); if (IsDesignMode) { LoadDesignData(); } }
public ContributeInChannelViewModel() { if (IsDesignMode) { ChannelId = "3"; } Contributes = new IncrementalLoadingList <Contribute>(LoadContributesAsync, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { ToastService.SendToast(e.Message); IsActive = false; }); }
public MyReadHistoryPageViewModel() { ReadHistories = new IncrementalLoadingList <Document>(GetReadHistory, () => { IsActive = false; }, () => { IsActive = true; }); if (IsDesignMode) { LoadDesignTimeData(); } }
public SearchPageViewModel() { SearchResults = new IncrementalLoadingList <Document>(SearchAsync, () => { IsActive = false; }, () => { IsActive = true; }, (Exception e) => { IsActive = false; ToastService.SendToast(e.Message); }); if (DesignMode.DesignModeEnabled) { Keyword = "标准"; Search(); } }
public PickPinPaneViewModel(IApiHttpHelper httpHelper, IThemeService themeService, IAccountService accountService, Context context) { this.httpHelper = httpHelper; this.themeService = themeService; this.accountService = accountService; this.Context = context; BoardList = new IncrementalLoadingList <Board>(GetMyBoards); }
public MessagePageViewModel() { if (IsDesignMode) { //LoadDesignData(); } CommentMessages = new IncrementalLoadingList <Message>(LoadCommentMessages, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); VoteMessages = new IncrementalLoadingList <Message>(LoadVoteMessage, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); AdminMessages = new IncrementalLoadingList <Message>(LoadAdminMessage, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); }
public MainPageViewModel() { Documents = new IncrementalLoadingList <Document>(LoadDocuments, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); Videos = new IncrementalLoadingList <Video>(LoadVideos, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); Contributes = new IncrementalLoadingList <Contribute>(LoadContributes, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { IsActive = false; ToastService.SendToast(e.Message); }); VoteVideoCommand = new RelayCommand(async(x) => await VoteVideoAsync((string)x)); CommentCommand = new RelayCommand(x => NavigateToComment((string)x)); ShareCommand = new RelayCommand(x => Share((Video)x)); User = DataShareManager.Current.User; DataShareManager.Current.DataChanged += Current_DataChanged; }
public PinListViewModel(Context context, Func <uint, int, Task <IEnumerable <Pin> > > _func) : base(context) { PinAPI = ServiceLocator.Resolve <PinAPI>(); BoardAPI = ServiceLocator.Resolve <BoardAPI>(); PinList = new IncrementalLoadingList <Pin>(_func); SelecterVisibility = Visibility.Collapsed; QuickBoardChanged += (s, e) => { InitQuickBoard(); }; InitQuickBoard(); }
public PinListViewModel(Context context, Func<uint, int, Task<IEnumerable<Pin>>> _func) : base(context) { PinAPI = ServiceLocator.Resolve<PinAPI>(); BoardAPI = ServiceLocator.Resolve<BoardAPI>(); PinList = new IncrementalLoadingList<Pin>(_func); SelecterVisibility = Visibility.Collapsed; QuickBoardChanged += (s, e) => { InitQuickBoard(); }; InitQuickBoard(); }
public CommentPageViewModel() { if (IsDesignMode) { DocumentId = "44791"; } LatestComments = new IncrementalLoadingList <Comment>(LoadLatestComments, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { ToastService.SendToast(e.Message); IsActive = false; }); HotComments = new IncrementalLoadingList <Comment>(LoadHotComments, () => { IsActive = false; }, () => { IsActive = true; }, (e) => { ToastService.SendToast(e.Message); IsActive = false; }); CommentCommand = new RelayCommand ( async(commentId) => { await ReplyCommentAsync((string)commentId, Content); }, () => { return(!string.IsNullOrEmpty(Content)); } ); VoteCommand = new RelayCommand ( (commentId) => { VoteAsync((string)commentId); } ); ReportCommand = new RelayCommand ( (commentId) => { ReportAsync((string)commentId); } ); }
public ChannelViewModel() { Channels = new IncrementalLoadingList <Channel>(GetChannel, () => { IsActive = false; }, () => { isActive = true; }, (e) => { ToastService.SendToast(e.Message); IsActive = false; }); }
public PinListViewModel(Context context, Func <uint, int, Task <IEnumerable <Pin> > > _func) : base(context) { PinList = new IncrementalLoadingList <Pin>(_func); this.SetWidth(Window.Current.Bounds.Width); }
public Context() { CategoryList = new IncrementalLoadingList<Category>(GetCategoryList); Categories = new ObservableCollection<Category>(); }
public BoardListViewModel(Context context, Func<uint, int, Task<IEnumerable<Board>>> _func) : base(context) { BoardList = new IncrementalLoadingList<Board>(_func); }
public UserListViewModel(Context context, Func <uint, int, Task <IEnumerable <User> > > _func) : base(context) { UserList = new IncrementalLoadingList <User>(_func); }
public BoardListViewModel(Context context, Func <uint, int, Task <IEnumerable <Board> > > _func) : base(context) { BoardList = new IncrementalLoadingList <Board>(_func); }
public UserListViewModel(Context context, Func<uint, int, Task<IEnumerable<User>>> _func) : base(context) { UserList = new IncrementalLoadingList<User>(_func); }