Beispiel #1
0
        private static void AddNewStudyWords(ProtocolUser protocolUser)
        {
            for (var i = 0; i < StaticData.NewStudyWordCount; i++)
            {
                var id = protocolUser.LastStudiedWordId + 1;
                if (id >= EvaServer.WordDataCount)
                {
                    break;
                }

                protocolUser.LastStudiedWordId++;
                protocolUser.WordStudyData[id] = new ProtocolUserWordStudyData
                {
                    Id         = id,
                    StudyCount = 0,
                };
                protocolUser.AddStudyWord(protocolUser.TodayStudyDate, id);
            }
        }
Beispiel #2
0
        private static void AddStudyWordToNextPeriod(ProtocolUser protocolUser, ProtocolUserWordStudyData data)
        {
            var nextStudyDate = protocolUser.TodayStudyDate + StaticData.StudyPeriodDate[data.StudyCount];

            protocolUser.AddStudyWord(nextStudyDate, data.Id);
        }