public void Save() { string filePath = FileDirBrowser.SaveFile(FileTypeFilter.SqlFile, null, null); if (filePath != null) { _richTextBoxSql.SaveFile(filePath, RichTextBoxStreamType.PlainText); } }
private void OnFileSaveAs(object sender, EventArgs e) { string fileName = (_filePath == null) ? null : Path.GetFileNameWithoutExtension(_filePath) + DateTime.Now.ToString("yyyyMMdd.hhmmss"); string filePath = FileDirBrowser.SaveFile(FileTypeFilter.TextFile, fileName, null); if (filePath == null) { return; } SaveFile(filePath); }
private void OnFileOpen(object sender, EventArgs e) { TrySaveModified(sender, e); string filePath = FileDirBrowser.BrowseFile(FileTypeFilter.TextFile, null); if (filePath == null) { return; } OpenFile(filePath); }