internal TextBuffer(string initialContent) { this.lineList = new List <string>(); this.lineList.Add(initialContent); ArrangeTextBuffer(); this.scriptModified = false; this.parsePending = false; undoRedoRecorder = new UndoRedoRecorder(this.lineList); }
internal bool ReloadFromFile(string scriptFilePath) { if (string.IsNullOrEmpty(scriptFilePath)) { return(false); } ScriptFileReader scriptReader = new ScriptFileReader(scriptFilePath, true); this.lineList = scriptReader.ReadInput(); undoRedoRecorder = new UndoRedoRecorder(this.lineList); // Setting through these properties instead of directly to the data // members (i.e. this.parsePending and this.scriptModified) so that // UI listeners get notified of such reload event and update the UI // accordingly. // this.ParsePending = true; this.ScriptModified = false; return(true); }
internal TextBuffer(IScriptObject owningScript) { this.owningScript = owningScript; IParsedScript parsedScript = owningScript.GetParsedScript(); if (parsedScript.GetScriptPath() == "") { this.lineList = new List <string>(); this.lineList.Add(string.Empty); } else { string scriptFilePath = parsedScript.GetScriptPath(); ScriptFileReader scriptReader = new ScriptFileReader(scriptFilePath, true); this.lineList = scriptReader.ReadInput(); } undoRedoRecorder = new UndoRedoRecorder(this.lineList); this.parsePending = true; this.scriptModified = false; }
internal TextBuffer(string initialContent) { this.lineList = new List<string>(); this.lineList.Add(initialContent); ArrangeTextBuffer(); this.scriptModified = false; this.parsePending = false; undoRedoRecorder = new UndoRedoRecorder(this.lineList); }
internal TextBuffer(IScriptObject owningScript) { this.owningScript = owningScript; IParsedScript parsedScript = owningScript.GetParsedScript(); if (parsedScript.GetScriptPath() == "") { this.lineList = new List<string>(); this.lineList.Add(string.Empty); } else { string scriptFilePath = parsedScript.GetScriptPath(); ScriptFileReader scriptReader = new ScriptFileReader(scriptFilePath, true); this.lineList = scriptReader.ReadInput(); } undoRedoRecorder = new UndoRedoRecorder(this.lineList); this.parsePending = true; this.scriptModified = false; }