public override void Save(OpenedFile file, Stream stream) { if (file != this.PrimaryFile) throw new ArgumentException("file must be the primary file of the primary view content, override Save() to handle other files"); SaveToPrimary(); primaryViewContent.Save(file, stream); }
// /// <summary> // /// Called before saving the current view. This event is raised both when saving to disk and to memory (for switching between views). // /// </summary> // public event EventHandler SavingCurrentView; // // /// <summary> // /// Called after saving the current view. This event is raised both when saving to disk and to memory (for switching between views). // /// </summary> // public event EventHandler SavedCurrentView; void SaveCurrentViewToStream(Stream stream) { // if (SavingCurrentView != null) // SavingCurrentView(this, EventArgs.Empty); inSaveOperation = true; try { currentView.Save(this, stream); } finally { inSaveOperation = false; } // if (SavedCurrentView != null) // SavedCurrentView(this, EventArgs.Empty); }
public override void Save(string fileName) { content.Save(fileName); }
public override void Save(FileSaveInformation fileSaveInformation) { content.Save(fileSaveInformation); }