void HandleSyntaxModeChanged (object sender, SyntaxModeChangeEventArgs e) { var oldProvider = e.OldMode as IQuickTaskProvider; if (oldProvider != null) widget.RemoveQuickTaskProvider (oldProvider); var newProvider = e.NewMode as IQuickTaskProvider; if (newProvider != null) widget.AddQuickTaskProvider (newProvider); }
protected virtual void OnSyntaxModeChanged (SyntaxModeChangeEventArgs e) { var handler = SyntaxModeChanged; if (handler != null) handler (this, e); }