Ejemplo n.º 1
0
            private void matchChanged(ValueChangedEvent <TournamentMatch> match)
            {
                currentTeamScore.UnbindBindings();
                currentTeamScore.BindTo(teamColour == TeamColour.Red ? match.NewValue.Team1Score : match.NewValue.Team2Score);

                currentTeam.UnbindBindings();
                currentTeam.BindTo(teamColour == TeamColour.Red ? match.NewValue.Team1 : match.NewValue.Team2);

                // team may change to same team, which means score is not in a good state.
                // thus we handle this manually.
                teamChanged(currentTeam.Value);
            }
Ejemplo n.º 2
0
        protected override void CurrentMatchChanged(ValueChangedEvent <TournamentMatch> match)
        {
            base.CurrentMatchChanged(match);

            currentCompleted.UnbindBindings();

            if (match.NewValue == null)
            {
                return;
            }

            currentCompleted.BindTo(match.NewValue.Completed);
            update();
        }
Ejemplo n.º 3
0
        private void updateBindings()
        {
            if (LoadState < LoadState.Ready)
            {
                return;
            }

            enabled.UnbindBindings();

            // Don't display ever if the ruleset is not using a draining health display.
            if (healthProcessor is DrainingHealthProcessor)
            {
                enabled.BindTo(configEnabled);
            }
            else
            {
                enabled.Value = false;
            }
        }
Ejemplo n.º 4
0
 public void SetStyle(HighlightStyle style)
 {
     Style.UnbindBindings();
     Style.Value = style;
 }