Example #1
0
        private void Ana()
        {
            //Threads.Add(threads[i]);
            //Times.Add(times[i]);

            int    AllTime     = Times.Sum();                           //其他软件的总时长
            int    OtherWork   = Threads.Count;                         //其他软件的数量
            int    second      = (int)(this.timeSpan).TotalSeconds;
            string _1stimulate = Stimulate(AllTime, OtherWork, second); //一个关于学习报告的string

            string tim = new MyTime(AllTime).ToString();
            string s1  = "     在" + dateTime.ToString() + "的学习过程当中,您总计使用了" + OtherWork + "个其他类型的软件,累计时长达" + tim + "," + _1stimulate + "\n";
            //s1就是第一段
            string    s2        = "     " + S2(Threads, Times) + "\n";
            string    s3        = "     " + S3();
            TextBlock textBlock = new TextBlock();

            textBlock.Width        = 580;
            textBlock.Height       = 380;
            textBlock.Margin       = new Thickness(130, 50, 90, 5); //左上下右
            textBlock.FontSize     = 15;
            textBlock.TextWrapping = (TextWrapping)2;
            textBlock.Text         = s1 + s2 + s3;

            Grid gr = new Grid();

            gr.Children.Add(textBlock);

            Simon.Children.Add(gr);
        }
Example #2
0
            private string TextPrompt(string s, int t)
            {
                MyTime myTime = new MyTime(t);
                string time   = myTime.ToString();
                string retur  = "您在上次学习过程中使用" + s + "软件的时间为" + time;

                return(retur);
            }