public void RemoveView(ITextView textView) { textView.GotAggregateFocus -= OnTextViewGotAggregateFocus; _allViews.Remove(textView); if (LastActiveView == textView) { LastActiveView = (_allViews.Count > 0 ? _allViews[_allViews.Count - 1] : null); LastActiveViewChanged?.Invoke(this, EventArgs.Empty); } }
protected void OnTextViewGotAggregateFocus(object sender, EventArgs eventArgs) { LastActiveView = sender as ITextView; LastActiveViewChanged?.Invoke(this, EventArgs.Empty); }