コード例 #1
0
		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);
		}
コード例 #2
0
ファイル: OpenedFile.cs プロジェクト: vu111293/pat-design
//		/// <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);
        }
コード例 #3
0
 public override void Save(string fileName)
 {
     content.Save(fileName);
 }
コード例 #4
0
 public override void Save(FileSaveInformation fileSaveInformation)
 {
     content.Save(fileSaveInformation);
 }