/*Handler
- DoWorkEventHandler
- RunWorkerCompletedEventHandler
*/
using System.ComponentModel

 

System.ComponentModel 네임스페이스

구성 요소와 컨트롤의 런타임 및 디자인 타임 동작을 구현하는 데 사용되는 클래스를 제공합니다. Provides classes that are used to implement the run-time and design-time behavior of components and controls. 이 네임스

docs.microsoft.com

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++;
    }
}

+ Recent posts