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; }
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(); }
public void AddTab(TabSetting setting, int index) { var tab = new Tab(setting); this.Tabs.Insert(index, tab); }
public void AddTab() { var tab = new TabSetting(); Settings.Instance.Tabs.Add(tab); Settings.Instance.Save(); }
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); }