|
|
|
|
@ -91,7 +91,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
{ |
|
|
|
|
_currentIndex = value; |
|
|
|
|
OnPropertyChanged(nameof(CurrentIndex)); |
|
|
|
|
UpdateCurrentImage(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -241,6 +241,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
return -100; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Diamond diamond = new Diamond(); |
|
|
|
|
string circleSql = $"SELECT VALUE FROM CUTTER_CONFIG WHERE KEY = 'half_circle'"; |
|
|
|
|
DataTable circleTable = DataBaseHelper.ExecuteQuery(circleSql); |
|
|
|
|
@ -556,7 +557,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
string? savePath = ConfigurationManager.AppSettings["ImageFileBasePath"]; |
|
|
|
|
for (int i = 0; i < 100; i++) |
|
|
|
|
{ |
|
|
|
|
imagePaths.Add(Path.Combine(savePath, $"image_{i}.bmp")); |
|
|
|
|
imagePaths.Add($"image_{i}.bmp"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ImagePaths = imagePaths.ToArray(); |
|
|
|
|
@ -570,6 +571,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
{ |
|
|
|
|
ImagePaths = folderPath.ToArray(); |
|
|
|
|
CurrentIndex = 0; |
|
|
|
|
UpdateCurrentImage(); |
|
|
|
|
CurrentStatus = PlayStatus.Stopped; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -669,6 +671,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
for (CurrentIndex = 0; CurrentIndex < ImagePaths.Length; CurrentIndex++) |
|
|
|
|
{ |
|
|
|
|
if (_cts.Token.IsCancellationRequested) break; |
|
|
|
|
UpdateCurrentImage(); |
|
|
|
|
await Task.Delay(_playDelay); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -717,6 +720,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
PausePlayback(); |
|
|
|
|
|
|
|
|
|
CurrentIndex = (CurrentIndex - 1 + ImagePaths.Length) % ImagePaths.Length; |
|
|
|
|
UpdateCurrentImage(); |
|
|
|
|
} |
|
|
|
|
[Log] |
|
|
|
|
private void MoveNext() |
|
|
|
|
@ -725,6 +729,7 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
PausePlayback(); |
|
|
|
|
|
|
|
|
|
CurrentIndex = (CurrentIndex + 1) % ImagePaths.Length; |
|
|
|
|
UpdateCurrentImage(); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
} |
|
|
|
|
|