mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Fixed lots of runtime errors
This commit is contained in:
1 parent
5b5acf2f76
commit
4518691907
163 files changed
+91
-688
No files matched your search
@@ -30,10 +30,6 @@ public partial class CableView : ReactiveUserControl<CableViewModel>
|
||||
});
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void Update(bool from)
|
||||
{
|
||||
|
||||
@@ -26,10 +26,6 @@ public partial class DragCableView : ReactiveUserControl<DragCableViewModel>
|
||||
});
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -24,10 +24,6 @@ public partial class NodePickerView : ReactiveUserControl<NodePickerViewModel>
|
||||
});
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -23,26 +23,26 @@ public partial class NodeScriptView : ReactiveUserControl<NodeScriptViewModel>
|
||||
{
|
||||
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<NodeScriptViewModel>
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,4 @@ public partial class NodeScriptWindowView : ReactiveAppWindow<NodeScriptWindowVi
|
||||
#endif
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -35,10 +35,6 @@ public partial class NodeView : ReactiveUserControl<NodeViewModel>
|
||||
|
||||
#endregion
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -10,8 +10,4 @@ public partial class InputPinCollectionView : ReactiveUserControl<PinCollectionV
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,6 @@ public partial class InputPinView : PinView
|
||||
InitializePin(this.Get<Border>("PinPoint"));
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void PinContainer_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -10,8 +10,4 @@ public partial class OutputPinCollectionView : ReactiveUserControl<PinCollection
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,6 @@ public partial class OutputPinView : PinView
|
||||
InitializePin(this.Get<Border>("PinPoint"));
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void PinContainer_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user