Esempio n. 1
0
 public Section(FountainBlockElement Section)
 {
     FSharpSection = (FountainBlockElement.Section)Section;
     N             = FSharpSection.Item1;
     Spans         = new Spans(FSharpSection.Item2);
     Range         = FSharpSection.Item3;
 }
Esempio n. 2
0
 public Transition(FountainBlockElement Transition)
 {
     FSharpTransition = (FountainBlockElement.Transition)Transition;
     Forced           = FSharpTransition.Item1;
     Spans            = new Spans(FSharpTransition.Item2);
     Range            = FSharpTransition.Item3;
 }
Esempio n. 3
0
 public Action(FountainBlockElement Action)
 {
     FSharpAction = (FountainBlockElement.Action)Action;
     Forced       = FSharpAction.Item1;
     Spans        = new Spans(FSharpAction.Item2);
     Range        = FSharpAction.Item3;
 }
Esempio n. 4
0
 public SceneHeading(FountainBlockElement SceneHeading)
 {
     FSharpSceneHeading = (FountainBlockElement.SceneHeading)SceneHeading;
     Forced             = FSharpSceneHeading.Item1;
     Spans = new Spans(FSharpSceneHeading.Item2);
     Range = FSharpSceneHeading.Item3;
 }
Esempio n. 5
0
 public TitlePage(FountainBlockElement TitlePage)
 {
     KeyValuePairs   = new List <KeyValuePair>();
     FSharpTitlePage = (FountainBlockElement.TitlePage)TitlePage;
     foreach (Tuple <Tuple <string, Range>, FSharpList <FountainSpanElement> > k in FSharpTitlePage.Item1)
     {
         KeyValuePairs.Add(new KeyValuePair(k));
     }
     Range = FSharpTitlePage.Item2;
 }
Esempio n. 6
0
        public Character(FountainBlockElement Character)
        {
            FSharpCharacter = (FountainBlockElement.Character)Character;
            Forced          = FSharpCharacter.Item1;
            Primary         = FSharpCharacter.Item2;
            Spans           = new Spans(FSharpCharacter.Item3);
            Range           = FSharpCharacter.Item4;

            Regex           regex   = new Regex(@"\(([^\(\)]*)\)");
            MatchCollection Matches = regex.Matches(Spans.Literals[0].Text);

            Name  = regex.Replace(Spans.Literals[0].Text, "").Trim();
            State = Matches.Cast <Match>().Select(m => m.Groups[1].Value).ToArray();
        }
Esempio n. 7
0
 public Synopses(FountainBlockElement Synopses)
 {
     FSharpSynopses = (FountainBlockElement.Synopses)Synopses;
     Spans          = new Spans(FSharpSynopses.Item1);
     Range          = FSharpSynopses.Item2;
 }
Esempio n. 8
0
 public Parenthetical(FountainBlockElement Parenthetical)
 {
     FSarpParenthetical = (FountainBlockElement.Parenthetical)Parenthetical;
     Spans = new Spans(FSarpParenthetical.Item1);
     Range = FSarpParenthetical.Item2;
 }
Esempio n. 9
0
 public PageBreak(FountainBlockElement PageBreak)
 {
     FSharpPageBreak = (FountainBlockElement.PageBreak)PageBreak;
     Range           = FSharpPageBreak.Item;
 }
Esempio n. 10
0
 public Lyrics(FountainBlockElement Lyrics)
 {
     FSharpLyrics = (FountainBlockElement.Lyrics)Lyrics;
     Spans        = new Spans(FSharpLyrics.Item1);
     Range        = FSharpLyrics.Item2;
 }
Esempio n. 11
0
 public DualDialogue(FountainBlockElement DualDialogue)
 {
     FSharpDualDialogue = (FountainBlockElement.DualDialogue)DualDialogue;
     Blocks             = new Blocks(FSharpDualDialogue.Item1);
     Range = FSharpDualDialogue.Item2;
 }
Esempio n. 12
0
 public Dialogue(FountainBlockElement Dialogue)
 {
     FSharpDialogue = (FountainBlockElement.Dialogue)Dialogue;
     Spans          = new Spans(FSharpDialogue.Item1);
     Range          = FSharpDialogue.Item2;
 }
Esempio n. 13
0
 public Centered(FountainBlockElement Centered)
 {
     FSharpCentered = (FountainBlockElement.Centered)Centered;
     Spans          = new Spans(FSharpCentered.Item1);
     Range          = FSharpCentered.Item2;
 }
Esempio n. 14
0
 public Boneyard(FountainBlockElement Boneyard)
 {
     FSharpBoneyard = (FountainBlockElement.Boneyard)Boneyard;
     Text           = FSharpBoneyard.Item1;
     Range          = FSharpBoneyard.Item2;
 }
Esempio n. 15
0
 public Blocks(FSharpList <FountainBlockElement> blocks)
 {
     Actions        = new List <Action>();
     Boneyards      = new List <Boneyard>();
     Centereds      = new List <Centered>();
     Characters     = new List <Character>();
     Dialogues      = new List <Dialogue>();
     DualDialogues  = new List <DualDialogue>();
     Lyrics         = new List <Lyrics>();
     PageBreaks     = new List <PageBreak>();
     Parentheticals = new List <Parenthetical>();
     SceneHeadings  = new List <SceneHeading>();
     Sections       = new List <Section>();
     Synopses       = new List <Synopses>();
     TitlePages     = new List <TitlePage>();
     Transitions    = new List <Transition>();
     FSharpBlocks   = blocks;
     for (int i = 0; i < blocks.Count(); i++)
     {
         FountainBlockElement b = blocks[i];
         if (b.IsAction)
         {
             Actions.Add(new Action(b));
         }
         if (b.IsBoneyard)
         {
             Boneyards.Add(new Boneyard(b));
         }
         if (b.IsCentered)
         {
             Centereds.Add(new Centered(b));
         }
         if (b.IsCharacter)
         {
             Characters.Add(new Character(b)); Character_Index.Add(i);
         }
         if (b.IsDialogue)
         {
             Dialogues.Add(new Dialogue(b)); Dialogue_Index.Add(i);
         }
         if (b.IsDualDialogue)
         {
             DualDialogue d = new DualDialogue(b);
             DualDialogues.Add(d);
             d.Blocks.Characters.ForEach(c => Characters.Add(c));
             d.Blocks.Dialogues.ForEach(c => Dialogues.Add(c));
         }
         if (b.IsLyrics)
         {
             Lyrics.Add(new Lyrics(b));
         }
         if (b.IsPageBreak)
         {
             PageBreaks.Add(new PageBreak(b));
         }
         if (b.IsParenthetical)
         {
             Parentheticals.Add(new Parenthetical(b));
         }
         if (b.IsSceneHeading)
         {
             SceneHeadings.Add(new SceneHeading(b)); SceneHeading_Index.Add(i);
         }
         if (b.IsSection)
         {
             Sections.Add(new Section(b));
         }
         if (b.IsSynopses)
         {
             Synopses.Add(new Synopses(b));
         }
         if (b.IsTitlePage)
         {
             TitlePages.Add(new TitlePage(b));
         }
         if (b.IsTransition)
         {
             Transitions.Add(new Transition(b));
         }
     }
 }