コード例 #1
0
        private void updateTheWrod(int level)
        {
            double newFamili = 0;
            long   newReview = 1;

            newFamili = curWords[curPlace].Familiarity;
            newReview = curWords[curPlace].ReviewedTimes;

            double sum = newFamili * newReview + level;

            newReview++;
            newFamili = sum / newReview;

            curWords[curPlace].Familiarity        = newFamili;
            curWords[curPlace].ReviewedTimes      = newReview;
            ClassIO.words[curPlace].Familiarity   = newFamili;
            ClassIO.words[curPlace].ReviewedTimes = newReview;

            ClassIO.WriteWordInfo(curWords[curPlace]);
        }
コード例 #2
0
 private void buttonReload_Click(object sender, RoutedEventArgs e)
 {
     ClassIO.LoadWords();
     curWords = ClassIO.words;
 }