10 |
using RomCheater.Core; |
using RomCheater.Core; |
11 |
using System.IO; |
using System.IO; |
12 |
using RomCheater.Logging; |
using RomCheater.Logging; |
|
using Fireball.CodeEditor.SyntaxFiles; |
|
13 |
|
|
14 |
namespace RomCheater.ScratchPad |
namespace RomCheater.ScratchPad |
15 |
{ |
{ |
138 |
{ |
{ |
139 |
var text = sr.ReadToEnd(); |
var text = sr.ReadToEnd(); |
140 |
sr.Close(); |
sr.Close(); |
141 |
|
txtEditor.Text = text; |
|
txtEditor.Document = new Fireball.Syntax.SyntaxDocument(); |
|
|
//txtEditor.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.SizeInPoints); |
|
|
txtEditor.Document.Text = text; |
|
|
SyntaxLanguage language = SyntaxLanguage.Text; |
|
|
CodeEditorSyntaxLoader.SetSyntax(txtEditor, language); |
|
|
txtEditor.Document.ReParse(); |
|
142 |
this.UpdateTabName(fi.Name); |
this.UpdateTabName(fi.Name); |
143 |
this.IsDefaultDocument = false; |
this.IsDefaultDocument = false; |
144 |
this.DocumentSaved = true; |
this.DocumentSaved = true; |
186 |
{ |
{ |
187 |
try |
try |
188 |
{ |
{ |
189 |
foreach (var t in txtEditor.Document.Lines) |
foreach (var t in txtEditor.Lines) |
190 |
{ |
{ |
191 |
sw.WriteLine(t); |
sw.WriteLine(t); |
192 |
} |
} |