First in 202205060145

This commit is contained in:
Youmu_Liu_NLI
2022-05-06 01:45:42 +08:00
commit bd948f60d6
243 changed files with 583275 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Timers;
namespace THCCD_Demo
{
class Program
{
static void Main(string[] args)
{
System.Timers.Timer mainTimer = new System.Timers.Timer();
Say sentence = new Say();
mainTimer.Interval = 1000.0 / 60.0;
//Timer.interval属性是一个double类型参数,可以是小数,理论可以用于THCCD的游戏时钟。
Console.WriteLine(mainTimer.Interval);
mainTimer.Elapsed += sentence.say;
mainTimer.Start();
Console.ReadLine();
}
}
class Say
{
private int count;
public Say()
{
this.count = 0;
}
internal void say(object sender, ElapsedEventArgs e)
{
this.count++;
if (count <= 60)
{
Console.WriteLine("Long live TouHou!");
Console.WriteLine(DateTime.UtcNow.ToString());
}
}
}
}