static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); BasicForm basicForm = new BasicForm(); ServerController svController = new ServerController(basicForm); basicForm.AddController(svController); Debug.Print("프린터 연결됨"); Application.Run(basicForm); }
internal ServerController(BasicForm view) : this() { this.view = view; /* Server Part */ view.button1.Click += new EventHandler(delegate(object sender, EventArgs e) { if (this.StartServer()) { Debug.Print("서버 온라인"); this.ChangeStatusMessage("서버 온라인"); } }); /* Client Part */ view.connectBtn.Click += new EventHandler(delegate(object sender, EventArgs e) { if (this.ConnecetServer()) { Debug.Print("서버 접속 요청"); } }); }