Example #1
0
        public void Save()
        {
            string filePath = FileDirBrowser.SaveFile(FileTypeFilter.SqlFile, null, null);

            if (filePath != null)
            {
                _richTextBoxSql.SaveFile(filePath, RichTextBoxStreamType.PlainText);
            }
        }
Example #2
0
        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);
        }
Example #3
0
        private void OnFileOpen(object sender, EventArgs e)
        {
            TrySaveModified(sender, e);

            string filePath = FileDirBrowser.BrowseFile(FileTypeFilter.TextFile, null);

            if (filePath == null)
            {
                return;
            }

            OpenFile(filePath);
        }