private void SaveRtfText() { SaveFileDialog dialog = DialogFactory.GetSaveRtfDialog(); if (dialog.ShowDialog() == true) { try { File.WriteAllText(dialog.FileName, this.Rtf); } catch (Exception ex) { ShowError(ex); } } }
private void OpenRtfText() { OpenFileDialog dialog = DialogFactory.GetOpenRtfDialog(); if (dialog.ShowDialog() == true) { try { var rtf = File.ReadAllText(dialog.FileName); this.Rtf = rtf; } catch (Exception ex) { ShowError(ex); } } }