Exemplo n.º 1
0
        private async void minecraft_gamemode_Click(object sender, EventArgs e)
        {
            var chroma = await ColoreProvider.CreateNativeAsync();

            await chroma.SetAllAsync(ColoreColor.Black);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Green, ColoreKey.D1, ColoreKey.D2, ColoreKey.D3, ColoreKey.D4, ColoreKey.D5, ColoreKey.D6, ColoreKey.D7, ColoreKey.D8, ColoreKey.D9, ColoreKey.D0);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Green, ColoreKey.W, ColoreKey.A, ColoreKey.S, ColoreKey.D);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.FromRgb(0x964B00), ColoreKey.Q);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.FromRgb(0x964B00), ColoreKey.E);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Green, ColoreKey.LeftShift);
        }
Exemplo n.º 2
0
        private async void amogus_gamemode_Click(object sender, EventArgs e) // LOL
        {
            var chroma = await ColoreProvider.CreateNativeAsync();

            await chroma.SetAllAsync(ColoreColor.Black);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Green, ColoreKey.W, ColoreKey.A, ColoreKey.S, ColoreKey.D);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Red, ColoreKey.R, ColoreKey.Q);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.White, ColoreKey.Escape);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.Pink, ColoreKey.E);

            await chroma.Keyboard.SetKeysAsync(ColoreColor.FromRgb(0x964B00), ColoreKey.Tab);
        }
Exemplo n.º 3
0
        public static async void StartListener(ChannelReader <SpotifySongDTO> reader)
        {
            _ = Task.Run(async delegate
            {
                var chroma = await ColoreProvider.CreateNativeAsync();

                while (true)
                {
                    var x = await reader.ReadAsync();

                    var hex = ExtractColor(fetchImage(x.ImageUrl));

                    uint.TryParse(hex, System.Globalization.NumberStyles.HexNumber, null, out uint color);

                    await chroma.SetAllAsync(ColoreColor.FromRgb(color));
                }
            });