Added the views and VM's I'm planning to use

This commit is contained in:
SpoinkyNL committed 2019-11-17 23:17:23 +01:00
1 parent 1b40b7f52d
commit 36f3ec3071
26 files changed
+372 -43

No files matched your search

@@ -76,7 +76,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor
{
// Gotta call IsInitializing on the UI thread or its never gets picked up
IsInitializing = true;
Devices.Add(profileDeviceViewModel);
lock (Devices)
{
Devices.Add(profileDeviceViewModel);
}
});
}
// Update existing devices
@@ -87,8 +90,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor
// Sort the devices by ZIndex
Execute.OnUIThread(() =>
{
foreach (var device in Devices.OrderBy(d => d.ZIndex).ToList())
Devices.Move(Devices.IndexOf(device), device.ZIndex - 1);
lock (Devices)
{
foreach (var device in Devices.OrderBy(d => d.ZIndex).ToList())
Devices.Move(Devices.IndexOf(device), device.ZIndex - 1);
}
});
}