示例#1
0
 public ConfigForm()
 {
     InitializeComponent();
     network = new LibUDP();
     listener_exception_delegate = new ListenerExceptionDelegate(ShowExceptionMessage);
     textBox1.Text = "";
 }
示例#2
0
        public JankenForm(ShowConfigFormDelegate show_config, IPAddress address)
        {
            InitializeComponent();
            this.show_config = show_config;
            lbl_result.Text  = "";
            lbl_player1.Text = "";
            lbl_player2.Text = "";
            ResultDelegate result_delegate = new ResultDelegate(JankenResponse);

            this.bt     = new LibJanken(result_delegate);
            this.random = new Random(1000);

            network      = new LibUDP();
            peer_address = address;


            listener_result_delegate    = new ListenerResponseDelegate(ListenerResponse);
            listener_exception_delegate = new ListenerExceptionDelegate(ShowExceptionMessage);
            network.ListenMessage(GAME_PORT, listener_result_delegate, listener_exception_delegate);
        }