예제 #1
0
 public ProjectOptions(GroupTimingOptions groupTimingOptions, CaptionContestOptions captionContestOptions)
 {
     this.groupTimingOptions = groupTimingOptions;
     this.captionContestOptions = captionContestOptions;
 }
예제 #2
0
파일: Open.cs 프로젝트: Auzzy/personal
        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;
        }
예제 #3
0
 public ProjectOptions(CaptionContestOptions captionContestOptions)
 {
     groupTimingOptions = new GroupTimingOptions();
     this.captionContestOptions = captionContestOptions;
 }
예제 #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);
 }
예제 #5
0
 public ProjectOptions(bool enableCaptionContest, string message, string emailAddress)
 {
     groupTimingOptions = new GroupTimingOptions();
     captionContestOptions = new CaptionContestOptions(enableCaptionContest,message,emailAddress);
 }
예제 #6
0
 public ProjectOptions(GroupTimingOptions groupTimingOptions)
 {
     this.groupTimingOptions = groupTimingOptions;
     captionContestOptions = new CaptionContestOptions();
 }
예제 #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();
 }
예제 #8
0
 public ProjectOptions()
 {
     groupTimingOptions = new GroupTimingOptions();
     captionContestOptions = new CaptionContestOptions();
 }
예제 #9
0
파일: Save.cs 프로젝트: Auzzy/personal
 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));
         }
     }
 }