コード例 #1
0
        private void SendMessage(int f)
        {
            if (remoteObj != null && txtChatHere.Text.Trim().Length > 0)
            {
                // remoteObj.SendMsgToSvr(yourName + " says: " + txtChatHere.Text);
                // txtChatHere.Text = "";
                switch (f)
                {
                case 1:
                    label2.Text = (remoteObj.minus(float.Parse(txtChatHere.Text), float.Parse(textBox1.Text))).ToString();
                    break;

                case 2:
                    label2.Text = (remoteObj.mul(float.Parse(txtChatHere.Text), float.Parse(textBox1.Text))).ToString();
                    break;

                case 3:
                    label2.Text = (remoteObj.plus(float.Parse(txtChatHere.Text), float.Parse(textBox1.Text))).ToString();
                    break;

                case 4:
                    label2.Text = (remoteObj.div(float.Parse(txtChatHere.Text), float.Parse(textBox1.Text))).ToString();
                    break;
                }
            }
        }