看到最近直播平台PK软件很火 就写了一个 代码如下NET写的.有兴趣自己下载研究
private void Add()
{
//左右
if (zhubo.Text == fubo.Text)
{
zjlb.Text = zhubotb.Text + " 和 " + fubotb.Text + " 打平";
}
else
{
string lwname = zhubotb.Text + " 多 " + fubotb.Text;
if (Int32.Parse(zhubo.Text) - Int32.Parse(fubo.Text) <0)
{
lwname = fubotb.Text + " 多 " + zhubotb.Text;
}
zjlb.Text = lwname + (Int32.Parse(zhubo.Text) - Int32.Parse(fubo.Text)).ToString().Replace("-", "");
}
//左中
if (zhubo.Text == zhongjian.Text)
{
zblb.Text = zhubotb.Text + " 和 " + zhongjiantb.Text + " 打平";
}
else
{
string lwname = zhubotb.Text + " 多 " + zhongjiantb.Text;
if (Int32.Parse(zhubo.Text) - Int32.Parse(zhongjian.Text) < 0)
{
lwname = zhongjiantb.Text + " 多 " + zhubotb.Text;
}
zblb.Text = lwname + (Int32.Parse(zhubo.Text) - Int32.Parse(zhongjian.Text)).ToString().Replace("-", "");
}
//右中
if (fubo.Text == zhongjian.Text)
{
yblb.Text = fubotb.Text + " 和 " + zhongjiantb.Text + " 打平";
}
else
{
string lwname = fubotb.Text + " 多 " + zhongjiantb.Text;
if (Int32.Parse(fubo.Text) - Int32.Parse(zhongjian.Text) < 0)
{
lwname = zhongjiantb.Text + " 多 " + fubotb.Text;
}
yblb.Text = lwname + (Int32.Parse(fubo.Text) - Int32.Parse(zhongjian.Text)).ToString().Replace("-", "");
}
}
private void AddFB(object sender, EventArgs e)
{
try
{
if (sender.GetType().ToString() == "System.Windows.Forms.Button")
{
Button bt = (Button)sender;
if (bt.Text == "+")
{
fubo.Text = (Int32.Parse(fubo.Text) + int.Parse(fbtb.Text)).ToString();
}
else if (bt.Text == "-")
{
fubo.Text = (Int32.Parse(fubo.Text) - int.Parse(fbtb.Text)).ToString();
}
else
{
fubo.Text = (Int32.Parse(fubo.Text) + int.Parse(bt.Text)).ToString();
}
}
Add();
}
catch
{
if (string.IsNullOrEmpty(fubo.Text))
{
fubo.Text = "0";
}
}
}
private void AddZB(object sender, EventArgs e)
{
try
{
if (sender.GetType().ToString() == "System.Windows.Forms.Button")
{
Button bt = (Button)sender;
if (bt.Text == "+")
{
zhubo.Text = (Int32.Parse(zhubo.Text) + int.Parse(zbtb.Text)).ToString();
}
else if (bt.Text == "-")
{
zhubo.Text = (Int32.Parse(zhubo.Text) - int.Parse(zbtb.Text)).ToString();
}
else
{
zhubo.Text = (Int32.Parse(zhubo.Text) + int.Parse(bt.Text)).ToString();
}
}
Add();
}
catch
{
if (string.IsNullOrEmpty(zhubo.Text))
{
zhubo.Text = "0";
}
}
}
//快手自动计票器 抖音火山礼物计数器 陌陌直播游戏软件 女团PK计分器 半半自动计票器
private void AddZJ(object sender, EventArgs e)
{
try
{
if (sender.GetType().ToString() == "System.Windows.Forms.Button")
{
Button bt = (Button)sender;
if (bt.Text == "+")
{
zhongjian.Text = (Int32.Parse(zhongjian.Text) + int.Parse(zjtb.Text)).ToString();
}
else if (bt.Text == "-")
{
zhongjian.Text = (Int32.Parse(zhongjian.Text) - int.Parse(zjtb.Text)).ToString();
}
else
{
zhongjian.Text = (Int32.Parse(zhongjian.Text) + int.Parse(bt.Text)).ToString();
}
}
Add();
}
catch
{
if (string.IsNullOrEmpty(zhongjian.Text))
{
zhongjian.Text = "0";
}
}
}
做好以后界面如下.多重模式