public TabViewModel(ColumnViewModel parent, TabModel model) : base(model) { this._parent = parent; this._model = model; this._model.OnNewStatusArrival += _ => this.UnreadCount++; this._model.BindingAccountsChanged += () => this.RaisePropertyChanged(() => this.CurrentAccounts); this._model.FocusRequired += this.SetFocus; model.IsActivated = true; }
public TabViewModel(ColumnViewModel parent, TabModel model) : base(model) { this._parent = parent; this._model = model; this.CompositeDisposable.Add( new EventListener <Action <TwitterStatus> >( h => _model.OnNewStatusArrival += h, h => model.OnNewStatusArrival -= h, _ => this.UnreadCount++)); this.CompositeDisposable.Add( new EventListener <Action>( h => _model.BindingAccountsChanged += h, h => _model.BindingAccountsChanged -= h, () => this.RaisePropertyChanged(() => this.CurrentAccounts))); this.CompositeDisposable.Add( new EventListener <Action>( h => _model.FocusRequired += h, h => _model.FocusRequired -= h, this.SetFocus)); model.IsActivated = true; }
public TabViewModel(ColumnViewModel parent, TabModel model) : base(model) { this._parent = parent; this._model = model; this.CompositeDisposable.Add( new EventListener<Action<TwitterStatus>>( h => _model.OnNewStatusArrival += h, h => model.OnNewStatusArrival -= h, _ => this.UnreadCount++)); this.CompositeDisposable.Add( new EventListener<Action>( h => _model.BindingAccountsChanged += h, h => _model.BindingAccountsChanged -= h, () => this.RaisePropertyChanged(() => this.CurrentAccounts))); this.CompositeDisposable.Add( new EventListener<Action>( h => _model.FocusRequired += h, h => _model.FocusRequired -= h, this.SetFocus)); model.IsActivated = true; }
public void CloseTab(ColumnViewModel column, TabViewModel tab) { var ci = _columns.IndexOf(column); var ti = column.Tabs.IndexOf(tab); TabManager.CloseTab(ci, ti); }