• 排球积分


    程序设计观众界面

    代码如下:

    public partial class 观众 : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void A_TextChanged(object sender, EventArgs e)
    {
    Asheng.Text = A.Text + "胜";
    }

    protected void B_TextChanged(object sender, EventArgs e)
    {
    Bsheng.Text = B.Text + "胜";
    }

    protected void Asheng_Click(object sender, EventArgs e)
    {
    if (Asheng.Text == null || Asheng.Text == null)
    {
    Console.Write("请先输入国家:");
    }
    if (TextBox1.Text == "" && Asheng.Text != "")
    {
    if (int.Parse(Ayi.Text) < 25)
    {
    int a = int.Parse(Ayi.Text);
    a++;
    Ayi.Text = a.ToString();
    int c = int.Parse(Byi.Text);
    if (a == 25 && a - 1 > c)
    {
    Console.Write("第一局" + Asheng.Text);
    TextBox1.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();
    }
    }
    else
    {
    int a = int.Parse(Ayi.Text);
    a++;
    Ayi.Text = a.ToString();
    int c = int.Parse(Byi.Text);
    if (a - 1 > c)
    {
    Console.Write("第一局" + Asheng.Text);
    TextBox1.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();
    }
    }
    }
    else if (Aer.Text == "" && A.Text != "")
    {
    if (int.Parse(Ayi.Text) < 25)
    {
    int a = int.Parse(Ayi.Text);
    a++;
    Ayi.Text = a.ToString();
    int c = int.Parse(Ber.Text);
    if (a == 25 && a - 1 > c)
    {
    Console.Write("第二局" + Asheng.Text);
    TextBox2.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();

    }
    }
    else
    {
    int a = int.Parse(Aer.Text);
    a++;
    Aer.Text = a.ToString();
    int c = int.Parse(Ber.Text);
    if (a - 1 > c)
    {
    Console.Write("第二局" + Asheng.Text);
    TextBox2.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();

    }
    }
    }
    else if (TextBox3.Text == "" && A.Text != "")
    {

    int fen = 25;

    if (int.Parse(Asan.Text) < fen)
    {
    int a = int.Parse(Asan.Text);
    a++;
    Asan.Text = a.ToString();
    int c = int.Parse(Bsan.Text);
    if (a == fen && a - 1 > c)
    {
    Console.Write("第三局" + Asheng.Text);
    TextBox3.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();
    }


    }
    else
    {
    int a = int.Parse(Asan.Text);
    a++;
    Asan.Text = a.ToString();
    int c = int.Parse(Bsan.Text);
    if (a - 1 > c)
    {
    Console.Write("第三局" + Asheng.Text);
    TextBox3.Text = Asheng.Text;
    int b = int.Parse(Aying.Text);
    b++;
    Aying.Text = b.ToString();
    }

    }
    }
    else if (TextBox4.Text == "" && A.Text != "")
    {
    int fen = 25;
    if (int.Parse(Aying.Text) == 3)
    {
    Console.Write(Asheng.Text);
    return;
    }
    else if (int.Parse(Bying.Text) == 3)
    {
    Console.Write(Bsheng.Text);
    return;
    }
    else if (int.Parse(Aying.Text) == 2 || int.Parse(Bying.Text) == 2)
    {
    //决胜场
    fen = 25;
    }

    if (int.Parse(Bsi.Text) <fen)
    {
    int a = int.Parse(Bsi.Text);
    a++;

    Bsi.Text = a.ToString();
    //如果分数达到25则显示第一局某国家胜
    int c = int.Parse(Asi.Text);
    if (a == fen && a - 1 > c)
    {
    Console.Write("第四局" + Bsheng.Text);
    TextBox4.Text =Bsheng.Text;
    int b = int.Parse(Bying.Text);
    b++;
    Bying.Text = b.ToString();
    }

    }
    else
    {
    int a = int.Parse(Bsi.Text);
    a++;
    Bsi.Text = a.ToString();
    int c = int.Parse(Ayi.Text);
    if (a - 1 > c)
    {
    Console.Write("第四局" + Bsheng.Text);
    TextBox4.Text =Bsheng.Text;
    int b = int.Parse(Bying.Text);
    b++;
    Bying.Text = b.ToString();
    }
    }
    }
    else if (B.Text != "")
    {
    int fen = 25;
    if (int.Parse(Aying.Text) == 3)
    {
    Console.Write(Asheng.Text);
    return;
    }
    else if (int.Parse(Bying.Text) == 3)
    {
    Console.Write(Bsheng.Text);
    return;
    }
    else if (int.Parse(Aying.Text) == 2 || int.Parse(Bying.Text) == 2)
    {
    //决胜场
    fen = 15;
    }
    if (int.Parse(Bwu.Text) < fen )
    {
    int a = int.Parse(Bwu.Text);
    a++;

    Bwu.Text = a.ToString();
    //如果分数达到25则显示第一局某国家胜
    int c = int.Parse(Awu.Text);
    if (a == fen && a - 1 > c)
    {
    Console.Write("第五局" +Bsheng.Text);
    TextBox5.Text =Bsheng.Text;
    int b = int.Parse(Bying.Text);
    b++;
    Bying.Text = b.ToString();
    }
    }
    else
    {
    int a = int.Parse(Bwu.Text);
    a++;
    Bwu.Text = a.ToString();
    int c = int.Parse(Awu.Text);
    if (a - 1 > c)
    {
    Console.Write("第五局" + Bsheng.Text);
    TextBox5.Text = Bsheng.Text;
    int b = int.Parse(Bying.Text);
    b++;
    Bying.Text = b.ToString();
    }
    }

  • 相关阅读:
    Beginning ARC in iOS 5 Tutorial Part 1【转】
    移除所有子 View 时不使用循环代码的一种方式
    FrankCucumber Core Frank Steps
    iPhone开发重构:从硬编码到模型到规律【转】
    iPhone开发重构:提取类以构成模板模式 【转】
    FrankCucumber Instance Method Summary
    iOS自动化测试(原创)
    FrankCucumber Step Definition compendium (转载)
    iPhone开发重构:提供辅助创建方法以简化实例创建【转】
    App Store 审核指南[转]
  • 原文地址:https://www.cnblogs.com/15039000635wyx/p/6194962.html
Copyright © 2020-2023  润新知