Skip to content

Commit

Permalink
Merge pull request #64 from terrycox/delete_character_work_tab
Browse files Browse the repository at this point in the history
Issue #59 - Changes to remove Work Tab from Character page
No character work tab and the app runs, LGTM
  • Loading branch information
Rarisma authored Dec 1, 2021
2 parents e6e5055 + 09b8c1b commit 4f3f53e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 44 deletions.
6 changes: 0 additions & 6 deletions StoryBuilder/StoryBuilder/Views/CharacterPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,6 @@
</StackPanel>
</Grid>
</PivotItem>
<PivotItem Header="Work">
<!-- Character work data -->
<usercontrols:RichEditBoxExtended Header="Work" RtfText="{x:Bind CharVm.Work, Mode=TwoWay}" AcceptsReturn="True"
IsSpellCheckEnabled="True" TextWrapping="Wrap"
ScrollViewer.VerticalScrollBarVisibility="Visible" />
</PivotItem>
<PivotItem Header="Notes">
<!-- Character likes data -->
<usercontrols:RichEditBoxExtended Header="Notes" RtfText="{x:Bind CharVm.Notes, Mode=TwoWay}" AcceptsReturn="True"
Expand Down
3 changes: 0 additions & 3 deletions StoryBuilderLib/DAL/StoryReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,6 @@ private void ParseCharacter(IXmlNode xn)
case "PsychNotes":
chr.PsychNotes = attr.InnerText;
break;
case "Work":
chr.Work = attr.InnerText;
break;
case "Notes":
chr.Notes = attr.InnerText;
break;
Expand Down
3 changes: 0 additions & 3 deletions StoryBuilderLib/DAL/StoryWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,6 @@ private void ParseCharacterElement(StoryElement element)
attr = _xml.CreateAttribute("PsychNotes");
attr.Value = rec.PsychNotes;
chr.Attributes.Append(attr);
attr = _xml.CreateAttribute("Work");
attr.Value = rec.Work;
chr.Attributes.Append(attr);
attr = _xml.CreateAttribute("Notes");
attr.Value = rec.Notes;
chr.Attributes.Append(attr);
Expand Down
13 changes: 0 additions & 13 deletions StoryBuilderLib/Models/CharacterModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,6 @@ public string Stability
set => _stability = value;
}


// Character work data

private string _work;
public string Work
{
get => _work;
set => _work = value;
}

// Character likes data

private string _notes;
Expand Down Expand Up @@ -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<string>();
Flaw = string.Empty;
Expand Down Expand Up @@ -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<string>();
Flaw = string.Empty;
Expand Down Expand Up @@ -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<string>();
Flaw = string.Empty;
Expand Down
4 changes: 0 additions & 4 deletions StoryBuilderLib/Services/Scrivener/ScrivenerReports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down
15 changes: 0 additions & 15 deletions StoryBuilderLib/ViewModels/CharacterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4f3f53e

Please sign in to comment.