From 09b8c1b958f4910d54938e3c234f93befdd6efaa Mon Sep 17 00:00:00 2001 From: Terry Cox Date: Wed, 1 Dec 2021 14:05:40 -0500 Subject: [PATCH] Issue #59 - Changes to remove Work Tab from Character page This tab wasn't really contributing to understanding a character --- .../StoryBuilder/Views/CharacterPage.xaml | 6 ------ StoryBuilderLib/DAL/StoryReader.cs | 3 --- StoryBuilderLib/DAL/StoryWriter.cs | 3 --- StoryBuilderLib/Models/CharacterModel.cs | 13 ------------- .../Services/Scrivener/ScrivenerReports.cs | 4 ---- StoryBuilderLib/ViewModels/CharacterViewModel.cs | 15 --------------- 6 files changed, 44 deletions(-) diff --git a/StoryBuilder/StoryBuilder/Views/CharacterPage.xaml b/StoryBuilder/StoryBuilder/Views/CharacterPage.xaml index 98c3c2bf..cb9c9945 100644 --- a/StoryBuilder/StoryBuilder/Views/CharacterPage.xaml +++ b/StoryBuilder/StoryBuilder/Views/CharacterPage.xaml @@ -335,12 +335,6 @@ - - - - _stability = value; } - - // Character work data - - private string _work; - public string Work - { - get => _work; - set => _work = value; - } - // Character likes data private string _notes; @@ -405,7 +395,6 @@ public CharacterModel(StoryModel model) : base("New Character", StoryItemType.Ch Shrewdness = string.Empty; Sociability = string.Empty; Stability = string.Empty; - Work = string.Empty; Notes = string.Empty; TraitList = new List(); Flaw = string.Empty; @@ -455,7 +444,6 @@ public CharacterModel(string name, StoryModel model) : base(name, StoryItemType. Shrewdness = string.Empty; Sociability = string.Empty; Stability = string.Empty; - Work = string.Empty; Notes = string.Empty; TraitList = new List(); Flaw = string.Empty; @@ -505,7 +493,6 @@ public CharacterModel(IXmlNode xn, StoryModel model) : base(xn, model) Shrewdness = string.Empty; Sociability = string.Empty; Stability = string.Empty; - Work = string.Empty; Notes = string.Empty; TraitList = new List(); Flaw = string.Empty; diff --git a/StoryBuilderLib/Services/Scrivener/ScrivenerReports.cs b/StoryBuilderLib/Services/Scrivener/ScrivenerReports.cs index a89d1788..fc9e3955 100644 --- a/StoryBuilderLib/Services/Scrivener/ScrivenerReports.cs +++ b/StoryBuilderLib/Services/Scrivener/ScrivenerReports.cs @@ -690,8 +690,6 @@ private async Task GenerateCharacterReport(BinderItem node, StoryElement element character.Religion = await _rdr.GetRtfText(character.Religion, character.Uuid); string savePsychNotes = character.PsychNotes; character.PsychNotes = await _rdr.GetRtfText(character.PsychNotes, character.Uuid); - string saveWork = character.Work; - character.Work = await _rdr.GetRtfText(character.Work, character.Uuid); string saveLikes = character.Notes; character.Notes = await _rdr.GetRtfText(character.Notes, character.Uuid); // Parse and write the report @@ -739,7 +737,6 @@ private async Task GenerateCharacterReport(BinderItem node, StoryElement element sb.Replace("@Shrewdness", character.Shrewdness); sb.Replace("@Sociability", character.Sociability); sb.Replace("@Stability", character.Stability); - sb.Replace("@Work", character.Work); sb.Replace("@Likes", character.Notes); sb.Replace("@Notes", character.BackStory); doc.AddText(sb.ToString(), format); @@ -758,7 +755,6 @@ private async Task GenerateCharacterReport(BinderItem node, StoryElement element character.Ethnic = saveEthnic; character.Religion = saveReligion; character.PsychNotes = savePsychNotes; - character.Work = saveWork; character.Notes = saveLikes; } diff --git a/StoryBuilderLib/ViewModels/CharacterViewModel.cs b/StoryBuilderLib/ViewModels/CharacterViewModel.cs index 476578d8..e2fd4937 100644 --- a/StoryBuilderLib/ViewModels/CharacterViewModel.cs +++ b/StoryBuilderLib/ViewModels/CharacterViewModel.cs @@ -457,17 +457,6 @@ public string Stability set => SetProperty(ref _stability, value); } - - // Character work data - - private string _work; - - public string Work - { - get => _work; - set => SetProperty(ref _work, value); - } - // Character likes data private string _notes; @@ -621,7 +610,6 @@ private async Task LoadModel() Shrewdness = Model.Shrewdness; Sociability = Model.Sociability; Stability = Model.Stability; - Work = Model.Work; Notes = Model.Notes; Flaw = Model.Flaw; BackStory = Model.BackStory; @@ -636,7 +624,6 @@ private async Task LoadModel() Ethnic = await _rdr.GetRtfText(Model.Ethnic, Uuid); Religion = await _rdr.GetRtfText(Model.Religion, Uuid); PsychNotes = await _rdr.GetRtfText(Model.PsychNotes, Uuid); - Work = await _rdr.GetRtfText(Model.Work, Uuid); Notes = await _rdr.GetRtfText(Model.Notes, Uuid); Flaw = await _rdr.GetRtfText(Model.Flaw, Uuid); BackStory = await _rdr.GetRtfText(Model.BackStory, Uuid); @@ -722,7 +709,6 @@ internal async Task SaveModel() Model.Ethnic = await _wtr.PutRtfText(Ethnic, Uuid, "ethnic.rtf"); Model.Religion = await _wtr.PutRtfText(Religion, Uuid, "religion.rtf"); Model.PsychNotes = await _wtr.PutRtfText(PsychNotes, Uuid, "psychnotes.rtf"); - Model.Work = await _wtr.PutRtfText(Work, Uuid, "work.rtf"); Model.Notes = await _wtr.PutRtfText(Notes, Uuid, "Notes.rtf"); Model.Flaw = await _wtr.PutRtfText(Flaw, Uuid, "flaw.rtf"); Model.BackStory = await _wtr.PutRtfText(BackStory, Uuid, "backstory.rtf"); @@ -1128,7 +1114,6 @@ public CharacterViewModel() Shrewdness = string.Empty; Sociability = string.Empty; Stability = string.Empty; - Work = string.Empty; Notes = string.Empty; Flaw = string.Empty; BackStory = string.Empty;