mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Data bindings - Added copy/pasting of data binding
This commit is contained in:
parent
b3b7d6819d
commit
a0faeb21fd
@ -63,7 +63,10 @@ namespace Artemis.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Easings.Functions EasingFunction { get; set; }
|
public Easings.Functions EasingFunction { get; set; }
|
||||||
|
|
||||||
internal DataBindingEntity Entity { get; }
|
/// <summary>
|
||||||
|
/// Gets the data binding entity this data binding uses for persistent storage
|
||||||
|
/// </summary>
|
||||||
|
public DataBindingEntity Entity { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current value of the data binding
|
/// Gets the current value of the data binding
|
||||||
@ -100,6 +103,25 @@ namespace Artemis.Core
|
|||||||
return Registration?.Getter.Method.ReturnType;
|
return Registration?.Getter.Method.ReturnType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Releases the unmanaged resources used by the object and optionally releases the managed resources.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">
|
||||||
|
/// <see langword="true" /> to release both managed and unmanaged resources;
|
||||||
|
/// <see langword="false" /> to release only unmanaged resources.
|
||||||
|
/// </param>
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
_disposed = true;
|
||||||
|
|
||||||
|
if (Registration != null)
|
||||||
|
Registration.DataBinding = null;
|
||||||
|
DataBindingMode?.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ResetEasing(TProperty value)
|
private void ResetEasing(TProperty value)
|
||||||
{
|
{
|
||||||
_previousValue = GetInterpolatedValue();
|
_previousValue = GetInterpolatedValue();
|
||||||
@ -192,27 +214,6 @@ namespace Artemis.Core
|
|||||||
_reapplyValue = true;
|
_reapplyValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IDisposable
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Releases the unmanaged resources used by the object and optionally releases the managed resources.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">
|
|
||||||
/// <see langword="true" /> to release both managed and unmanaged resources;
|
|
||||||
/// <see langword="false" /> to release only unmanaged resources.
|
|
||||||
/// </param>
|
|
||||||
protected virtual void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing)
|
|
||||||
{
|
|
||||||
_disposed = true;
|
|
||||||
|
|
||||||
if (Registration != null)
|
|
||||||
Registration.DataBinding = null;
|
|
||||||
DataBindingMode?.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
@ -220,8 +221,6 @@ namespace Artemis.Core
|
|||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Mode management
|
#region Mode management
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -245,6 +244,16 @@ namespace Artemis.Core
|
|||||||
ApplyDataBindingMode();
|
ApplyDataBindingMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Replaces the current data binding mode with one based on the provided data binding mode entity
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dataBindingModeEntity">The data binding mode entity to base the new data binding mode upon</param>
|
||||||
|
public void ApplyDataBindingEntity(IDataBindingModeEntity dataBindingModeEntity)
|
||||||
|
{
|
||||||
|
Entity.DataBindingMode = dataBindingModeEntity;
|
||||||
|
ApplyDataBindingMode();
|
||||||
|
}
|
||||||
|
|
||||||
private void ApplyDataBindingMode()
|
private void ApplyDataBindingMode()
|
||||||
{
|
{
|
||||||
DataBindingMode?.Dispose();
|
DataBindingMode?.Dispose();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.UI.Extensions;
|
using Artemis.UI.Extensions;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
@ -16,7 +16,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
|||||||
private readonly IDataModelConditionsVmFactory _dataModelConditionsVmFactory;
|
private readonly IDataModelConditionsVmFactory _dataModelConditionsVmFactory;
|
||||||
private readonly IProfileEditorService _profileEditorService;
|
private readonly IProfileEditorService _profileEditorService;
|
||||||
private bool _isEventGroup;
|
private bool _isEventGroup;
|
||||||
private bool _isInitialized;
|
|
||||||
private bool _isRootGroup;
|
private bool _isRootGroup;
|
||||||
|
|
||||||
public DataModelConditionGroupViewModel(DataModelConditionGroup dataModelConditionGroup,
|
public DataModelConditionGroupViewModel(DataModelConditionGroup dataModelConditionGroup,
|
||||||
@ -30,12 +29,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
|||||||
_dataModelConditionsVmFactory = dataModelConditionsVmFactory;
|
_dataModelConditionsVmFactory = dataModelConditionsVmFactory;
|
||||||
|
|
||||||
Items.CollectionChanged += (_, _) => NotifyOfPropertyChange(nameof(DisplayBooleanOperator));
|
Items.CollectionChanged += (_, _) => NotifyOfPropertyChange(nameof(DisplayBooleanOperator));
|
||||||
|
|
||||||
Execute.PostToUIThread(async () =>
|
|
||||||
{
|
|
||||||
await Task.Delay(50);
|
|
||||||
IsInitialized = true;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConditionGroupType GroupType { get; }
|
public ConditionGroupType GroupType { get; }
|
||||||
@ -63,12 +56,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsInitialized
|
|
||||||
{
|
|
||||||
get => _isInitialized;
|
|
||||||
set => SetAndNotify(ref _isInitialized, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool DisplayBooleanOperator => Items.Count > 1;
|
public bool DisplayBooleanOperator => Items.Count > 1;
|
||||||
public bool DisplayEvaluationResult => GroupType == ConditionGroupType.General && !IsEventGroup;
|
public bool DisplayEvaluationResult => GroupType == ConditionGroupType.General && !IsEventGroup;
|
||||||
public string SelectedBooleanOperator => DataModelConditionGroup.BooleanOperator.Humanize();
|
public string SelectedBooleanOperator => DataModelConditionGroup.BooleanOperator.Humanize();
|
||||||
@ -132,7 +119,9 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
|||||||
{
|
{
|
||||||
NotifyOfPropertyChange(nameof(SelectedBooleanOperator));
|
NotifyOfPropertyChange(nameof(SelectedBooleanOperator));
|
||||||
// Remove VMs of effects no longer applied on the layer
|
// Remove VMs of effects no longer applied on the layer
|
||||||
Items.RemoveRange(Items.Where(c => !DataModelConditionGroup.Children.Contains(c.Model)).ToList());
|
List<DataModelConditionViewModel> toRemove = Items.Where(c => !DataModelConditionGroup.Children.Contains(c.Model)).ToList();
|
||||||
|
if (toRemove.Any())
|
||||||
|
Items.RemoveRange(toRemove);
|
||||||
|
|
||||||
foreach (DataModelConditionPart childModel in Model.Children)
|
foreach (DataModelConditionPart childModel in Model.Children)
|
||||||
{
|
{
|
||||||
@ -169,8 +158,10 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
|||||||
|
|
||||||
IsEventGroup = Items.Any(i => i is DataModelConditionEventViewModel);
|
IsEventGroup = Items.Any(i => i is DataModelConditionEventViewModel);
|
||||||
if (IsEventGroup)
|
if (IsEventGroup)
|
||||||
|
{
|
||||||
if (DataModelConditionGroup.BooleanOperator != BooleanOperator.And)
|
if (DataModelConditionGroup.BooleanOperator != BooleanOperator.And)
|
||||||
SelectBooleanOperator("And");
|
SelectBooleanOperator("And");
|
||||||
|
}
|
||||||
|
|
||||||
OnUpdated();
|
OnUpdated();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,22 +6,25 @@
|
|||||||
xmlns:s="https://github.com/canton7/Stylet"
|
xmlns:s="https://github.com/canton7/Stylet"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Border BorderThickness="0 0 0 1" BorderBrush="{DynamicResource MaterialDesignDivider}" Margin="0 0 0 -4" Padding="0 4">
|
||||||
<Grid.RowDefinitions>
|
<Grid>
|
||||||
<RowDefinition Height="Auto" />
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
||||||
<ContentControl Grid.Row="0"
|
</Grid.RowDefinitions>
|
||||||
s:View.Model="{Binding ActiveItem}"
|
<ContentControl Grid.Row="0"
|
||||||
VerticalContentAlignment="Stretch"
|
s:View.Model="{Binding ActiveItem}"
|
||||||
HorizontalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
IsTabStop="False" />
|
HorizontalContentAlignment="Stretch"
|
||||||
|
IsTabStop="False"
|
||||||
|
Margin="0 -10 0 0"/>
|
||||||
|
|
||||||
<ContentControl Grid.Row="1"
|
<ContentControl Grid.Row="1"
|
||||||
Margin="26 2 0 0"
|
Margin="26 0 0 0"
|
||||||
s:View.Model="{Binding ValueViewModel}"
|
s:View.Model="{Binding ValueViewModel}"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
IsTabStop="False" />
|
IsTabStop="False" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.75*" />
|
<ColumnDefinition Width="0.50*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@ -33,6 +33,7 @@
|
|||||||
<RowDefinition Height="48" />
|
<RowDefinition Height="48" />
|
||||||
<RowDefinition Height="48" />
|
<RowDefinition Height="48" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ComboBox Grid.Row="0"
|
<ComboBox Grid.Row="0"
|
||||||
@ -93,7 +94,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Margin="10 10 0 0">
|
<TextBlock Grid.Row="0" Margin="10 10 0 0">
|
||||||
Data binding result
|
Result
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@ -101,7 +102,7 @@
|
|||||||
Visibility="{Binding AlwaysApplyDataBindings.Value, Converter={x:Static s:BoolToVisibilityConverter.InverseInstance}}"
|
Visibility="{Binding AlwaysApplyDataBindings.Value, Converter={x:Static s:BoolToVisibilityConverter.InverseInstance}}"
|
||||||
ToolTip="Check 'Apply data bindings in editor'"
|
ToolTip="Check 'Apply data bindings in editor'"
|
||||||
Cursor="Help">
|
Cursor="Help">
|
||||||
Other data bindings not updating?
|
Other bindings not updating?
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignLightSeparator}" Margin="0" />
|
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignLightSeparator}" Margin="0" />
|
||||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10 4 10 10">
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10 4 10 10">
|
||||||
@ -134,12 +135,39 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
|
|
||||||
|
<Grid Grid.Row="4" VerticalAlignment="Bottom" Margin="0 5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Grid.Column="0"
|
||||||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||||||
|
Margin="0 0 5 0"
|
||||||
|
ToolTip="Copy the entire data binding"
|
||||||
|
Command="{s:Action CopyDataBinding}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="ContentCopy" />
|
||||||
|
<TextBlock Text="COPY" Margin="8 0 0 0" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||||||
|
Margin="5 0 0 0"
|
||||||
|
ToolTip="Paste the entire data binding"
|
||||||
|
Command="{s:Action PasteDataBinding}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="ContentPaste" />
|
||||||
|
<TextBlock Text="PASTE" Margin="8 0 0 0" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
|
|
||||||
<materialDesign:Card Grid.Column="1" UniformCornerRadius="0" Background="{DynamicResource MaterialDesignToolBarBackground}" Panel.ZIndex="1">
|
<materialDesign:Card Grid.Column="1" UniformCornerRadius="0" Background="{DynamicResource MaterialDesignToolBarBackground}" Panel.ZIndex="1">
|
||||||
<Grid Margin="10 5">
|
<Grid Margin="10 5">
|
||||||
<ContentControl s:View.Model="{Binding ActiveItem, IsAsync=True}"
|
<ContentControl s:View.Model="{Binding ActiveItem}"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
IsTabStop="False" />
|
IsTabStop="False" />
|
||||||
|
|||||||
@ -3,6 +3,8 @@ using System.Linq;
|
|||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
|
using Artemis.Storage.Entities.Profile.DataBindings;
|
||||||
|
using Artemis.UI.Exceptions;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
using Artemis.UI.Screens.ProfileEditor.LayerProperties.Timeline;
|
using Artemis.UI.Screens.ProfileEditor.LayerProperties.Timeline;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
@ -186,16 +188,15 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (Registration.DataBinding != null && SelectedDataBindingMode == DataBindingModeType.None)
|
if (Registration.DataBinding != null && SelectedDataBindingMode == DataBindingModeType.None)
|
||||||
{
|
|
||||||
RemoveDataBinding();
|
RemoveDataBinding();
|
||||||
CreateDataBindingModeModeViewModel();
|
else
|
||||||
return;
|
{
|
||||||
|
if (Registration.DataBinding == null && SelectedDataBindingMode != DataBindingModeType.None)
|
||||||
|
EnableDataBinding();
|
||||||
|
|
||||||
|
Registration.DataBinding!.ChangeDataBindingMode(SelectedDataBindingMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Registration.DataBinding == null && SelectedDataBindingMode != DataBindingModeType.None)
|
|
||||||
EnableDataBinding();
|
|
||||||
|
|
||||||
Registration.DataBinding.ChangeDataBindingMode(SelectedDataBindingMode);
|
|
||||||
CreateDataBindingModeModeViewModel();
|
CreateDataBindingModeModeViewModel();
|
||||||
_profileEditorService.UpdateSelectedProfileElement();
|
_profileEditorService.UpdateSelectedProfileElement();
|
||||||
}
|
}
|
||||||
@ -256,6 +257,33 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
|||||||
_profileEditorService.UpdateSelectedProfileElement();
|
_profileEditorService.UpdateSelectedProfileElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CopyDataBinding()
|
||||||
|
{
|
||||||
|
if (Registration.DataBinding != null)
|
||||||
|
JsonClipboard.SetObject(Registration.DataBinding.Entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PasteDataBinding()
|
||||||
|
{
|
||||||
|
if (Registration.DataBinding == null)
|
||||||
|
Registration.LayerProperty.EnableDataBinding(Registration);
|
||||||
|
if (Registration.DataBinding == null)
|
||||||
|
throw new ArtemisUIException("Failed to create a data binding in order to paste");
|
||||||
|
|
||||||
|
DataBindingEntity dataBindingEntity = JsonClipboard.GetData<DataBindingEntity>();
|
||||||
|
if (dataBindingEntity == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Registration.DataBinding.EasingTime = dataBindingEntity.EasingTime;
|
||||||
|
Registration.DataBinding.EasingFunction = (Easings.Functions) dataBindingEntity.EasingFunction;
|
||||||
|
Registration.DataBinding.ApplyDataBindingEntity(dataBindingEntity.DataBindingMode);
|
||||||
|
CreateDataBindingModeModeViewModel();
|
||||||
|
Update();
|
||||||
|
|
||||||
|
|
||||||
|
_profileEditorService.UpdateSelectedProfileElement();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnFrameRendered(object sender, FrameRenderedEventArgs e)
|
private void OnFrameRendered(object sender, FrameRenderedEventArgs e)
|
||||||
{
|
{
|
||||||
UpdateTestResult();
|
UpdateTestResult();
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid Margin="5 10 0 0">
|
<Grid Margin="0 5 0 0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@ -32,11 +32,7 @@
|
|||||||
Padding="6 4"
|
Padding="6 4"
|
||||||
Height="22"
|
Height="22"
|
||||||
Command="{s:Action AddModifier}">
|
Command="{s:Action AddModifier}">
|
||||||
<StackPanel Orientation="Horizontal">
|
ADD MODIFIER
|
||||||
<TextBlock>
|
|
||||||
ADD MODIFIER
|
|
||||||
</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<ListBox Grid.Row="1"
|
<ListBox Grid.Row="1"
|
||||||
|
|||||||
@ -385,7 +385,8 @@
|
|||||||
Width="110"
|
Width="110"
|
||||||
ToolTip="Add a new segment to the timeline"
|
ToolTip="Add a new segment to the timeline"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsEnabled="{Binding SelectedProfileElement, Converter={StaticResource NullToBooleanConverter}}">
|
IsEnabled="{Binding SelectedProfileElement, Converter={StaticResource NullToBooleanConverter}}"
|
||||||
|
Visibility="{Binding TimelineVisible, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignFlatMidBgButton}">
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignFlatMidBgButton}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
|
|||||||
@ -134,12 +134,17 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
|||||||
public int RightSideIndex
|
public int RightSideIndex
|
||||||
{
|
{
|
||||||
get => _rightSideIndex;
|
get => _rightSideIndex;
|
||||||
set => SetAndNotify(ref _rightSideIndex, value);
|
set
|
||||||
|
{
|
||||||
|
if (!SetAndNotify(ref _rightSideIndex, value)) return;
|
||||||
|
NotifyOfPropertyChange(nameof(TimelineVisible));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanToggleEffectsViewModel => SelectedProfileElement != null && DateTime.Now - _lastEffectsViewModelToggle > TimeSpan.FromMilliseconds(250);
|
public bool CanToggleEffectsViewModel => SelectedProfileElement != null && DateTime.Now - _lastEffectsViewModelToggle > TimeSpan.FromMilliseconds(250);
|
||||||
|
|
||||||
public bool PropertyTreeVisible => PropertyTreeIndex == 0;
|
public bool PropertyTreeVisible => PropertyTreeIndex == 0;
|
||||||
|
public bool TimelineVisible => RightSideIndex == 0;
|
||||||
|
|
||||||
public RenderProfileElement SelectedProfileElement
|
public RenderProfileElement SelectedProfileElement
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user