chore: 统一代码风格

This commit is contained in:
2026-05-28 19:23:28 +08:00
parent 87afe57bfa
commit 4ff375d132
13 changed files with 51 additions and 47 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ public class DurationFormatConverter : IValueConverter
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not double duration) return "--:--";
var ts = TimeSpan.FromSeconds(duration);
TimeSpan ts = TimeSpan.FromSeconds(duration);
if (ts.TotalHours >= 1)
return ts.ToString(@"h\:mm\:ss\.ff");
return ts.ToString(@"m\:ss\.ff");
@@ -40,7 +40,7 @@ public class ChannelsFormatConverter : IValueConverter
int ch when ch == 2 => "Stereo",
null => "--",
int ch => $"{ch}ch",
_ => "--"
_ => "--",
};
}
@@ -77,7 +77,7 @@ public class PositionFormatConverter : IValueConverter
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not double pos) return "0:00";
var ts = TimeSpan.FromSeconds(pos);
TimeSpan ts = TimeSpan.FromSeconds(pos);
return ts.ToString(@"m\:ss");
}