diogotr7 / OpenRGB.NET

C# client for the OpenRGB SDK
MIT License
40 stars 16 forks source link

Store owning client in Device, Zone, add Update convenience method #17

Closed squeakyneb closed 2 years ago

squeakyneb commented 2 years ago

Allows for even more convenient patterns like

foreach (Zone z in singleZones)
{
    Color[] colors = new Color[] { Color.FromHsv(startTime / 36 + z.ID * 60, 1.0, 1.0) };
    z.Update(colors);
}

Possible lifetime problems... but I don't think so? I doubt anyone would have Zone objects living any longer than the Client anyway, and it will still disconnect when requested...