internal Story SubstoryRight(string p) { bool Found = false; Story ret = new Story(); foreach (StoryLine l in Lines) { if (!Found) { StoryLine TempLine = new StoryLine(); foreach (CTextpart tp in l.TextParts) { if (!Found) { int index = tp.text.IndexOf(p); if (index >= 0) { Found = true; TempLine.AddTextParts(new CTextpart(tp.text.Substring(index), tp.font)); } } else { TempLine.AddTextParts(tp); } } ret.AddLine(TempLine); } else { ret.AddLine(l); } } return(ret); }
internal Story SubstoryLeft(string p) { Story ret = new Story(); foreach (StoryLine l in Lines) { StoryLine TempLine = new StoryLine(); foreach (CTextpart tp in l.TextParts) { int index = tp.text.IndexOf(p); if (index >= 0) { // aggiungo parte prima del separtore if (index > 0) { TempLine.AddTextParts(new CTextpart(tp.text.Substring(0, index), tp.font)); } if (TempLine.TextParts.Count > 0) { ret.AddLine(TempLine); } return(ret); } else { TempLine.AddTextParts(tp); } } ret.AddLine(TempLine); } return(ret); }
public Story(string text, Font font) { this.Lines = new List <StoryLine>(); TempLine = new StoryLine(); TempLine.AddTextParts(new CTextpart(text, font)); this.Lines.Add(TempLine); TempLine = new StoryLine(); }
public Story(string sID) { this.ID = sID; this.Lines = new List <StoryLine>(); TempLine = new StoryLine(); }
public Story() { this.ID = ""; this.Lines = new List <StoryLine>(); TempLine = new StoryLine(); }
private void AddLine(StoryLine TempLine) { Lines.Add(TempLine); }
internal void AddLineEnd() { Lines.Add(TempLine); TempLine = new StoryLine(); }
public Story(StoryLine CurLine) { this.Lines = new List <StoryLine>(); this.Lines.Add(CurLine); TempLine = new StoryLine(); }