private void SetupDataAnimations() { if (this.AnimationsSetup || this.Client.ClientData == null) { return; } var client = this.Client; var data = client.ClientData; this.heightString = $"Height: {data.Height}"; this.shoeString = $"Shoe size: {data.ShoeSize}"; this.overlayAnimation = new ColorAnimation(Color.White, client.Color, TimeSpan.FromSeconds(1.5)); float alpha = 0.7f; this.nameOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.namePositionAnimation = new Vector2Animation(new Vector2(0, -30), new Vector2(50, -30), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.nameStringAnimation = new StringAnimation("", data.Name, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.surnameOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.surnamePositionAnimation = new Vector2Animation(new Vector2(0, -5), new Vector2(50, -5), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.surnameStringAnimation = new StringAnimation("", data.Surname, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.emailOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.emailPositionAnimation = new Vector2Animation(new Vector2(0, 20), new Vector2(50, 20), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.emailStringAnimation = new StringAnimation("", data.Email, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.heightOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.heightPositionAnimation = new Vector2Animation(new Vector2(-40, 0), new Vector2(-40, 120), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.heightStringAnimation = new StringAnimation("", heightString, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.shoeSizeOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); this.shoeSizePositionAnimation = new Vector2Animation(new Vector2(-40, 100), new Vector2(-40, 150), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); this.shoeSizeStringAnimation = new StringAnimation("", shoeString, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); }
private void SetupDataAnimations() { if (this.AnimationsSetup || this.Client.ClientData == null) return; var client = this.Client; var data = client.ClientData; this.heightString = $"Height: {data.Height}"; this.shoeString = $"Shoe size: {data.ShoeSize}"; this.overlayAnimation = new ColorAnimation(Color.White, client.Color, TimeSpan.FromSeconds(1.5)); float alpha = 0.7f; this.nameOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.namePositionAnimation = new Vector2Animation(new Vector2(0, -30), new Vector2(50, -30), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.nameStringAnimation = new StringAnimation("", data.Name, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(2)); this.surnameOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.surnamePositionAnimation = new Vector2Animation(new Vector2(0, -5), new Vector2(50, -5), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.surnameStringAnimation = new StringAnimation("", data.Surname, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(3)); this.emailOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.emailPositionAnimation = new Vector2Animation(new Vector2(0, 20), new Vector2(50, 20), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.emailStringAnimation = new StringAnimation("", data.Email, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(4)); this.heightOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.heightPositionAnimation = new Vector2Animation(new Vector2(-40, 0), new Vector2(-40, 120), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.heightStringAnimation = new StringAnimation("", heightString, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(5)); this.shoeSizeOpacityAnimation = new FloatAnimation(0.0f, alpha, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); this.shoeSizePositionAnimation = new Vector2Animation(new Vector2(-40, 100), new Vector2(-40, 150), TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); this.shoeSizeStringAnimation = new StringAnimation("", shoeString, TimeSpan.FromSeconds(1.5), TimeSpan.FromSeconds(6)); }