コード例 #1
0
        void InitializeDueNames()
        {
            var prefix      = "";
            var description = "";

            prefix += Source.Model.Settings.CourseAbbreviation;
            var path = Wrap.PathFromRoot.Skip(1).ToArray();

            for (int levelNumber = 0; levelNumber < path.Length; levelNumber++)
            {
                TopicLevel level = new TopicLevel();
                if (levelNumber < Source.Model.Settings.TopicLevels.Count)
                {
                    level = Source.Model.Settings.TopicLevels[levelNumber];
                }
                prefix += "-";
                prefix += string.Format("{0:D" + level.Digits + "}", path[levelNumber].NumberInTopic + 1);

                var topic = path[levelNumber] as FolderOrLectureItem;
                if (topic != null && Source.Model.Settings.EnableDescriptionContents)
                {
                    description += level.Caption + " " + (path[levelNumber].NumberInTopic + 1) + ". " + topic.Topic.Caption + "\r\n";
                }
            }

            dueTitle     = prefix + " " + Wrap.Video.Name;
            description += Source.Model.Settings.Description;
            if (!string.IsNullOrEmpty(Source.Model.Settings.ULearnUrlPrefix))
            {
                description += "\n\n" + Source.Model.Settings.ULearnUrlPrefix + Wrap.Guid;
            }
            description   += "\n\n" + YoutubeClip.GuidMarker(Wrap.Guid);
            dueDescription = description;
        }
コード例 #2
0
        void InitializeDueNames()
        {
            var prefix = "";

            prefix += Source.Model.Settings.CourseAbbreviation;
            var path = Wrap.PathFromRoot.Skip(1).ToArray();

            for (int levelNumber = 0; levelNumber < path.Length; levelNumber++)
            {
                TopicLevel level = new TopicLevel();
                if (levelNumber < Source.Model.Settings.TopicLevels.Count)
                {
                    level = Source.Model.Settings.TopicLevels[levelNumber];
                }
                prefix += "-";
                prefix += string.Format("{0:D" + level.Digits + "}", path[levelNumber].NumberInTopic + 1);
            }

            dueTitle = prefix + " " + Wrap.Topic.Caption;
        }