public bool SaveAFile(File f) { if (String.IsNullOrEmpty(f.filePath)){ SaveFileDialog saveDlg = new SaveFileDialog(); saveDlg.Title = "Save As"; saveDlg.DefaultExt = "rtf"; saveDlg.Filter = "RTF Files (*.rtf)|*.rtf|All Files (*.*)|*.*"; if (saveDlg.ShowDialog() == DialogResult.OK) { f.filePath = saveDlg.FileName; } else { new NotificationBar(mainform, "Bad", "Operation aborted. The file is not saved."); return false; } } rtx.SaveFile(f.filePath); f.content = rtx.Text; f.Saved(); new NotificationBar(mainform, "Good", f.filePath + " Saved!"); return true; }