Beispiel #1
0
        private void ResetForText(string fileName)
        {
            Reset(false, true);

            if (fileName == null)
            {
                _internalFileViewer.SetHighlighting("Default");
            }
            else
            {
                EditorOptions.SetSyntax(_internalFileViewer, fileName);
            }

            if (!string.IsNullOrEmpty(fileName) &&
                (fileName.EndsWith(".diff", StringComparison.OrdinalIgnoreCase) ||
                 fileName.EndsWith(".patch", StringComparison.OrdinalIgnoreCase)))
            {
                ResetForDiff();
            }
        }
Beispiel #2
0
 public void SetSyntax(string fileName)
 {
     EditorOptions.SetSyntax(_internalFileViewer, fileName);
 }