在GUI中布置比赛 [英] Laying out a tournament in the GUI

查看:82
本文介绍了在GUI中布置比赛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我正在创建一个简单的应用程序,该应用程序将用于保留有关小型游戏锦标赛的信息.
我有一个播放器类,具有三个属性.名称,种族和编号.然后,我将播放器添加到列表框中.
然后,我从组合框中选择了锦标赛类型;单淘汰,双淘汰,每个人都扮演所有人.

现在解决问题:)
首先,我要消除单打.如果您不知道这种锦标赛的情况,则为以下结构: ^ ].当我按下创建"按钮时,我希望它以类似于该Wiki页面上的方式布置所有播放器.我不确定该怎么做.我曾考虑过为每个玩家创建标签,然后使用一些简单的数学方法对其进行布局,但我想在每个玩家旁边都有一个文本框,以便记录获胜和失败.
我对如何做到这一点一无所知.

有人有主意吗?
非常感谢任何帮助.

Hi.
I am creating a simple application that will be used to keep information about small gaming tournaments.
I have a Player class that has three prperties; name,race and id. Then I add players to a listbox.
Then I chose a tournament type from a combobox; Single-elimination, Double-elimination and Everyone playes everyone.

Now for the problem :)
First of all I want to get the single-elimination up. If you don''t know how that kind of a tournament is then here is the structure: http://en.wikipedia.org/wiki/Single-elimination_tournament[^]. When I press the button "Create", I want it to layout all the players in a manner like on that wiki page. I''m not sure how I would go about doing that. I thought about creating a label for each player and then laying it out using some simple math but I want to have a textbox next to each player so I can record the wins and losses.
I am kinda clueless on how I can do this.

Does someone have an idea?
Any help greatly appreciated.

推荐答案

我想您正在寻找类似 ^ ]

最好的问候
Espen Harlinn
I guess you are looking for something like the DataGridView Control[^]

Best regards
Espen Harlinn


同意Espen.另外 TableLayoutPanel [ FlowLayoutPanel [ ^ ]是正确的选择(如DataGridView),但您需要根据需要编写大量代码.
Agree with Espen. Also TableLayoutPanel[^] & FlowLayoutPanel[^] are right choices(Like DataGridView) but you need to write lot of code for your requirement.


这篇关于在GUI中布置比赛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆