mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Flattened namespaces
Shared UI - Flattened namespaces Shared UI - General housekeeping Project - Code cleanup
This commit is contained in:
1 parent
aa06d8c43e
commit
29d4db55db
454 files changed
+1678
-1938
No files matched your search
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class DataBindingUIService : IDataBindingUIService
|
||||
internal class DataBindingUIService : IDataBindingUIService
|
||||
{
|
||||
public object GetDataBindingViewModel(Type propertyType)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Plugins;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Attributes;
|
||||
using Artemis.Core.Plugins.Exceptions;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.UI.Shared.DataModelVisualization;
|
||||
using Artemis.UI.Shared.DataModelVisualization.Shared;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.DataModelExpansions;
|
||||
using Artemis.Core.Services;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
|
||||
@@ -57,7 +53,7 @@ namespace Artemis.UI.Shared.Services
|
||||
viewModel.UpdateRequested += (sender, args) => viewModel.Update(this);
|
||||
return viewModel;
|
||||
}
|
||||
|
||||
|
||||
public bool GetPluginExtendsDataModel(Plugin plugin)
|
||||
{
|
||||
return _dataModelService.GetPluginExtendsDataModel(plugin);
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Artemis.Core.Plugins.DataModelExpansions;
|
||||
using Artemis.Core.DataModelExpansions;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.DataModelVisualization
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class ListDataModelWrapper : DataModel
|
||||
{
|
||||
public ListDataModelWrapper()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,12 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.UI.Shared.Screens.Dialogs;
|
||||
using Artemis.UI.Shared.Screens.Exceptions;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Dialog
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
internal class DialogService : IDialogService
|
||||
{
|
||||
@@ -24,7 +23,7 @@ namespace Artemis.UI.Shared.Services.Dialog
|
||||
_viewManager = viewManager;
|
||||
_windowManager = windowManager;
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> ShowConfirmDialog(string header, string text, string confirmText = "Confirm", string cancelText = "Cancel")
|
||||
{
|
||||
var arguments = new IParameter[]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Dialog
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public abstract class DialogViewModelBase : ValidatingModelBase
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Dialog
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class DialogViewModelHost : PropertyChangedBase
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Models.Profile.Colors;
|
||||
using Artemis.Core;
|
||||
using Artemis.UI.Shared.Screens.GradientEditor;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public interface IArtemisSharedUIService
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public interface IDataBindingUIService : IArtemisSharedUIService
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.Plugins;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Attributes;
|
||||
using Artemis.UI.Shared.DataModelVisualization;
|
||||
using Artemis.UI.Shared.DataModelVisualization.Shared;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.DataModelExpansions;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public interface IDataModelUIService : IArtemisSharedUIService
|
||||
{
|
||||
IReadOnlyCollection<DataModelVisualizationRegistration> RegisteredDataModelEditors { get; }
|
||||
IReadOnlyCollection<DataModelVisualizationRegistration> RegisteredDataModelDisplays { get; }
|
||||
DataModelPropertiesViewModel GetMainDataModelVisualization();
|
||||
DataModelPropertiesViewModel GetPluginDataModelVisualization(Plugin plugin);
|
||||
|
||||
@@ -26,7 +26,5 @@ namespace Artemis.UI.Shared.Services.Interfaces
|
||||
|
||||
DataModelDisplayViewModel GetDataModelDisplayViewModel(Type propertyType);
|
||||
DataModelInputViewModel GetDataModelInputViewModel(Type propertyType, DataModelPropertyAttribute description, object initialValue, Action<object, bool> updateCallback);
|
||||
IReadOnlyCollection<DataModelVisualizationRegistration> RegisteredDataModelEditors { get; }
|
||||
IReadOnlyCollection<DataModelVisualizationRegistration> RegisteredDataModelDisplays { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.UI.Shared.Services.Dialog;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Ninject.Parameters;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public interface IDialogService : IArtemisSharedUIService
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Models.Profile.Colors;
|
||||
using Artemis.Core;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public interface IGradientPickerService : IArtemisSharedUIService
|
||||
{
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerProperties;
|
||||
using Artemis.Core.Plugins;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
using Artemis.UI.Shared.Events;
|
||||
using Artemis.UI.Shared.PropertyInput;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Modules;
|
||||
using Ninject;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Interfaces
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public interface IProfileEditorService : IArtemisSharedUIService
|
||||
{
|
||||
@@ -50,7 +46,7 @@ namespace Artemis.UI.Shared.Services.Interfaces
|
||||
event EventHandler<RenderProfileElementEventArgs> SelectedProfileElementUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the currently selected data binding layer property is changed
|
||||
/// Occurs when the currently selected data binding layer property is changed
|
||||
/// </summary>
|
||||
event EventHandler SelectedDataBindingChanged;
|
||||
|
||||
@@ -92,5 +88,5 @@ namespace Artemis.UI.Shared.Services.Interfaces
|
||||
/// <param name="excludedKeyframe">A keyframe to exclude during keyframe snapping</param>
|
||||
/// <returns></returns>
|
||||
TimeSpan SnapToTimeline(TimeSpan time, TimeSpan tolerance, bool snapToSegments, bool snapToCurrentTime, bool snapToKeyframes, BaseLayerPropertyKeyframe excludedKeyframe = null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerProperties;
|
||||
using Artemis.Core.Plugins;
|
||||
using Artemis.Core.Plugins.Exceptions;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
using Artemis.UI.Shared.Events;
|
||||
using Artemis.UI.Shared.Exceptions;
|
||||
using Artemis.UI.Shared.PropertyInput;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.Core.Services;
|
||||
using Ninject;
|
||||
using Serilog;
|
||||
using Stylet;
|
||||
@@ -329,14 +322,14 @@ namespace Artemis.UI.Shared.Services
|
||||
ProfilePreviewUpdated?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void SelectedProfileOnDeactivated(object sender, EventArgs e)
|
||||
{
|
||||
Execute.PostToUIThread(() => ChangeSelectedProfile(null));
|
||||
}
|
||||
|
||||
protected virtual void OnSelectedDataBindingChanged()
|
||||
{
|
||||
SelectedDataBindingChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void SelectedProfileOnDeactivated(object sender, EventArgs e)
|
||||
{
|
||||
Execute.PostToUIThread(() => ChangeSelectedProfile(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user