virtual public void SaveAsDocument() { string fileName_ = string.Empty; if (isDocumentModified && documentFileName != string.Empty) { if (OnSaveAsDocumentPrompt != null) { var args_ = new SaveAsDocumentPromptEventArgs(); OnSaveAsDocumentPrompt(this, args_); if (args_.IsHandled) { fileName_ = args_.FileName; } } } var args = new DocumentSaveAsEventArgs { FileName = fileName_ }; OnSaveAsDocument?.Invoke(this, args); }
virtual public void SaveDocumentAs() { string fileName_ = string.Empty; if (isDocumentModified && documentFileName != string.Empty) { if (OnSaveDoucmentAsPrompt != null) { DocumentSaveAsPromptEventArgs args = new DocumentSaveAsPromptEventArgs(); OnSaveDoucmentAsPrompt(this, args); if (args.IsHandled) { fileName_ = args.FileName; } } } if (OnSaveDocumentAs != null) { DocumentSaveAsEventArgs args = new DocumentSaveAsEventArgs(); args.FileName = fileName_; OnSaveDocumentAs(this, args); } }