/// <summary> /// Show dialog to export a story to a user-defined location in the internal storage file format. /// </summary> /// <param name="story"></param> private void ShowExportAsFileDialog(string storyID) { if (!_storyContainer.HasStory(storyID)) { MessageBox.Show(this, $"The story '{storyID}' is not in the story container.", "Could not find story", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } var story = _storyContainer.GetStory(storyID); var sfd = new SaveFileDialog(); sfd.Filter = $"Story file|{_fileStore.GetDefaultFileSuffix()}"; sfd.FileName = _fileStore.GenerateFilename(story); sfd.DefaultExt = _fileStore.GetDefaultFileSuffix(); sfd.OverwritePrompt = true; if (sfd.ShowDialog(this) == DialogResult.OK) { _fileStore.SaveStory(story, sfd.FileName); } }
private void SaveStory(WdcInteractiveStory story) { _fileStore.SaveStory(story); }