Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            using (ResXResourceWriter resx = new ResXResourceWriter(frenchBook1))
            {
                for (int k = 0; k <= 49; k++)
                {
                    for (int paragraph = 1; paragraph <= 350; paragraph++)
                    {
                        StoryParagraph newParag = CreateParagraphTranslated.CreateAParagraph(paragraph);

                        resx.AddResource("Paragraph" + paragraph, newParag.ContentText);
                        int j = 0;
                        foreach (Event Decision in newParag.GetListDecision)
                        {
                            if ((Decision is MoveEvent || Decision is CapacityEvent || Decision is RunEvent || Decision is MealEvent || Decision is ItemRequieredEvent || Decision is LinkedEvent || Decision is LoseBackPack || Decision is LoseWeaponHolder) && Decision.DestinationNumber.ToString() != null)
                            {
                                resx.AddResource("Paragraph" + paragraph + "To" + Decision.DestinationNumber.ToString(), Decision.TriggerMessage);
                            }
                            else
                            {
                                j++;
                                resx.AddResource("Paragraph" + paragraph + Decision.GetType().Name + j, Decision.TriggerMessage);
                            }
                        }
                    }
                }

                System.Diagnostics.Debug.WriteLine("done");
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Send the Hero to the specified Paragraph
 /// </summary>
 /// <param name="paragraphNumber">The Paragraph number</param>
 private void SetActualParagraph(int paragraphNumber)
 {
     try
     {
         this.ActualParagraph = GetParagraph(paragraphNumber);
     }
     catch (ParagraphNotFoundException)
     {
     }
 }
Exemplo n.º 3
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     for (int i = 0; i <= 100; i++)
     {
         for (int paragraph = 1; paragraph <= 350; paragraph++)
         {
             StoryParagraph newParag = CreateParagraph.CreateAParagraph(paragraph);
         }
     }
     System.Diagnostics.Debug.WriteLine("Finished");
 }
Exemplo n.º 4
0
 /// <summary>
 /// Add a Paragraph the List Paragraphs the Hero has visited
 /// </summary>
 /// <param name="paragraph"></param>
 public void AddParagraph(StoryParagraph paragraph)
 {
     this.content.Add(paragraph);
 }