Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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("서버 접속 요청");
                }
            });
        }