public void SaveToFile() { base.SaveToFile(File.Path, Encoding); IsChanged = false; File.Container.UpdateText(true); if (FileIODone != null) { FileIODone.Invoke(this, EventArgs.Empty); } }
public void LoadFromFile() { Encoding = File.EncodingDefault; FileBindingMode = !File.AutoDecoding || File.HasHtmlEncoding; if (File.TextCache != null) { Text = File.TextCache; } else { if (FileBindingMode) { OpenBindingFile(File.Path, Encoding); } else { Text = (File as ProjectFile).Text; } } EndUpdate(); IsChanged = File.IsConverted || File.IsNormalized || File.IsChanged; if (File.Container != null) { File.Container.UpdateText(); } if (!FileBindingMode) { OnSyntaxHighlight(new TextChangedEventArgs(VisibleRange)); } ClearUndo(); if (File.Role == EditorFile.Roles.Log) { ReadOnly = true; TextChangedDelayed += ShowLogTail; } if (File.Container != null) { File.Container.UpdateText(); } if (FileIODone != null) { FileIODone.Invoke(this, EventArgs.Empty); } }