Skip to content

Commit

Permalink
fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
InuInu2022 committed Dec 10, 2022
1 parent 67a173f commit ef97a74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion KuchiPaku.Core/Models/Lab.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics;
using System;
using System.Linq;
using System.Collections.Generic;
Expand All @@ -16,10 +17,11 @@ public IEnumerable<LabLine>? Lines
public Lab(string labData, int fps = 30)
{
lines = labData
.Split(new string[]{Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
.Split(new string[]{"\r\n","\n","\r"}, StringSplitOptions.RemoveEmptyEntries)
.Where(s => !string.IsNullOrEmpty(s)) //空行無視
.Select((v, i) =>
{
Debug.WriteLine($"line: {v}");
var a = v.Split(new string[]{" "},StringSplitOptions.RemoveEmptyEntries);
return new LabLine(
Convert.ToDouble(a[0]),
Expand Down

0 comments on commit ef97a74

Please sign in to comment.