/// <summary> /// Switches the language being edited to C#. /// </summary> /// <param name="sender">The <c>NSMenuItem</c> that initiated the switch.</param> partial void ShowCSharp (Foundation.NSObject sender) { // Switching to a new language? if (Language.LanguageIdentifier != "CSharp") { Language = new CSharpDescriptor(); // Apply any changes to open windows App.UpdateWindowPreferences(); } }
/// <summary> /// Initializes a new instance of the <see cref="AppKit.TextKit.Formatter.LanguageFormatter"/> class. /// </summary> /// <param name="textEditor">The <c>NSTextView</c> that this language formatter will syntax highlight.</param> /// <param name="language">The <see cref="AppKit.TextKit.Formatter.LanguageDescriptor"/> defining the /// language syntax highlighting rules.</param> public LanguageFormatter (NSTextView textEditor, LanguageDescriptor language) { // initialize this.TextEditor = textEditor; this.Language = language; }
/// <summary> /// Initializes a new instance of the <see cref="AppKit.TextKit.Formatter.LanguageFormatter"/> class. /// </summary> /// <param name="textEditor">The <c>NSTextView</c> that this language formatter will syntax highlight.</param> /// <param name="language">The <see cref="AppKit.TextKit.Formatter.LanguageDescriptor"/> defining the /// language syntax highlighting rules.</param> public LanguageFormatter(NSTextView textEditor, LanguageDescriptor language) { // initialize this.TextEditor = textEditor; this.Language = language; }