mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
UI - Use Timer instead of DispatcherTimer where feasible
This commit is contained in:
1 parent
4ffe8d8848
commit
fa710777d7
7 files changed
+42
-52
No files matched your search
@@ -34,7 +34,7 @@ public class DeviceVisualizer : Control
|
||||
/// <inheritdoc />
|
||||
public DeviceVisualizer()
|
||||
{
|
||||
_timer = new DispatcherTimer(DispatcherPriority.Render) {Interval = TimeSpan.FromMilliseconds(1000.0 / UpdateFrameRate)};
|
||||
_timer = new DispatcherTimer(DispatcherPriority.Background) {Interval = TimeSpan.FromMilliseconds(1000.0 / UpdateFrameRate)};
|
||||
_deviceVisualizerLeds = new List<DeviceVisualizerLed>();
|
||||
|
||||
PointerReleased += OnPointerReleased;
|
||||
|
||||
@@ -78,6 +78,6 @@ public class OpenFileDialogBuilder
|
||||
public async Task<string[]?> ShowAsync()
|
||||
{
|
||||
IReadOnlyList<IStorageFile> files = await _parent.StorageProvider.OpenFilePickerAsync(_options);
|
||||
return files.Select(f => f.Path.LocalPath).ToArray();
|
||||
return files.Count == 0 ? null : files.Select(f => f.Path.LocalPath).ToArray();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user