public StatsPanel(MainForm parentForm, IStatistic Statistic, Competitor[] TabsToShow) : base(500, 650, Statistic.GetStatisticName(), parentForm, Properties.Resources.Statistics) { this.Statistic = Statistic; SetSortParameters(); InitialiseControls(TabsToShow); PositionControls(); AddControls(TabsToShow); this.TabsToShow = TabsToShow; SortTypeChanged += StatsPanel_SortTypeChanged; OrderTypeChanged += StatsPanel_SortOrderChanged; DisplayTypeChanged += TeamComparisonPanel_DisplayTypeChanged; CompetitorChanged += StatsPanel_CompetitorChanged; OpenedInNewForm += StatsPanel_OpenedInNewForm; PanelClosed += StatsPanel_PanelClosed; Statistic.Sort(OrderType, SortType); DisplayControls(Competitor); PopulateStatistics(); SetPanelProperties(DockTypes.TopLeft, AutosizeTypes.AutoHeight, FillStyles.FullHeight, this.Size); }