BackEnd/C#
C# 관련 자료 모음
Sky_Developer
2024. 7. 29. 13:42
몇 분마다 메소드 재 실행하는 방법
private void OO_Load(object sender, EventArgs e)
{
...
timer1.Interval = 60000 * 5; // 5분 간격으로 timer1_Tick 수행
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (this.ContainsFocus)
{
your_method(null, null);
}
else
{
return;
}
}
위 경우 timer1 의 선언 형식은 System.Windows.Forms.Timer 이다
xml Document 사용하기
번외) js에서 xml 불러쓰기