fix new live error, add live Lyrics ui

This commit is contained in:
CroakFang
2023-08-28 00:57:47 +08:00
parent 3cbe760b84
commit 070b005216
16 changed files with 698 additions and 198 deletions
+19 -3
View File
@@ -80,16 +80,21 @@ public class LiveEntry
public class PartEntry
{
public Dictionary<string, List<float>> PartSettings = new Dictionary<string, List<float>>();
public int SingerCount = 0;
public PartEntry(string data)
{
string[] lines = data.Split("\n"[0]);
string[] lines = data.Split('\n');
string[] names = lines[0].Split(',');
foreach (var name in names)
{
PartSettings[name] = new List<float>();
var temp = name;
temp.Replace("lleft", "left2");
temp.Replace("rright", "right2");
temp.Replace("llleft", "left3");
temp.Replace("rrright", "right3");
PartSettings[temp] = new List<float>();
}
for (int i = 1; i < lines.Length - 1; i++)
@@ -100,6 +105,17 @@ public class PartEntry
PartSettings[names[j]].Add((float)Convert.ToDouble(values[j]));
}
}
foreach(var part in PartSettings)
{
if (part.Key != "time" && !part.Key.Contains("_"))
{
if (part.Value.FindAll(v => v > 0).Count > 0)
{
SingerCount += 1;
}
}
}
}
}