ARCed.Scripting.ScriptEditorForm.ScintillaNativeInterfaceUpdateUi C# (CSharp) Method

ScintillaNativeInterfaceUpdateUi() private method

Check if cursor is on a brace or not, highlighting if necessary
private ScintillaNativeInterfaceUpdateUi ( object sender, NativeScintillaEventArgs e ) : void
sender object
e NativeScintillaEventArgs
return void
		private void ScintillaNativeInterfaceUpdateUi(object sender, NativeScintillaEventArgs e)
		{
			var scintilla = (Scintilla.Scintilla)sender;
			int pos = scintilla.CurrentPos;
			if (this.IsBrace(pos) || this.IsBrace(--pos))
			{
				int match = scintilla.NativeInterface.BraceMatch(pos, 0);
				if (match != -1)
					scintilla.NativeInterface.BraceHighlight(pos, match);
				else
					scintilla.NativeInterface.BraceBadLight(pos);
			}
			else
				scintilla.NativeInterface.BraceHighlight(-1, -1);
			Editor.StatusBar.Items[2].Text =
				String.Format("Current Position: {0}", this._scintilla.CurrentPos);
		}
#pragma warning restore 612, 618