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