示例#1
0
 public StatusTimelineViewModel(MainWindowViewModel main, StatusTimeline tl)
 {
     Source = tl;
     Statuses = ViewModelHelper.CreateReadOnlyDispatcherCollection(
         tl.Statuses,
         (p) =>
         {
             if (!IsSelected) UnreadCount++;
             return new StatusViewModel(main, p);
         },
         DispatcherHelper.UIDispatcher);
     Name = Source.Name;
     QueryText = Source.Query.QueryText;
 }
示例#2
0
 public void NewStatusTimeline()
 {
     var stt = new StatusTimeline(Kbtter.Setting, "true", "新しいやつ");
     var vm = new StatusTimelineEditWindowViewModel { EditingTarget = new StatusTimelineViewModel(this, stt) };
     Messenger.Raise(new TransitionMessage(vm, "StatusTimelineEdit"));
     if (vm.Updated) Kbtter.StatusTimelines.Add(stt);
 }