mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Meta - Code cleanup
This commit is contained in:
1 parent
18593853d8
commit
fd991112a9
105 files changed
+3097
-2624
No files matched your search
+16
-22
@@ -8,7 +8,6 @@ using Artemis.Core.Events;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerProperties;
|
||||
using Artemis.Core.Models.Profile.LayerProperties.Attributes;
|
||||
using Artemis.Core.Plugins.LayerBrush.Abstract;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
@@ -62,6 +61,21 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
public EffectsViewModel EffectsViewModel { get; set; }
|
||||
public TimelineViewModel TimelineViewModel { get; set; }
|
||||
|
||||
#region Effects
|
||||
|
||||
public void ToggleAddEffect()
|
||||
{
|
||||
if (DateTime.Now - _lastToggle < TimeSpan.FromMilliseconds(500))
|
||||
return;
|
||||
|
||||
_lastToggle = DateTime.Now;
|
||||
PropertyTreeIndex = PropertyTreeIndex == 0 ? 1 : 0;
|
||||
if (PropertyTreeIndex == 1)
|
||||
EffectsViewModel.PopulateDescriptors();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInitialActivate()
|
||||
{
|
||||
PopulateProperties(ProfileEditorService.SelectedProfileElement);
|
||||
@@ -115,10 +129,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
|
||||
private void PopulateProperties(ProfileElement profileElement)
|
||||
{
|
||||
if (SelectedFolder != null)
|
||||
{
|
||||
SelectedFolder = null;
|
||||
}
|
||||
if (SelectedFolder != null) SelectedFolder = null;
|
||||
|
||||
if (SelectedLayer != null)
|
||||
{
|
||||
@@ -133,9 +144,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
_brushPropertyGroup = null;
|
||||
|
||||
if (profileElement is Folder folder)
|
||||
{
|
||||
SelectedFolder = folder;
|
||||
}
|
||||
else if (profileElement is Layer layer)
|
||||
{
|
||||
SelectedLayer = layer;
|
||||
@@ -389,20 +398,5 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Effects
|
||||
|
||||
public void ToggleAddEffect()
|
||||
{
|
||||
if (DateTime.Now - _lastToggle < TimeSpan.FromMilliseconds(500))
|
||||
return;
|
||||
|
||||
_lastToggle = DateTime.Now;
|
||||
PropertyTreeIndex = PropertyTreeIndex == 0 ? 1 : 0;
|
||||
if (PropertyTreeIndex == 1)
|
||||
EffectsViewModel.PopulateDescriptors();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user