public RankedDoublePlayer(LeftPlayer leftPlayer, RightPlayer rightPlayer, Values.StatType type, Form mainform) { InitializeComponent(); this.mainForm = mainform; this.leftPlayer = leftPlayer; this.rightPlayer = rightPlayer; this.type = type; this.pictureBoxLeft.SizeMode = PictureBoxSizeMode.Zoom; this.pictureBoxRight.SizeMode = PictureBoxSizeMode.Zoom; int xLeft = (panelLeft.Size.Width - this.labelPlayerNameLeft.Size.Width) / 2; this.labelPlayerNameLeft.Location = new Point(xLeft, this.labelPlayerNameLeft.Location.Y); int xRight = (panelRight.Size.Width - this.labelPlayerNameRight.Size.Width) / 2; this.labelPlayerNameRight.Location = new Point(xRight, this.labelPlayerNameRight.Location.Y); if (this.leftPlayer != null && this.rightPlayer != null) { if (type == Values.StatType.RankedFPP) { this.statsLeft = this.leftPlayer.CalculatedRankedFppStats; this.statsRight = this.rightPlayer.CalculatedRankedFppStats; } else if (type == Values.StatType.RankedTPP) { this.statsLeft = this.leftPlayer.CalculatedRankedTppStats; this.statsRight = this.rightPlayer.CalculatedRankedTppStats; } this.UpdateStatLabels(); this.DisplayComparisonArrows(); DoublePlayerMatchFiltering doubleFiltering = new DoublePlayerMatchFiltering(this.leftPlayer.Matches, this.leftPlayer.Name, this.rightPlayer.Matches, this.rightPlayer.Name, this.type, "competitive"); Tuple <List <GraphPlot>, List <GraphPlot> > tuple = doubleFiltering.GetList(); this.BuildChart(tuple.Item1, tuple.Item2); } }
public NormalDoublePlayer(LeftPlayer leftPlayer, RightPlayer rightPlayer, Values.StatType type, Form form) { InitializeComponent(); this.leftPlayerFraggerRatingGauge.From = 0; this.leftPlayerFraggerRatingGauge.To = 100; this.leftPlayerFraggerRatingGauge.Base.LabelsVisibility = Visibility.Hidden; this.leftPlayerFraggerRatingGauge.Base.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromRgb(242, 169, 0)); this.rightPlayerFraggerRatingGauge.From = 0; this.rightPlayerFraggerRatingGauge.To = 100; this.rightPlayerFraggerRatingGauge.Base.LabelsVisibility = Visibility.Hidden; this.rightPlayerFraggerRatingGauge.Base.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromRgb(242, 169, 0)); this.leftPlayerFraggerRatingGauge.Base.GaugeActiveFill = new LinearGradientBrush { GradientStops = new GradientStopCollection { new GradientStop(Colors.Yellow, 0), new GradientStop(Colors.Orange, .5), new GradientStop(Colors.Red, 1) } }; this.rightPlayerFraggerRatingGauge.Base.GaugeActiveFill = new LinearGradientBrush { GradientStops = new GradientStopCollection { new GradientStop(Colors.Yellow, 0), new GradientStop(Colors.Orange, .5), new GradientStop(Colors.Red, 1) } }; if (form != null) { this.mainForm = form; } if (leftPlayer != null && rightPlayer != null) { this.leftPlayer = leftPlayer; this.rightPlayer = rightPlayer; this.type = type; this.unrankedLeft = this.GetUnrankedObjectType(this.leftPlayer); this.unrankedRight = this.GetUnrankedObjectType(this.rightPlayer); this.UpdateStatLabels(); this.DisplayComparisonArrows(); DoublePlayerMatchFiltering doubleFiltering = new DoublePlayerMatchFiltering(this.leftPlayer.Matches, this.leftPlayer.Name, this.rightPlayer.Matches, this.rightPlayer.Name, this.type, "official"); Tuple <List <GraphPlot>, List <GraphPlot> > tuple = doubleFiltering.GetList(); this.BuildChart(tuple.Item1, tuple.Item2); } }