示例#1
0
文件: Open.cs 项目: Auzzy/personal
        private static GroupTimingOptions parseTimingOptions(string[] fileLines)
        {
            fileLines = findSection(fileLines,"<!-- options:timing -->","<!-- end -->");
            fileLines = fileLines.Skip(1).ToArray();

            string cycleGroupsStr = null;
            string pauseStr = null;
            string fadeInStr = null;
            string fadeOutStr = null;
            string initStr = null;

            foreach (string line in fileLines)
            {
                if (line.StartsWith("<!-- cycleGroups"))
                    cycleGroupsStr = line;
                else if (line.StartsWith("pause"))
                    pauseStr = line;
                else if (line.StartsWith("fadeIn"))
                    fadeInStr = line;
                else if (line.StartsWith("fadeOut"))
                    fadeOutStr = line;
                else if (line.StartsWith("init"))
                    initStr = line;
            }

            GroupTimingOptions groupTimingOptions = new GroupTimingOptions();
            groupTimingOptions.CycleGroups = Parser.parseCycleGroups(cycleGroupsStr);
            groupTimingOptions.FadeInDuration = Parser.parseOption(fadeInStr);
            groupTimingOptions.FadeOutDuration = Parser.parseOption(fadeOutStr);
            groupTimingOptions.ShowFor = Parser.parseOption(pauseStr);
            if (groupTimingOptions.CycleGroups)
                groupTimingOptions.BeginAfter = Parser.parseOption(initStr);

            return groupTimingOptions;
        }
示例#2
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);
 }
示例#3
0
 public ProjectOptions(GroupTimingOptions groupTimingOptions, CaptionContestOptions captionContestOptions)
 {
     this.groupTimingOptions = groupTimingOptions;
     this.captionContestOptions = captionContestOptions;
 }
示例#4
0
 public ProjectOptions(bool enableCaptionContest, string message, string emailAddress)
 {
     groupTimingOptions = new GroupTimingOptions();
     captionContestOptions = new CaptionContestOptions(enableCaptionContest,message,emailAddress);
 }
示例#5
0
 public ProjectOptions(CaptionContestOptions captionContestOptions)
 {
     groupTimingOptions = new GroupTimingOptions();
     this.captionContestOptions = captionContestOptions;
 }
示例#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 writeJSOptions(GroupTimingOptions groupTimingOptions)
 {
     outputFile.AppendLine("<!-- options:timing -->");
     outputFile.AppendLine(String.Format("<!-- cycleGroups:[{0}] -->",groupTimingOptions.CycleGroups));
     outputFile.AppendLine(String.Format("pause = {0};",groupTimingOptions.ShowFor));
     outputFile.AppendLine(String.Format("fadeIn = {0};",groupTimingOptions.FadeInDuration));
     outputFile.AppendLine(String.Format("fadeOut = {0};",groupTimingOptions.FadeOutDuration));
     if (groupTimingOptions.CycleGroups)
         outputFile.AppendLine(String.Format("init = {0}",groupTimingOptions.BeginAfter));
     outputFile.AppendLine("<!-- end -->");
 }
示例#10
0
文件: Save.cs 项目: Auzzy/personal
 private static void writeJSCall(List<GroupInfo> groupInfoList, GroupTimingOptions groupTimingOptions)
 {
     outputFile.AppendLine("<script type=\"text/javascript\">");
     writeJSGroups(groupInfoList);
     writeJSOptions(groupTimingOptions);
     writeJSCall(groupTimingOptions.CycleGroups);
     outputFile.AppendLine("</script>");
 }