Profiles - Reworked profile system

Sidebar - Redesigned sidebar with customizable categories
Profiles - Added the ability to configure custom profile icons
Profiles - Added the ability to activate multiple profiles for modules at once
Profiles - Added the ability to create profiles for no modules
Profiles - Added the ability to suspend a profile or an entire category
Profiles - Added profile activation conditions
Profiles - Added file-based importing/exporting
Profile editor - Condensed UI, removed tabs 
Profile editor - Disable condition operators until a left-side is picked
This commit is contained in:
Robert Beekman authored and GitHub committed 2021-06-03 22:34:43 +02:00
1 parent 4152c290d2
commit ceeaa4bf6d
164 files changed
+5019 -4220

No files matched your search

@@ -178,8 +178,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
{
Update();
Layer.RenderPropertiesUpdated += LayerOnRenderPropertiesUpdated;
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
_profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementSaved += OnSelectedProfileElementSaved;
_profileEditorService.ProfilePreviewUpdated += ProfileEditorServiceOnProfilePreviewUpdated;
_panZoomViewModel.PropertyChanged += PanZoomViewModelOnPropertyChanged;
base.OnInitialActivate();
@@ -189,8 +189,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
protected override void OnClose()
{
Layer.RenderPropertiesUpdated -= LayerOnRenderPropertiesUpdated;
_profileEditorService.ProfileElementSelected -= OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
_profileEditorService.SelectedProfileElementChanged -= OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementSaved -= OnSelectedProfileElementSaved;
_profileEditorService.ProfilePreviewUpdated -= ProfileEditorServiceOnProfilePreviewUpdated;
_panZoomViewModel.PropertyChanged -= PanZoomViewModelOnPropertyChanged;
base.OnClose();
@@ -205,12 +205,12 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
Update();
}
private void OnProfileElementSelected(object sender, EventArgs e)
private void OnSelectedProfileElementChanged(object sender, EventArgs e)
{
IsSelected = _profileEditorService.SelectedProfileElement == Layer;
}
private void OnSelectedProfileElementUpdated(object sender, EventArgs e)
private void OnSelectedProfileElementSaved(object sender, EventArgs e)
{
Update();
}
@@ -153,9 +153,9 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
FocusSelectedLayer.SettingChanged += HighlightSelectedLayerOnSettingChanged;
_rgbService.DeviceAdded += RgbServiceOnDevicesModified;
_rgbService.DeviceRemoved += RgbServiceOnDevicesModified;
_profileEditorService.ProfileSelected += OnProfileSelected;
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
_profileEditorService.SelectedProfileChanged += OnSelectedProfileChanged;
_profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementSaved += OnSelectedProfileElementSaved;
base.OnInitialActivate();
}
@@ -166,9 +166,9 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
FocusSelectedLayer.SettingChanged -= HighlightSelectedLayerOnSettingChanged;
_rgbService.DeviceAdded -= RgbServiceOnDevicesModified;
_rgbService.DeviceRemoved -= RgbServiceOnDevicesModified;
_profileEditorService.ProfileSelected -= OnProfileSelected;
_profileEditorService.ProfileElementSelected -= OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
_profileEditorService.SelectedProfileChanged -= OnSelectedProfileChanged;
_profileEditorService.SelectedProfileElementChanged -= OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementSaved -= OnSelectedProfileElementSaved;
if (_previousSelectedLayer != null)
_previousSelectedLayer.LayerBrushUpdated -= SelectedLayerOnLayerBrushUpdated;
@@ -330,12 +330,12 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
UpdateLedsDimStatus();
}
private void OnProfileSelected(object sender, EventArgs e)
private void OnSelectedProfileChanged(object sender, EventArgs e)
{
ApplyActiveProfile();
}
private void OnProfileElementSelected(object sender, EventArgs e)
private void OnSelectedProfileElementChanged(object sender, EventArgs e)
{
if (_previousSelectedLayer != null)
{
@@ -370,7 +370,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
ActivateToolByIndex(1);
}
private void OnSelectedProfileElementUpdated(object sender, EventArgs e)
private void OnSelectedProfileElementSaved(object sender, EventArgs e)
{
ApplyActiveProfile();
UpdateLedsDimStatus();
@@ -75,9 +75,9 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
/// <inheritdoc />
protected override void OnInitialActivate()
{
ProfileEditorService.ProfileSelected += UpdateEventHandler;
ProfileEditorService.ProfileElementSelected += UpdateEventHandler;
ProfileEditorService.SelectedProfileElementUpdated += UpdateEventHandler;
ProfileEditorService.SelectedProfileChanged += UpdateEventHandler;
ProfileEditorService.SelectedProfileElementChanged += UpdateEventHandler;
ProfileEditorService.SelectedProfileElementSaved += UpdateEventHandler;
ProfileEditorService.ProfilePreviewUpdated += UpdateEventHandler;
Update();
@@ -92,9 +92,9 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
/// <inheritdoc />
protected override void OnClose()
{
ProfileEditorService.ProfileSelected -= UpdateEventHandler;
ProfileEditorService.ProfileElementSelected -= UpdateEventHandler;
ProfileEditorService.SelectedProfileElementUpdated -= UpdateEventHandler;
ProfileEditorService.SelectedProfileChanged -= UpdateEventHandler;
ProfileEditorService.SelectedProfileElementChanged -= UpdateEventHandler;
ProfileEditorService.SelectedProfileElementSaved -= UpdateEventHandler;
ProfileEditorService.ProfilePreviewUpdated -= UpdateEventHandler;
base.OnClose();
}
@@ -117,7 +117,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
public void RotateMouseUp(object sender, ShapeControlEventArgs e)
{
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
_rotating = false;
}
@@ -173,7 +173,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
public void ResizeMouseUp(object sender, ShapeControlEventArgs e)
{
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
_isResizing = false;
}
@@ -329,7 +329,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
public void MoveMouseUp(object sender, ShapeControlEventArgs e)
{
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
_movingShape = false;
_movingAnchor = false;
}
@@ -45,7 +45,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
layer.ClearLeds();
layer.AddLeds(remainingLeds);
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
}
}
@@ -55,7 +55,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
layer.AddLeds(selectedLeds);
}
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
}
// If no layer selected, apply it to a new layer in the selected folder
else if (ProfileEditorService.SelectedProfileElement is Folder folder)
@@ -94,7 +94,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
newLayer.AddLeds(selectedLeds);
ProfileEditorService.ChangeSelectedProfileElement(newLayer);
ProfileEditorService.UpdateSelectedProfileElement();
ProfileEditorService.SaveSelectedProfileElement();
}
}
}