public static bool ShowStartWindow(CompetitionController aController) { CompetitionParamsPanel panel = aController.GetParametersPanel(); fStartCompetition form = new fStartCompetition(); form.AppendPanel(panel); bool result = form.ShowDialog() == DialogResult.OK; return(result); }
private void CreatePanels() { FCompetitionController = CompetitionControllers.CompetitionControllers.GetController(FCompetition); pnlCompetition = FCompetitionController.GetControl(); pnlCompetition.OnAfterMatchEdit += new EventHandler(OnAfterMatchEdit); if (pnlCompetition is SwissPanel) { (pnlCompetition as SwissPanel).OnNextRoundClick += new EventHandler(OnNextRound); } pnlCompetitionParams = FCompetitionController.GetParametersPanel(); if (pnlCompetitionParams != null) { pnlCompetitionParams.ReadOnly = true; } }
internal void AppendPanel(CompetitionParamsPanel panel) { // Размещаем панель дополнительных параметров if (panel != null) { ParamsPanel = panel; Controls.Add(panel); panel.Location = new Point(label1.Left, label1.Top + label1.Height); panel.Size = new Size(label1.Width, panel.MinHeight); //panel.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; Height = Height - btnOk.Top + panel.Top + panel.Height + 16; } else { Height = Height - btnOk.Top + label1.Top + label1.Height + 16; } }