Exemple #1
0
 public ProjectOptions(GroupTimingOptions groupTimingOptions, CaptionContestOptions captionContestOptions)
 {
     this.groupTimingOptions = groupTimingOptions;
     this.captionContestOptions = captionContestOptions;
 }
Exemple #2
0
        private static CaptionContestOptions parseCaptionContest(string[] fileLines)
        {
            fileLines = findSection(fileLines,"<body>","<script type=\"text/javascript\">");

            string options = null;
            foreach (string line in fileLines)
                if (line.StartsWith("<!-- options:contest"))
                {
                    options = line;
                    break;
                }

            CaptionContestOptions captionContestOptions = new CaptionContestOptions();
            captionContestOptions.EnableCaptionContest = options!=null;
            if (captionContestOptions.EnableCaptionContest)
            {
                captionContestOptions.Message = Parser.parseMessage(options);
                captionContestOptions.EmailAddress = Parser.parseEmail(options);
            }

            return captionContestOptions;
        }
Exemple #3
0
 public ProjectOptions(CaptionContestOptions captionContestOptions)
 {
     groupTimingOptions = new GroupTimingOptions();
     this.captionContestOptions = captionContestOptions;
 }
Exemple #4
0
 public ProjectOptions(bool cycleGroups,double beginAfter,double showFor,double fadeInDuration,double fadeOutDuration,bool enableCaptionContest,string message,string emailAddress)
 {
     groupTimingOptions = new GroupTimingOptions(cycleGroups,beginAfter,showFor,fadeInDuration,fadeOutDuration);
     captionContestOptions = new CaptionContestOptions(enableCaptionContest,message,emailAddress);
 }
Exemple #5
0
 public ProjectOptions(bool enableCaptionContest, string message, string emailAddress)
 {
     groupTimingOptions = new GroupTimingOptions();
     captionContestOptions = new CaptionContestOptions(enableCaptionContest,message,emailAddress);
 }
Exemple #6
0
 public ProjectOptions(GroupTimingOptions groupTimingOptions)
 {
     this.groupTimingOptions = groupTimingOptions;
     captionContestOptions = new CaptionContestOptions();
 }
Exemple #7
0
 public ProjectOptions(bool cycleGroups, double beginAfter, double showFor, double fadeInDuration, double fadeOutDuration)
 {
     groupTimingOptions = new GroupTimingOptions(cycleGroups,beginAfter,showFor,fadeInDuration,fadeOutDuration);
     captionContestOptions = new CaptionContestOptions();
 }
Exemple #8
0
 public ProjectOptions()
 {
     groupTimingOptions = new GroupTimingOptions();
     captionContestOptions = new CaptionContestOptions();
 }
Exemple #9
0
 private static void writeCaptionContest(CaptionContestOptions captionContestOptions, List<GroupInfo> groupInfoList)
 {
     if (captionContestOptions.EnableCaptionContest)
     {
         int messagePos = captionContestPosition(groupInfoList);
         string message = captionContestOptions.Message;
         if (message.Contains("%email%"))
         {
             string mailto = String.Format("mailto:{0}?subject=Caption Contest Submission",captionContestOptions.EmailAddress);
             string emailLink = String.Format("<a href=\"{0}\">{1}</a>",mailto,captionContestOptions.EmailAddress);
             message = message.Replace("%email%",emailLink);
             outputFile.AppendLine(String.Format("<!-- options:contest message:[{0}] email:[{1}] -->",captionContestOptions.Message,captionContestOptions.EmailAddress));
             outputFile.AppendLine(String.Format("<p style=\"position:absolute; top:{0}px; padding-bottom:25px;\">{1}</p>",messagePos,message));
         }
     }
 }