-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFml.cs
48 lines (42 loc) · 1.2 KB
/
Fml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Threading;
namespace XmasBusylight
{
class Fml
{
//Variables
Busylight.SDK controller;
public Fml()
{
//Initialize controller
controller = new Busylight.SDK();
}
~Fml()
{
//Stahp it, pls
stahp();
}
public void annoy()
{
//Kill me please
Random rnd = new Random();
do
{
//Get random colors and sound
int random_r = rnd.Next(1, 255);
int random_g = rnd.Next(1, 255);
int random_b = rnd.Next(1, 255);
//Annoy user
Console.WriteLine("Setting color to RGB {0}/{1}/{2}", random_r, random_g, random_b);
controller.Alert(new Busylight.BusylightColor { RedRgbValue = random_r, GreenRgbValue = random_g, BlueRgbValue = random_b }, Busylight.BusylightSoundClip.IM1, Busylight.BusylightVolume.Mute);
Thread.Sleep(1000);
}
while (true);
}
public void stahp()
{
//Terminate controller
controller.Terminate();
}
}
}