public TabSettingWindowViewModel(TabSetting model)
 {
     this.model = model;
     this.Name = model.Name;
     this.Type = model.Type;
     this.Args = model.Args;
     this.RefreshSpan = model.RefreshSpan;
     this.GetCount = model.GetCount;
 }
Ejemplo n.º 2
0
 public Tab(TabSetting setting)
 {
     this.Items = new ObservableSynchronizedCollection<ITimelineItem>();
     TimelineItemCache.Instance.CollectionChanged += this.StatusCache_CollectionChanged;
     this.Setting = setting;
     setting.PropertyChanged += this.Settings_PropertyChanged;
     this.timer = new Timer(_ =>
     {
         if (!this.receiver.UseUserStream || !Models.Settings.Instance.UseUserStream)
             this.Refresh();
     });
     this.RaiseSettingsPropertyChanged();
 }
Ejemplo n.º 3
0
 public void AddTab(TabSetting setting, int index)
 {
     var tab = new Tab(setting);
     this.Tabs.Insert(index, tab);
 }
Ejemplo n.º 4
0
 public void AddTab()
 {
     var tab = new TabSetting();
     Settings.Instance.Tabs.Add(tab);
     Settings.Instance.Save();
 }
Ejemplo n.º 5
0
 public void Dispose()
 {
     this.timer.Dispose();
     this.timer = null;
     this.receiver.ReceivedTimeline -= this.receiver_ReceivedTimeline;
     this.receiver.IsRefreshingChanged -= this.receiver_IsRefreshingChanged;
     this.receiver.Error -= this.receiver_Error;
     this.receiver.Dispose();
     this.receiver = null;
     this.Items = null;
     TimelineItemCache.Instance.CollectionChanged -= this.StatusCache_CollectionChanged;
     this.Setting.PropertyChanged -= this.Settings_PropertyChanged;
     this.Setting = null;
     GC.SuppressFinalize(this);
 }