示例#1
0
        public void ResolveArtForm()
        {
            if (Schedule != null)
            {
                switch (Schedule.Type)
                {
                case ScheduleType.PoetryRecital:
                    if (Schedule.Reference != -1)
                    {
                        ReferencedArtForm = World.GetPoeticForm(Schedule.Reference);
                    }
                    break;

                case ScheduleType.MusicalPerformance:
                    if (Schedule.Reference != -1)
                    {
                        ReferencedArtForm = World.GetMusicalForm(Schedule.Reference);
                    }
                    break;

                case ScheduleType.DancePerformance:
                    if (Schedule.Reference != -1)
                    {
                        ReferencedArtForm = World.GetDanceForm(Schedule.Reference);
                    }
                    break;
                }
                ReferencedArtForm.AddEvent(this);
            }
        }
示例#2
0
 public MusicalFormCreated(List <Property> properties, World world) : base(properties, world)
 {
     FormType = FormType.Musical;
     if (!string.IsNullOrWhiteSpace(FormId))
     {
         ArtForm = world.GetMusicalForm(Convert.ToInt32(FormId));
         ArtForm.AddEvent(this);
     }
 }
        private void PrintArtform()
        {
            if (_writtenContent.FormId == -1)
            {
                return;
            }
            ArtForm artForm = null;

            if (_writtenContent.Type == WrittenContentType.Poem)
            {
                artForm = _world.GetPoeticForm(_writtenContent.FormId);
            }
            else if (_writtenContent.Type == WrittenContentType.MusicalComposition)
            {
                artForm = _world.GetMusicalForm(_writtenContent.FormId);
            }
            else if (_writtenContent.Type == WrittenContentType.Choreography)
            {
                artForm = _world.GetDanceForm(_writtenContent.FormId);
            }
            // TODO
            // Does not seam to be right for other types like 'novel, 'essay', 'shortstory', 'guide', ...
            // Not sure which art form is correct in these cases
            //else
            //{
            //    artForm = _world.GetPoeticForm(_writtenContent.FormId);
            //}
            if (artForm != null)
            {
                Html.AppendLine("<b>" + artForm.FormType.GetDescription() + "</b><br />");
                Html.AppendLine("<ul>");
                Html.AppendLine("<li>" + artForm.ToLink() + "</li>");
                Html.AppendLine("</ul>");
                Html.AppendLine("</br>");
            }
        }
示例#4
0
 public ArtFormPrinter(ArtForm artform, World world)
 {
     _artform = artform;
     _world   = world;
 }