/*Handler
- DoWorkEventHandler
- RunWorkerCompletedEventHandler
*/
using System.ComponentModel
class TrisCls
{
int xpos,ypos;
BackgroundWorker sendWork;
public void running()
{
ConsoleKeyInfo keyinfo;
init();
while(true)
{
//add
}
}
void init()
{
xpos=ypos=0;
sendWorker = new BackgroundWorker();
sendWorker.DoWork += new DoWorkEventHandler(sendWorker_DoWork);
sendWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(sendWorker_RunWorkerCompleted);
}
void DoWorkEventHandler(object sender, DoWorkEventArgs e)
{
Console.WriteLine("DoWorkEventHandler>>" + xpos.ToString("0000") );
xpos++;
}
void sendWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
Console.WriteLine("sendWorker_RunWorkerCompleted>>" + ypos.ToString("0000") );
ypos++;
}
}
'c# 언어' 카테고리의 다른 글
C#은 C++의 컴퓨팅 파워와 비주얼 베이직의 편리함을 하나로 합치기 위해 마이크로소프트사(MS)에서 개발한 새로운 객체 지향 프로그래밍 언어입니다. (0) | 2021.12.17 |
---|---|
ElapsedEventHandler 대리자 (0) | 2021.12.15 |
TrisPackage.Tris/exchange_check(); (0) | 2021.12.09 |
TrisPackage.Tris/draw();____draw(); (0) | 2021.11.19 |
TrisPackage.Tris/running(); (0) | 2021.11.19 |