public HostDialog(GameInfo defaultGame) { InitializeComponent(); ZklBaseControl.Init(cbType); cbType.Items.Add(AutohostMode.GameChickens.Description()); cbType.Items.Add(AutohostMode.Teams.Description()); cbType.Items.Add(AutohostMode.Game1v1.Description()); cbType.Items.Add(AutohostMode.GameFFA.Description()); cbType.Items.Add(AutohostMode.None.Description()); cbType.SelectedIndex = 0; battleTitleBox.Text = Program.TasClient.UserName + "'s game"; if (Program.Conf.HasHosted) { try { battleTitleBox.Text = Program.Conf.HostBattle_Title; } catch (Exception e) { Trace.WriteLine("Error in restoring battle configuration: " + e); } } }
public StartMatchMakerDialog() { InitializeComponent(); ZklBaseControl.Init(flowLayoutPanel1); flowLayoutPanel1.BackColor = Color.Transparent; foreach (var qt in Program.TasClient.PossibleQueues) { var cb = new CheckBox(); cb.Text = qt.Name; Program.ToolTip.SetText(cb, qt.Description); cb.Checked = Program.Conf.LastMatchMakerQueues?.Contains(qt.Name) == true; ZklBaseControl.Init(cb); cb.Font = Config.GeneralFontBig; cb.Tag = qt; flowLayoutPanel1.Controls.Add(cb); } }