コード例 #1
0
        private void Listening_Click(object sender, RoutedEventArgs e)
        {
            // Start Server
            string IP = HostIP.Text;

            playerNum = int.Parse(gameNumBox.Text);
            Thread thread = new Thread(delegate()
            {
                doServer(IP, this.playerNum);
            });

            thread.Start();

            // Start Client
            ClientJoin cJoin = new ClientJoin();

            cJoin.Show();
            cJoin.textIP.Text   = IP;
            cJoin.textName.Text = this.gameID.Text;
            ButtonAutomationPeer peer       = new ButtonAutomationPeer(cJoin.btnConnect);
            IInvokeProvider      invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;

            invokeProv.Invoke();
            this.Close();
        }
コード例 #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ClientJoin ClientJoin = new ClientJoin();

            ClientJoin.Show();
            this.Close();
        }
コード例 #3
0
        public DataItem(string p_name, Player p)
        {
            Column1 = p_name;
            Column2 = p.handcard.Count.ToString();
            Dictionary <string, int> pDic = ClientJoin.CalculateCard(p.showedcardlist);

            Column3  = pDic["cocktail"].ToString();
            Column4  = pDic["rat"].ToString();
            Column5  = pDic["scorpion"].ToString();
            Column6  = pDic["fly"].ToString();
            Column7  = pDic["toad"].ToString();
            Column8  = pDic["spider"].ToString();
            Column9  = pDic["bat"].ToString();
            Column10 = pDic["bug"].ToString();
        }
コード例 #4
0
 public ClientPage(ClientJoin c1)
 {
     this.c = c1;
     InitializeComponent();
 }
コード例 #5
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     ClientJoin ClientJoin = new ClientJoin();
     ClientJoin.Show();
     this.Close();
 }
コード例 #6
0
 public ClientPage(ClientJoin c1)
 {
     this.c = c1;
     InitializeComponent();
 }
コード例 #7
0
        private void Listening_Click(object sender, RoutedEventArgs e)
        {
            // Start Server
            string IP = HostIP.Text;
            playerNum = int.Parse(gameNumBox.Text);
            Thread thread = new Thread(delegate()
            {
                doServer(IP, this.playerNum);
            });
            thread.Start();

            // Start Client
            ClientJoin cJoin = new ClientJoin();
            cJoin.Show();
            cJoin.textIP.Text = IP;
            cJoin.textName.Text = this.gameID.Text;
            ButtonAutomationPeer peer = new ButtonAutomationPeer(cJoin.btnConnect);
            IInvokeProvider invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
            invokeProv.Invoke();
            this.Close();
        }