mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Profile editor - Finished most of the refactor except databindings
This commit is contained in:
1 parent
5b321b25c9
commit
d49b574bda
56 files changed
+866
-459
No files matched your search
+9
@@ -9,6 +9,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
{
|
||||
private readonly IDataBindingsVmFactory _dataBindingsVmFactory;
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
private int _selectedItemIndex;
|
||||
|
||||
public DataBindingsViewModel(IProfileEditorService profileEditorService, IDataBindingsVmFactory dataBindingsVmFactory)
|
||||
{
|
||||
@@ -19,6 +20,12 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
CreateDataBindingViewModels();
|
||||
}
|
||||
|
||||
public int SelectedItemIndex
|
||||
{
|
||||
get => _selectedItemIndex;
|
||||
set => SetAndNotify(ref _selectedItemIndex, value);
|
||||
}
|
||||
|
||||
private void CreateDataBindingViewModels()
|
||||
{
|
||||
Items.Clear();
|
||||
@@ -33,6 +40,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
// and creating the actual data bindings
|
||||
foreach (var registration in registrations)
|
||||
ActivateItem(_dataBindingsVmFactory.DataBindingViewModel(registration));
|
||||
|
||||
SelectedItemIndex = 0;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
|
||||
Reference in new issue
Block a user