diff --git a/src/Artemis.Core/Artemis.Core.csproj.DotSettings b/src/Artemis.Core/Artemis.Core.csproj.DotSettings index 6641be310..fe32d7dc1 100644 --- a/src/Artemis.Core/Artemis.Core.csproj.DotSettings +++ b/src/Artemis.Core/Artemis.Core.csproj.DotSettings @@ -1,4 +1,5 @@ - + True True True diff --git a/src/Artemis.Core/DryIoc/ContainerExtensions.cs b/src/Artemis.Core/DryIoc/ContainerExtensions.cs index 927f606a9..b9b768c78 100644 --- a/src/Artemis.Core/DryIoc/ContainerExtensions.cs +++ b/src/Artemis.Core/DryIoc/ContainerExtensions.cs @@ -11,12 +11,12 @@ using DryIoc; namespace Artemis.Core.DryIoc; /// -/// Provides an extension method to register services onto a DryIoc . +/// Provides an extension method to register services onto a DryIoc . /// public static class ContainerExtensions { /// - /// Registers core services into the container. + /// Registers core services into the container. /// /// The builder building the current container public static void RegisterCore(this IContainer container) @@ -37,13 +37,13 @@ public static class ContainerExtensions container.RegisterMany(storageAssembly, type => type.IsAssignableTo(), Reuse.Singleton, nonPublicServiceTypes: true); container.Register(Reuse.Singleton); - container.Register(made: Made.Of(_ => ServiceInfo.Of(), f => f.CreatePluginSettings(Arg.Index(0)), r => r.Parent.ImplementationType)); + container.Register(Made.Of(_ => ServiceInfo.Of(), f => f.CreatePluginSettings(Arg.Index(0)), r => r.Parent.ImplementationType)); container.Register(Reuse.Singleton); - container.Register(made: Made.Of(_ => ServiceInfo.Of(), f => f.CreateLogger(Arg.Index(0)), r => r.Parent.ImplementationType)); + container.Register(Made.Of(_ => ServiceInfo.Of(), f => f.CreateLogger(Arg.Index(0)), r => r.Parent.ImplementationType)); } /// - /// Registers plugin services into the container, this is typically a child container. + /// Registers plugin services into the container, this is typically a child container. /// /// The builder building the current container /// The plugin to register diff --git a/src/Artemis.Core/Events/UpdateEventArgs.cs b/src/Artemis.Core/Events/UpdateEventArgs.cs index 977e4fe91..3d8d04de5 100644 --- a/src/Artemis.Core/Events/UpdateEventArgs.cs +++ b/src/Artemis.Core/Events/UpdateEventArgs.cs @@ -13,7 +13,7 @@ public class UpdateEventArgs : EventArgs } /// - /// Gets a boolean indicating whether to silently update or not. + /// Gets a boolean indicating whether to silently update or not. /// public bool Silent { get; } } \ No newline at end of file diff --git a/src/Artemis.Core/Extensions/ProcessExtensions.cs b/src/Artemis.Core/Extensions/ProcessExtensions.cs index 27475a988..8d6e724ad 100644 --- a/src/Artemis.Core/Extensions/ProcessExtensions.cs +++ b/src/Artemis.Core/Extensions/ProcessExtensions.cs @@ -21,17 +21,17 @@ public static class ProcessExtensions { int capacity = 2000; StringBuilder builder = new(capacity); - IntPtr ptr = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, p.Id); + nint ptr = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, p.Id); if (!QueryFullProcessImageName(ptr, 0, builder, ref capacity)) return string.Empty; return builder.ToString(); } [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] - private static extern bool QueryFullProcessImageName([In] IntPtr hProcess, [In] int dwFlags, [Out] StringBuilder lpExeName, ref int lpdwSize); + private static extern bool QueryFullProcessImageName([In] nint hProcess, [In] int dwFlags, [Out] StringBuilder lpExeName, ref int lpdwSize); [DllImport("kernel32.dll")] - private static extern IntPtr OpenProcess(ProcessAccessFlags processAccess, bool bInheritHandle, int processId); + private static extern nint OpenProcess(ProcessAccessFlags processAccess, bool bInheritHandle, int processId); [Flags] private enum ProcessAccessFlags : uint diff --git a/src/Artemis.Storage/Entities/General/ReleaseEntity.cs b/src/Artemis.Storage/Entities/General/ReleaseEntity.cs index 7c517ff79..b3f39fb64 100644 --- a/src/Artemis.Storage/Entities/General/ReleaseEntity.cs +++ b/src/Artemis.Storage/Entities/General/ReleaseEntity.cs @@ -5,7 +5,7 @@ namespace Artemis.Storage.Entities.General; public class ReleaseEntity { public Guid Id { get; set; } - + public string Version { get; set; } public DateTimeOffset? InstalledAt { get; set; } } \ No newline at end of file diff --git a/src/Artemis.Storage/Entities/Profile/LedEntity.cs b/src/Artemis.Storage/Entities/Profile/LedEntity.cs index 1b479ef69..be4536471 100644 --- a/src/Artemis.Storage/Entities/Profile/LedEntity.cs +++ b/src/Artemis.Storage/Entities/Profile/LedEntity.cs @@ -5,6 +5,11 @@ namespace Artemis.Storage.Entities.Profile; public class LedEntity { + public string LedName { get; set; } + public string DeviceIdentifier { get; set; } + + public int? PhysicalLayout { get; set; } + #region LedEntityEqualityComparer private sealed class LedEntityEqualityComparer : IEqualityComparer @@ -31,9 +36,4 @@ public class LedEntity public static IEqualityComparer LedEntityComparer { get; } = new LedEntityEqualityComparer(); #endregion - - public string LedName { get; set; } - public string DeviceIdentifier { get; set; } - - public int? PhysicalLayout { get; set; } } \ No newline at end of file diff --git a/src/Artemis.Storage/Migrations/M0021GradientNodes.cs b/src/Artemis.Storage/Migrations/M0021GradientNodes.cs index c89801fab..dba1e8956 100644 --- a/src/Artemis.Storage/Migrations/M0021GradientNodes.cs +++ b/src/Artemis.Storage/Migrations/M0021GradientNodes.cs @@ -51,7 +51,7 @@ public class M0021GradientNodes : IStorageMigration TargetType = "ColorGradient", TargetNode = gradientNode.Id, TargetPinCollectionId = -1, - TargetPinId = 0, + TargetPinId = 0 }); // Move the exit node to the right @@ -59,6 +59,18 @@ public class M0021GradientNodes : IStorageMigration exitNode.Y += 30; } + private void MigrateDataBinding(PropertyGroupEntity propertyGroup) + { + foreach (PropertyGroupEntity propertyGroupPropertyGroup in propertyGroup.PropertyGroups) + MigrateDataBinding(propertyGroupPropertyGroup); + + foreach (PropertyEntity property in propertyGroup.Properties) + { + if (property.Value.StartsWith("[{\"Color\":\"") && property.DataBinding?.NodeScript != null && property.DataBinding.IsEnabled) + MigrateDataBinding(property); + } + } + public int UserVersion => 21; public void Apply(LiteRepository repository) @@ -73,16 +85,4 @@ public class M0021GradientNodes : IStorageMigration repository.Update(profileEntity); } } - - private void MigrateDataBinding(PropertyGroupEntity propertyGroup) - { - foreach (PropertyGroupEntity propertyGroupPropertyGroup in propertyGroup.PropertyGroups) - MigrateDataBinding(propertyGroupPropertyGroup); - - foreach (PropertyEntity property in propertyGroup.Properties) - { - if (property.Value.StartsWith("[{\"Color\":\"") && property.DataBinding?.NodeScript != null && property.DataBinding.IsEnabled) - MigrateDataBinding(property); - } - } } \ No newline at end of file diff --git a/src/Artemis.Storage/Migrations/M0022TransitionNodes.cs b/src/Artemis.Storage/Migrations/M0022TransitionNodes.cs index 5341371da..3258a6d10 100644 --- a/src/Artemis.Storage/Migrations/M0022TransitionNodes.cs +++ b/src/Artemis.Storage/Migrations/M0022TransitionNodes.cs @@ -22,7 +22,7 @@ public class M0022TransitionNodes : IStorageMigration else if (node.Type == "ColorGradientEasingNode") node.Type = "ColorGradientTransitionNode"; else if (node.Type == "SKColorEasingNode") - node.Type = "SKColorTransitionNode"; + node.Type = "SKColorTransitionNode"; else if (node.Type == "EasingTypeNode") node.Type = "EasingFunctionNode"; } diff --git a/src/Artemis.Storage/Repositories/QueuedActionRepository.cs b/src/Artemis.Storage/Repositories/QueuedActionRepository.cs index f5c83cd0e..cf2bc862d 100644 --- a/src/Artemis.Storage/Repositories/QueuedActionRepository.cs +++ b/src/Artemis.Storage/Repositories/QueuedActionRepository.cs @@ -46,7 +46,7 @@ public class QueuedActionRepository : IQueuedActionRepository { return _repository.Query().Where(q => q.Type == type).Count() > 0; } - + /// public void ClearByType(string type) { diff --git a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings index 22557dc59..4dc50ad43 100644 --- a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings +++ b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings @@ -1,4 +1,5 @@ - + True True True diff --git a/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs b/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs index 04aa74a0d..3a0f2eab1 100644 --- a/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs @@ -93,11 +93,6 @@ public partial class ArtemisIcon : UserControl disposable.Dispose(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - #region Properties /// diff --git a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs index d2737744f..397a50d33 100644 --- a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs @@ -179,11 +179,6 @@ public partial class DraggableNumberBox : UserControl FocusManager.Instance?.Focus(Parent as IInputElement); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - private void OnPointerPressed(object? sender, PointerPressedEventArgs e) { PointerPoint point = e.GetCurrentPoint(this); diff --git a/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs b/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs index 3048f239b..93c669e24 100644 --- a/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs @@ -47,11 +47,6 @@ public partial class EnumComboBox : UserControl } } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - private void OnSelectionChanged(object? sender, SelectionChangedEventArgs e) { if (_enumComboBox == null || _enumComboBox.SelectedIndex == -1) diff --git a/src/Artemis.UI.Shared/Controls/HotkeyBox.axaml.cs b/src/Artemis.UI.Shared/Controls/HotkeyBox.axaml.cs index e9e2ce0b3..45480fcc3 100644 --- a/src/Artemis.UI.Shared/Controls/HotkeyBox.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/HotkeyBox.axaml.cs @@ -68,11 +68,6 @@ public partial class HotkeyBox : UserControl _displayTextBox.CaretIndex = _displayTextBox.Text?.Length ?? 0; } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - private void Button_OnClick(object? sender, RoutedEventArgs e) { Hotkey = null; diff --git a/src/Artemis.UI.Shared/Controls/ProfileConfigurationIcon.axaml.cs b/src/Artemis.UI.Shared/Controls/ProfileConfigurationIcon.axaml.cs index 5313522d9..4dd0711ba 100644 --- a/src/Artemis.UI.Shared/Controls/ProfileConfigurationIcon.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/ProfileConfigurationIcon.axaml.cs @@ -79,11 +79,6 @@ public partial class ProfileConfigurationIcon : UserControl, IDisposable }; } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - private void OnDetachedFromLogicalTree(object? sender, LogicalTreeAttachmentEventArgs e) { if (ConfigurationIcon != null) diff --git a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/DefaultDataModelDisplayView.axaml.cs b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/DefaultDataModelDisplayView.axaml.cs index 685f6eade..2980cf877 100644 --- a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/DefaultDataModelDisplayView.axaml.cs +++ b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/DefaultDataModelDisplayView.axaml.cs @@ -15,9 +15,4 @@ public partial class DefaultDataModelDisplayView : UserControl { InitializeComponent(); } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs index 4951fcc44..57a8c867a 100644 --- a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs +++ b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs @@ -17,8 +17,4 @@ public partial class SKColorDataModelDisplayView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/Services/Window/ExceptionDialogView.axaml.cs b/src/Artemis.UI.Shared/Services/Window/ExceptionDialogView.axaml.cs index 8b6fe08d7..9aca2bcf9 100644 --- a/src/Artemis.UI.Shared/Services/Window/ExceptionDialogView.axaml.cs +++ b/src/Artemis.UI.Shared/Services/Window/ExceptionDialogView.axaml.cs @@ -14,8 +14,4 @@ internal partial class ExceptionDialogView : ReactiveWindow - - + + - - - + + + + VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}" + IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}" + AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"> + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> + Text="{TemplateBinding Text, Mode=TwoWay}" + CaretIndex="{TemplateBinding CaretIndex}" + SelectionStart="{TemplateBinding SelectionStart}" + SelectionEnd="{TemplateBinding SelectionEnd}" + TextAlignment="{TemplateBinding TextAlignment}" + TextWrapping="{TemplateBinding TextWrapping}" + LineHeight="{TemplateBinding LineHeight}" + PasswordChar="{TemplateBinding PasswordChar}" + RevealPassword="{TemplateBinding RevealPassword}" + SelectionBrush="{TemplateBinding SelectionBrush}" + SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}" + CaretBrush="{TemplateBinding CaretBrush}" + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> diff --git a/src/Artemis.UI/Artemis.UI.csproj.DotSettings b/src/Artemis.UI/Artemis.UI.csproj.DotSettings index 9b01cf388..e73de0af9 100644 --- a/src/Artemis.UI/Artemis.UI.csproj.DotSettings +++ b/src/Artemis.UI/Artemis.UI.csproj.DotSettings @@ -1,4 +1,5 @@ - + True True True diff --git a/src/Artemis.UI/DefaultTypes/PropertyInput/BoolPropertyInputView.axaml.cs b/src/Artemis.UI/DefaultTypes/PropertyInput/BoolPropertyInputView.axaml.cs index bc6e253bb..66e0f8f66 100644 --- a/src/Artemis.UI/DefaultTypes/PropertyInput/BoolPropertyInputView.axaml.cs +++ b/src/Artemis.UI/DefaultTypes/PropertyInput/BoolPropertyInputView.axaml.cs @@ -10,8 +10,4 @@ public partial class BoolPropertyInputView : ReactiveUserControl ViewModel?.Unfocused(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Debugger/DebugView.axaml.cs b/src/Artemis.UI/Screens/Debugger/DebugView.axaml.cs index b201fca80..6b7f58b7f 100644 --- a/src/Artemis.UI/Screens/Debugger/DebugView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/DebugView.axaml.cs @@ -29,10 +29,6 @@ public partial class DebugView : ReactiveAppWindow }); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void DeviceVisualizer_OnLedClicked(object? sender, LedClickedEventArgs e) { diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml.cs b/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml.cs index 11ae2e1e1..dd39a5f8d 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml.cs @@ -10,8 +10,4 @@ public partial class DataModelDebugView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } protected override void OnInitialized() { diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugPluginView.axaml.cs b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugPluginView.axaml.cs index 230f1b7bb..27f98c36e 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugPluginView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugPluginView.axaml.cs @@ -10,8 +10,4 @@ public partial class PerformanceDebugPluginView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugProfilerView.axaml.cs b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugProfilerView.axaml.cs index 2f0e76a86..56c8ec8de 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugProfilerView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugProfilerView.axaml.cs @@ -10,8 +10,4 @@ public partial class PerformanceDebugProfilerView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugView.axaml.cs b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugView.axaml.cs index 9f5da4e78..0c91c2bbb 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/Tabs/Performance/PerformanceDebugView.axaml.cs @@ -10,8 +10,4 @@ public partial class PerformanceDebugView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/Settings/DebugSettingsView.axaml.cs b/src/Artemis.UI/Screens/Debugger/Tabs/Settings/DebugSettingsView.axaml.cs index e9eddd054..f0ba0577a 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/Settings/DebugSettingsView.axaml.cs +++ b/src/Artemis.UI/Screens/Debugger/Tabs/Settings/DebugSettingsView.axaml.cs @@ -10,8 +10,4 @@ public partial class DebugSettingsView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesInstallDialogView.axaml.cs b/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesInstallDialogView.axaml.cs index 4b8efec20..5186027b4 100644 --- a/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesInstallDialogView.axaml.cs +++ b/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesInstallDialogView.axaml.cs @@ -10,8 +10,4 @@ public partial class PluginPrerequisitesInstallDialogView : ReactiveUserControl< InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesUninstallDialogView.axaml.cs b/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesUninstallDialogView.axaml.cs index 83ede62ab..6ea72f1da 100644 --- a/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesUninstallDialogView.axaml.cs +++ b/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesUninstallDialogView.axaml.cs @@ -10,8 +10,4 @@ public partial class PluginPrerequisitesUninstallDialogView : ReactiveUserContro InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Plugins/PluginFeatureView.axaml.cs b/src/Artemis.UI/Screens/Plugins/PluginFeatureView.axaml.cs index 5f032736e..7f21c9ce0 100644 --- a/src/Artemis.UI/Screens/Plugins/PluginFeatureView.axaml.cs +++ b/src/Artemis.UI/Screens/Plugins/PluginFeatureView.axaml.cs @@ -10,8 +10,4 @@ public partial class PluginFeatureView : ReactiveUserControl EnabledToggle.Click += EnabledToggleOnClick; } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void EnabledToggleOnClick(object? sender, RoutedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/AlwaysOnConditionView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/AlwaysOnConditionView.axaml.cs index d9875515d..20c9a7452 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/AlwaysOnConditionView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/AlwaysOnConditionView.axaml.cs @@ -10,8 +10,4 @@ public partial class AlwaysOnConditionView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/EventConditionView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/EventConditionView.axaml.cs index c4a74eed0..2240a63ea 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/EventConditionView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/DisplayCondition/ConditionTypes/EventConditionView.axaml.cs @@ -10,8 +10,4 @@ public partial class EventConditionView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void MenuBase_OnMenuClosed(object? sender, RoutedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Playback/PlaybackView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Playback/PlaybackView.axaml.cs index 0c3cec9a2..06a684191 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Playback/PlaybackView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Playback/PlaybackView.axaml.cs @@ -10,8 +10,4 @@ public partial class PlaybackView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/CategoryAdaptionHintView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/CategoryAdaptionHintView.axaml.cs index bb65355de..68e0563e8 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/CategoryAdaptionHintView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/CategoryAdaptionHintView.axaml.cs @@ -10,8 +10,4 @@ public partial class CategoryAdaptionHintView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/DeviceAdaptionHintView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/DeviceAdaptionHintView.axaml.cs index 68ab025ba..bc64fa3e6 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/DeviceAdaptionHintView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/DeviceAdaptionHintView.axaml.cs @@ -10,8 +10,4 @@ public partial class DeviceAdaptionHintView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/KeyboardSectionAdaptionHintView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/KeyboardSectionAdaptionHintView.axaml.cs index e7db0abdd..df0eb98f7 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/KeyboardSectionAdaptionHintView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/AdaptionHints/KeyboardSectionAdaptionHintView.axaml.cs @@ -10,8 +10,4 @@ public partial class KeyboardSectionAdaptionHintView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/LayerHintsDialogView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/LayerHintsDialogView.axaml.cs index a406a063c..c7703fe65 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/LayerHintsDialogView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Dialogs/LayerHintsDialogView.axaml.cs @@ -14,8 +14,4 @@ public partial class LayerHintsDialogView : ReactiveAppWindow _dragAdorner.RenderTransform = new TranslateTransform(_dragStartPosition.X - _elementDragOffset.X, position.Y - _elementDragOffset.Y); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void ProfileTreeView_OnSelectionChanged(object? sender, SelectionChangedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/DataBinding/DataBindingView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/DataBinding/DataBindingView.axaml.cs index 2888b4271..f0d5a3e71 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/DataBinding/DataBindingView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/DataBinding/DataBindingView.axaml.cs @@ -10,8 +10,4 @@ public partial class DataBindingView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/AddEffectView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/AddEffectView.axaml.cs index 40782dd0d..89a8aab4c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/AddEffectView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/AddEffectView.axaml.cs @@ -13,10 +13,6 @@ public partial class AddEffectView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/TimelineSegmentEditView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/TimelineSegmentEditView.axaml.cs index 72e19028c..aa499ec9d 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/TimelineSegmentEditView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Dialogs/TimelineSegmentEditView.axaml.cs @@ -10,8 +10,4 @@ public partial class TimelineSegmentEditView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void ApplyTransition(bool enable) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineEasingView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineEasingView.axaml.cs index 3f44be6ea..5aa75d59c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineEasingView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineEasingView.axaml.cs @@ -10,8 +10,4 @@ public partial class TimelineEasingView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineKeyframeView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineKeyframeView.axaml.cs index 307b8bc43..cebade11d 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineKeyframeView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Keyframes/TimelineKeyframeView.axaml.cs @@ -30,10 +30,6 @@ public partial class TimelineKeyframeView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void KeyframeDragAnchor_OnPointerPressed(object? sender, PointerPressedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/MainSegmentView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/MainSegmentView.axaml.cs index db6cb5928..4923e2def 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/MainSegmentView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/MainSegmentView.axaml.cs @@ -13,10 +13,6 @@ public partial class MainSegmentView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void KeyframeDragAnchor_OnPointerPressed(object? sender, PointerPressedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/StartSegmentView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/StartSegmentView.axaml.cs index 2f567292c..231a80b51 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/StartSegmentView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/StartSegmentView.axaml.cs @@ -13,10 +13,6 @@ public partial class StartSegmentView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void SelectionRectangle_OnSelectionFinished(object? sender, SelectionRectangleEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/ContentDialogs/LayerEffectRenameView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/ContentDialogs/LayerEffectRenameView.axaml.cs index 8b8cb3d54..19972807c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/ContentDialogs/LayerEffectRenameView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/ContentDialogs/LayerEffectRenameView.axaml.cs @@ -27,8 +27,4 @@ public partial class LayerEffectRenameView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/TreePropertyView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/TreePropertyView.axaml.cs index ce31aec8d..0a42de288 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/TreePropertyView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Tree/TreePropertyView.axaml.cs @@ -23,10 +23,6 @@ public partial class TreePropertyView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Tools/SelectionAddToolView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Tools/SelectionAddToolView.axaml.cs index 77d850ec2..c7399853d 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Tools/SelectionAddToolView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Tools/SelectionAddToolView.axaml.cs @@ -13,10 +13,6 @@ public partial class SelectionAddToolView : ReactiveUserControl ViewModel.WhenAnyValue(vm => vm.Selected).Subscribe(_ => UpdateStrokeThickness()).DisposeWith(d)); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } #region Overrides of TemplatedControl diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Visualizers/LayerVisualizerView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Visualizers/LayerVisualizerView.axaml.cs index 6882addb0..71567cf66 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Visualizers/LayerVisualizerView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/Visualizers/LayerVisualizerView.axaml.cs @@ -17,10 +17,6 @@ public partial class LayerVisualizerView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Root/SplashView.axaml.cs b/src/Artemis.UI/Screens/Root/SplashView.axaml.cs index 954265d1d..cc54a133c 100644 --- a/src/Artemis.UI/Screens/Root/SplashView.axaml.cs +++ b/src/Artemis.UI/Screens/Root/SplashView.axaml.cs @@ -25,8 +25,4 @@ public partial class SplashView : ReactiveWindow }); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Scripting/Dialogs/ScriptConfigurationCreateView.axaml.cs b/src/Artemis.UI/Screens/Scripting/Dialogs/ScriptConfigurationCreateView.axaml.cs index 56dc931c5..801279422 100644 --- a/src/Artemis.UI/Screens/Scripting/Dialogs/ScriptConfigurationCreateView.axaml.cs +++ b/src/Artemis.UI/Screens/Scripting/Dialogs/ScriptConfigurationCreateView.axaml.cs @@ -10,8 +10,4 @@ public partial class ScriptConfigurationCreateView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml.cs b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml.cs index 27f8c0075..0450a4417 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml.cs @@ -10,8 +10,4 @@ public partial class AboutTabView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml.cs b/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml.cs index a5031d9f6..cc8949831 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml.cs @@ -10,8 +10,4 @@ public partial class DevicesTabView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml.cs b/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml.cs index 4b1c2b693..d94e90eae 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml.cs @@ -10,8 +10,4 @@ public partial class GeneralTabView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml index 5e150f25e..06a0deb5b 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml +++ b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml @@ -14,7 +14,7 @@ - + diff --git a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml.cs b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml.cs index b5428a68a..555c1c1c2 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml.cs @@ -10,8 +10,4 @@ public partial class PluginsTabView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/ReleasesTabView.axaml.cs b/src/Artemis.UI/Screens/Settings/Tabs/ReleasesTabView.axaml.cs index 7d0304e75..b1a6bbeaa 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/ReleasesTabView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/ReleasesTabView.axaml.cs @@ -10,8 +10,4 @@ public partial class ReleasesTabView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Updating/ReleaseView.axaml.cs b/src/Artemis.UI/Screens/Settings/Updating/ReleaseView.axaml.cs index d4670e37b..64c2af738 100644 --- a/src/Artemis.UI/Screens/Settings/Updating/ReleaseView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Updating/ReleaseView.axaml.cs @@ -11,10 +11,6 @@ public partial class ReleaseView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/Sidebar/ContentDialogs/SidebarCategoryEditView.axaml.cs b/src/Artemis.UI/Screens/Sidebar/ContentDialogs/SidebarCategoryEditView.axaml.cs index d29132e7e..a9447050f 100644 --- a/src/Artemis.UI/Screens/Sidebar/ContentDialogs/SidebarCategoryEditView.axaml.cs +++ b/src/Artemis.UI/Screens/Sidebar/ContentDialogs/SidebarCategoryEditView.axaml.cs @@ -13,8 +13,4 @@ public partial class SidebarCategoryEditView : ReactiveUserControl this.ClearAllDataValidationErrors()); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Sidebar/Dialogs/ModuleActivationRequirementView.axaml.cs b/src/Artemis.UI/Screens/Sidebar/Dialogs/ModuleActivationRequirementView.axaml.cs index 6e404be76..17a674bb7 100644 --- a/src/Artemis.UI/Screens/Sidebar/Dialogs/ModuleActivationRequirementView.axaml.cs +++ b/src/Artemis.UI/Screens/Sidebar/Dialogs/ModuleActivationRequirementView.axaml.cs @@ -10,8 +10,4 @@ public partial class ModuleActivationRequirementView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.axaml.cs index 1e6d7b00f..094e16d39 100644 --- a/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.axaml.cs @@ -21,10 +21,6 @@ public partial class StartupWizardView : ReactiveAppWindow ViewModel.WhenAnyValue(vm => vm.CurrentStep).Subscribe(ApplyCurrentStep).DisposeWith(d)); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void ApplyCurrentStep(int step) { diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/DevicesStep.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/DevicesStep.axaml.cs index d385e9452..2e8e356fc 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/DevicesStep.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/DevicesStep.axaml.cs @@ -10,8 +10,4 @@ public partial class DevicesStep : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/FinishStep.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/FinishStep.axaml.cs index aed3014f1..536f71cd1 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/FinishStep.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/FinishStep.axaml.cs @@ -10,8 +10,4 @@ public partial class FinishStep : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/LayoutStep.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/LayoutStep.axaml.cs index dae2f4bec..cf318b584 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/LayoutStep.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/LayoutStep.axaml.cs @@ -10,8 +10,4 @@ public partial class LayoutStep : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml.cs index 343b11526..cb34b052e 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml.cs @@ -10,8 +10,4 @@ public partial class SettingsStep : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/WelcomeStep.axaml.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/WelcomeStep.axaml.cs index 8a2ed216c..3fb6b20af 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/WelcomeStep.axaml.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/WelcomeStep.axaml.cs @@ -10,8 +10,4 @@ public partial class WelcomeStep : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/SurfaceEditor/ListDeviceView.axaml.cs b/src/Artemis.UI/Screens/SurfaceEditor/ListDeviceView.axaml.cs index 878e3ad91..ffc3421bf 100644 --- a/src/Artemis.UI/Screens/SurfaceEditor/ListDeviceView.axaml.cs +++ b/src/Artemis.UI/Screens/SurfaceEditor/ListDeviceView.axaml.cs @@ -10,8 +10,4 @@ public partial class ListDeviceView : UserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml.cs b/src/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml.cs index ec1653427..886c6818a 100644 --- a/src/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml.cs +++ b/src/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml.cs @@ -16,10 +16,6 @@ public partial class SurfaceDeviceView : ReactiveUserControl }); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void Update(bool from) { diff --git a/src/Artemis.UI/Screens/VisualScripting/DragCableView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/DragCableView.axaml.cs index e88dca567..8ba56ea89 100644 --- a/src/Artemis.UI/Screens/VisualScripting/DragCableView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/DragCableView.axaml.cs @@ -26,10 +26,6 @@ public partial class DragCableView : ReactiveUserControl }); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void Update() { diff --git a/src/Artemis.UI/Screens/VisualScripting/NodePickerView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/NodePickerView.axaml.cs index fcaf66d43..ce2413a3c 100644 --- a/src/Artemis.UI/Screens/VisualScripting/NodePickerView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/NodePickerView.axaml.cs @@ -24,10 +24,6 @@ public partial class NodePickerView : ReactiveUserControl }); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs index 4aa41de65..47fa01493 100644 --- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs @@ -23,26 +23,26 @@ public partial class NodeScriptView : ReactiveUserControl { InitializeComponent(); - // NodeScriptZoomBorder.PropertyChanged += ZoomBorderOnPropertyChanged; - // UpdateZoomBorderBackground(); - // - // NodeScriptZoomBorder.AddHandler(PointerReleasedEvent, CanvasOnPointerReleased, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); - // NodeScriptZoomBorder.AddHandler(PointerWheelChangedEvent, ZoomOnPointerWheelChanged, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); - // NodeScriptZoomBorder.AddHandler(PointerMovedEvent, ZoomOnPointerMoved, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); - // - // this.WhenActivated(d => - // { - // ViewModel!.AutoFitRequested += ViewModelOnAutoFitRequested; - // ViewModel.PickerPositionSubject.Subscribe(ShowPickerAt).DisposeWith(d); - // if (ViewModel.IsPreview) - // { - // BoundsProperty.Changed.Subscribe(BoundsPropertyChanged).DisposeWith(d); - // ViewModel.NodeViewModels.ToObservableChangeSet().Subscribe(_ => AutoFitIfPreview()).DisposeWith(d); - // } - // - // Dispatcher.UIThread.InvokeAsync(() => AutoFit(true), DispatcherPriority.ContextIdle); - // Disposable.Create(() => ViewModel.AutoFitRequested -= ViewModelOnAutoFitRequested).DisposeWith(d); - // }); + NodeScriptZoomBorder.PropertyChanged += ZoomBorderOnPropertyChanged; + UpdateZoomBorderBackground(); + + NodeScriptZoomBorder.AddHandler(PointerReleasedEvent, CanvasOnPointerReleased, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); + NodeScriptZoomBorder.AddHandler(PointerWheelChangedEvent, ZoomOnPointerWheelChanged, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); + NodeScriptZoomBorder.AddHandler(PointerMovedEvent, ZoomOnPointerMoved, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true); + + this.WhenActivated(d => + { + ViewModel!.AutoFitRequested += ViewModelOnAutoFitRequested; + ViewModel.PickerPositionSubject.Subscribe(ShowPickerAt).DisposeWith(d); + if (ViewModel.IsPreview) + { + BoundsProperty.Changed.Subscribe(BoundsPropertyChanged).DisposeWith(d); + ViewModel.NodeViewModels.ToObservableChangeSet().Subscribe(_ => AutoFitIfPreview()).DisposeWith(d); + } + + Dispatcher.UIThread.InvokeAsync(() => AutoFit(true), DispatcherPriority.ContextIdle); + Disposable.Create(() => ViewModel.AutoFitRequested -= ViewModelOnAutoFitRequested).DisposeWith(d); + }); } protected override Size MeasureOverride(Size availableSize) @@ -130,10 +130,6 @@ public partial class NodeScriptView : ReactiveUserControl visualBrush.DestinationRect = new RelativeRect(NodeScriptZoomBorder.OffsetX * -1, NodeScriptZoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void ZoomBorder_OnZoomChanged(object sender, ZoomChangedEventArgs e) { diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowView.axaml.cs index a5ad7196d..c58c4eade 100644 --- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowView.axaml.cs @@ -14,8 +14,4 @@ public partial class NodeScriptWindowView : ReactiveAppWindow #endregion - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/VisualScripting/Pins/InputPinCollectionView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/Pins/InputPinCollectionView.axaml.cs index f7f3359c2..f23901ca1 100644 --- a/src/Artemis.UI/Screens/VisualScripting/Pins/InputPinCollectionView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/Pins/InputPinCollectionView.axaml.cs @@ -10,8 +10,4 @@ public partial class InputPinCollectionView : ReactiveUserControl("PinPoint")); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void PinContainer_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml.cs index bb9a4a73d..765a43cfe 100644 --- a/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml.cs +++ b/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml.cs @@ -10,8 +10,4 @@ public partial class OutputPinCollectionView : ReactiveUserControl("PinPoint")); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } private void PinContainer_OnPointerReleased(object? sender, PointerReleasedEventArgs e) { diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs index 7f8fac500..c875bd294 100644 --- a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs +++ b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs @@ -10,8 +10,4 @@ public partial class WorkshopView : ReactiveUserControl InitializeComponent(); } - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } \ No newline at end of file diff --git a/src/Artemis.VisualScripting/Nodes/Color/Screens/ColorGradientNodeCustomView.axaml.cs b/src/Artemis.VisualScripting/Nodes/Color/Screens/ColorGradientNodeCustomView.axaml.cs index b83bc475e..ec578cde5 100644 --- a/src/Artemis.VisualScripting/Nodes/Color/Screens/ColorGradientNodeCustomView.axaml.cs +++ b/src/Artemis.VisualScripting/Nodes/Color/Screens/ColorGradientNodeCustomView.axaml.cs @@ -11,10 +11,6 @@ public partial class ColorGradientNodeCustomView : ReactiveUserControl