Browse Source

Remove testing line

master
Burathar 5 years ago
parent
commit
77f93428be
  1. 97
      ChromaEffectsImporter/ColoreOutput.cs

97
ChromaEffectsImporter/ColoreOutput.cs

@ -1,50 +1,49 @@
using Colore; using Colore;
using Colore.Data; using Colore.Data;
using Colore.Effects.Keyboard; using Colore.Effects.Keyboard;
using System; using System;
using System.Threading; using System.Threading;
namespace ChromaEffectsImporter namespace ChromaEffectsImporter
{ {
internal class ColoreOutput internal class ColoreOutput
{ {
private IChroma chroma; private IChroma chroma;
private string ChromaEffectPath; private string ChromaEffectPath;
public ColoreOutput(string chromaEffectPath) public ColoreOutput(string chromaEffectPath)
{ {
ChromaEffectPath = chromaEffectPath; ChromaEffectPath = chromaEffectPath;
} }
public void Start() public void Start()
{ {
Setup(); Setup();
LoadChromaEffect(ChromaEffectPath); LoadChromaEffect(ChromaEffectPath);
Thread.Sleep(1000); Thread.Sleep(1000);
chroma.Keyboard.SetKeyAsync(Key.End, Color.Red, false); Loop();
Loop(); }
}
private void LoadChromaEffect(string path)
private void LoadChromaEffect(string path) {
{ ChromaEffectsReader reader = new ChromaEffectsReader();
ChromaEffectsReader reader = new ChromaEffectsReader(); EffectRegion[] regions = reader.ReadFirstStatic(path);
EffectRegion[] regions = reader.ReadFirstStatic(path); Array.ForEach(regions, x => x.Show(chroma));
Array.ForEach(regions, x => x.Show(chroma)); }
}
private async void Setup()
private async void Setup() {
{ chroma = await ColoreProvider.CreateNativeAsync();
chroma = await ColoreProvider.CreateNativeAsync(); }
}
private void Loop()
private void Loop() {
{ while (true)
while (true) {
{ Thread.Sleep(100);
Thread.Sleep(100); }
} chroma.UninitializeAsync();
chroma.UninitializeAsync(); }
} }
}
} }
Loading…
Cancel
Save