Example #1
0
 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;
 }
Example #2
0
 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;
 }
Example #3
0
 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;
 }
Example #4
0
 public void CloseTab(ColumnViewModel column, TabViewModel tab)
 {
     var ci = _columns.IndexOf(column);
     var ti = column.Tabs.IndexOf(tab);
     TabManager.CloseTab(ci, ti);
 }