Esempio n. 1
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            //显示一句话
            timer.Stop();
            showorhidetrue();
            mkacg_showhitokoto mkacgclass = new mkacg_showhitokoto();

            String[] list = mkacgclass.hitokoto();
            bg_text.Text      = "";
            bg_text.Text      = list[0] + "\n";
            bg_source.Content = list[1] + "\n";
            timer.Start();
        }
Esempio n. 2
0
        private void someTime(object sender, EventArgs e)
        {
            someTime_timer.Stop();

            //显示一句话
            timer.Stop();
            showorhidetrue();
            mkacg_showhitokoto mkacgclass = new mkacg_showhitokoto();

            String[] list = mkacgclass.hitokoto();
            bg_text.Text      = "";
            bg_text.Text      = list[0] + "\n";
            bg_source.Content = list[1] + "\n";
            timer.Start();
            someTime_timer.Interval = new TimeSpan(0, 0, someTime_random.Next(1, 1800));     //随机事件进行消息提醒
            someTime_timer.Tick    += new EventHandler(someTime);
            someTime_timer.Start();
        }
        private void someTime(object sender , EventArgs e)
        {
            someTime_timer.Stop();

            //显示一句话
            timer.Stop();
            showorhidetrue();
            mkacg_showhitokoto mkacgclass = new mkacg_showhitokoto();
            String[] list = mkacgclass.hitokoto();
            bg_text.Text = "";
            bg_text.Text = list[0] + "\n";
            bg_source.Content = list[1] + "\n";
            timer.Start();
            someTime_timer.Interval = new TimeSpan(0 , 0 , someTime_random.Next(1 , 1800));  //随机事件进行消息提醒
            someTime_timer.Tick += new EventHandler(someTime);
            someTime_timer.Start();
        }
 private void MenuItem_Click(object sender , RoutedEventArgs e)
 {
     //显示一句话
     timer.Stop();
     showorhidetrue();
     mkacg_showhitokoto mkacgclass = new mkacg_showhitokoto();
     String[] list = mkacgclass.hitokoto();
     bg_text.Text = "";
     bg_text.Text = list[0] + "\n";
     bg_source.Content = list[1] + "\n";
     timer.Start();
 }