public DVDScreenSaver() { InitializeComponent(); Logo = new MovingLogo( LogoLoader.GetLogo(), new Color[] { Color.FromArgb(190, 0, 255), Color.FromArgb(255, 0, 139), Color.FromArgb(255, 131, 0), Color.FromArgb(0, 38, 255), Color.FromArgb(255, 250, 0) } ); LogoBox.Image = Logo.Image; Logo.OnNewPosition += (MovingLogo logo) => { ref var rect = ref logo.Rect; LogoBox.SetBounds((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height); };
public void NextColor() { LogoLoader.RecolorLogo(Image, Colors[_colorIdx = ++_colorIdx % Colors.Length]); OnRedraw(this); }