void TextView_GotAggregateFocus(object sender, EventArgs e) { var view = sender as ITextView; if (OutlineMargins.ContainsKey(view)) { CurrentMargin = OutlineMargins[view]; } }
public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer) { CurrentMargin = new EditorMargin(wpfTextViewHost); OutlineMargins.Add(wpfTextViewHost.TextView, CurrentMargin); wpfTextViewHost.TextView.Closed += TextView_Closed; wpfTextViewHost.TextView.GotAggregateFocus += TextView_GotAggregateFocus; return(CurrentMargin); }
public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer) { Babe.Lua.Package.DTEHelper.Current.SelectionPage = wpfTextViewHost.TextView.Selection; CurrentMargin = new EditorMargin(wpfTextViewHost); OutlineMargins.Add(wpfTextViewHost.TextView, CurrentMargin); wpfTextViewHost.TextView.Closed += TextView_Closed; wpfTextViewHost.TextView.GotAggregateFocus += TextView_GotAggregateFocus; return(CurrentMargin); }
void TextView_Closed(object sender, EventArgs e) { OutlineMargins.Remove(sender as ITextView); }