mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profile editor - Finished most of the refactor except databindings
This commit is contained in:
1 parent
7fff1a593f
commit
fea454ad12
56 files changed
+866
-459
No files matched your search
@@ -26,10 +26,5 @@ namespace Artemis.Core
|
||||
/// Returns a list off all data binding registrations
|
||||
/// </summary>
|
||||
List<IDataBindingRegistration> GetAllDataBindingRegistrations();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the property is hidden in the UI
|
||||
/// </summary>
|
||||
bool IsHidden { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,9 @@ namespace Artemis.Core
|
||||
|
||||
private bool _isHidden;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Gets or sets whether the property is hidden in the UI
|
||||
/// </summary>
|
||||
public bool IsHidden
|
||||
{
|
||||
get => _isHidden;
|
||||
@@ -318,13 +320,13 @@ namespace Artemis.Core
|
||||
/// </summary>
|
||||
public bool DataBindingsSupported { get; protected internal set; } = true;
|
||||
|
||||
public DataBindingRegistration<T, TProperty> GetDataBindingRegistration<TProperty>(string propertyName)
|
||||
public DataBindingRegistration<T, TProperty> GetDataBindingRegistration<TProperty>(string expression)
|
||||
{
|
||||
if (_disposed)
|
||||
throw new ObjectDisposedException("LayerProperty");
|
||||
|
||||
var match = _dataBindingRegistrations.FirstOrDefault(r => r is DataBindingRegistration<T, TProperty> registration &&
|
||||
registration.Property.Name == propertyName);
|
||||
registration.PropertyExpression.ToString() == expression);
|
||||
return (DataBindingRegistration<T, TProperty>) match;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user