/// <summary> /// Event called on record instance change. /// </summary> private void OnRecordChanged(IRecord record) { scoreLabel.Text = (record?.Score ?? 0).ToString("N0"); comboLabel.Text = $"x{(record?.MaxCombo ?? 0).ToString("N0")}"; nameLabel.Text = record?.Username ?? ""; dateLabel.Text = record?.Date.ToString("yyyy-MM-dd HH:mm:ss") ?? ""; avatarDisplay.SetSource(record?.AvatarUrl); }
/// <summary> /// Event called when the user has changed. /// </summary> private void OnUserChange(IUser user) => avatarDisplay.SetSource(user);
/// <summary> /// Sets the display for specified user profile. /// </summary> private void SetUserProfile(IUser user) { nicknameLabel.Text = user.Username; avatarDisplay.SetSource(user); }