mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
UI - Update Avalonia to preview7
UI - Update FluentAvalonia to preview7
This commit is contained in:
parent
b1e39dbd39
commit
c50a572363
@ -16,11 +16,11 @@
|
|||||||
<None Remove=".gitignore" />
|
<None Remove=".gitignore" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview7" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -15,11 +15,11 @@
|
|||||||
<None Remove=".gitignore" />
|
<None Remove=".gitignore" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview7" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -10,13 +10,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="DynamicData" Version="7.13.1" />
|
<PackageReference Include="DynamicData" Version="7.13.1" />
|
||||||
<PackageReference Include="FluentAvaloniaUI" Version="2.0.0-preview6" />
|
<PackageReference Include="FluentAvaloniaUI" Version="2.0.0-preview7" />
|
||||||
<PackageReference Include="Material.Icons.Avalonia" Version="2.0.0-preview3" />
|
<PackageReference Include="Material.Icons.Avalonia" Version="2.0.0-preview3" />
|
||||||
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
||||||
|
|||||||
@ -308,7 +308,7 @@ public class DataModelPicker : TemplatedControl
|
|||||||
{
|
{
|
||||||
GetDataModel();
|
GetDataModel();
|
||||||
UpdateCurrentPath(true);
|
UpdateCurrentPath(true);
|
||||||
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(200), DispatcherPriority.Normal, Update);
|
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(200), DispatcherPriority.Background, Update);
|
||||||
_updateTimer.Start();
|
_updateTimer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public partial class EnumComboBox : UserControl
|
|||||||
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
|
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
|
||||||
{
|
{
|
||||||
_enumComboBox = this.Get<ComboBox>("ChildEnumComboBox");
|
_enumComboBox = this.Get<ComboBox>("ChildEnumComboBox");
|
||||||
_enumComboBox.Items = _currentValues;
|
_enumComboBox.ItemsSource = _currentValues;
|
||||||
|
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
UpdateSelection();
|
UpdateSelection();
|
||||||
|
|||||||
@ -37,8 +37,8 @@ public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposa
|
|||||||
|
|
||||||
CopyPath = ReactiveCommand.CreateFromTask(async () =>
|
CopyPath = ReactiveCommand.CreateFromTask(async () =>
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard != null && Path != null)
|
if (Path != null)
|
||||||
await Application.Current.Clipboard.SetTextAsync(Path);
|
await UI.Clipboard.SetTextAsync(Path);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (parent == null)
|
if (parent == null)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ public static class ContainerExtensions
|
|||||||
public static void RegisterSharedUI(this IContainer container)
|
public static void RegisterSharedUI(this IContainer container)
|
||||||
{
|
{
|
||||||
Assembly artemisShared = typeof(IArtemisSharedUIService).GetAssembly();
|
Assembly artemisShared = typeof(IArtemisSharedUIService).GetAssembly();
|
||||||
container.RegisterMany(new[] { artemisShared }, type => type.IsAssignableTo<IArtemisSharedUIService>(), Reuse.Singleton);
|
container.RegisterMany(new[] {artemisShared}, type => type.IsAssignableTo<IArtemisSharedUIService>(), Reuse.Singleton);
|
||||||
|
|
||||||
UI.Locator = container;
|
UI.Locator = container;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,8 @@ public class NotificationBuilder
|
|||||||
public NotificationBuilder(Window parent)
|
public NotificationBuilder(Window parent)
|
||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
_infoBar = new InfoBar {Classes = Classes.Parse("notification-info-bar")};
|
_infoBar = new InfoBar();
|
||||||
|
_infoBar.Classes.Add("notification-info-bar");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -204,11 +205,18 @@ public class NotificationButtonBuilder
|
|||||||
|
|
||||||
internal Control Build()
|
internal Control Build()
|
||||||
{
|
{
|
||||||
|
Button button = new() {Content = _text};
|
||||||
|
button.Classes.Add("AppBarButton");
|
||||||
|
|
||||||
if (_action != null)
|
if (_action != null)
|
||||||
return new Button {Content = _text, Command = ReactiveCommand.Create(() => _action()), Classes = new Classes("AppBarButton")};
|
button.Command = ReactiveCommand.Create(() => _action());
|
||||||
if (_command != null)
|
else if (_command != null)
|
||||||
return new Button {Content = _text, Command = _command, CommandParameter = _commandParameter, Classes = new Classes("AppBarButton")};
|
{
|
||||||
return new Button {Content = _text, Classes = new Classes("AppBarButton")};
|
button.Command = _command;
|
||||||
|
button.CommandParameter = _commandParameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
return button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,10 +23,7 @@ internal class ExceptionDialogViewModel : DialogViewModelBase<object>
|
|||||||
|
|
||||||
public async Task CopyException()
|
public async Task CopyException()
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
await UI.Clipboard.SetTextAsync(Exception.ToString());
|
||||||
return;
|
|
||||||
|
|
||||||
await Application.Current.Clipboard.SetTextAsync(Exception.ToString());
|
|
||||||
_notificationService.CreateNotification()
|
_notificationService.CreateNotification()
|
||||||
.WithMessage("Copied stack trace to clipboard.")
|
.WithMessage("Copied stack trace to clipboard.")
|
||||||
.WithSeverity(NotificationSeverity.Success)
|
.WithSeverity(NotificationSeverity.Success)
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
<TreeView Grid.Row="2"
|
<TreeView Grid.Row="2"
|
||||||
Name="DataModelTreeView"
|
Name="DataModelTreeView"
|
||||||
Items="{Binding DataModelViewModel.Children, RelativeSource={RelativeSource TemplatedParent}}">
|
ItemsSource="{Binding DataModelViewModel.Children, RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
<TreeView.Styles>
|
<TreeView.Styles>
|
||||||
<Style Selector="TreeViewItem">
|
<Style Selector="TreeViewItem">
|
||||||
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
|
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
Background="{DynamicResource LightCheckerboardBrush}"
|
Background="{DynamicResource LightCheckerboardBrush}"
|
||||||
Margin="5 0">
|
Margin="5 0">
|
||||||
<Border Background="{TemplateBinding LinearGradientBrush}">
|
<Border Background="{TemplateBinding LinearGradientBrush}">
|
||||||
<ItemsControl Name="GradientStops" Items="{TemplateBinding EditingColorGradient}" ClipToBounds="False">
|
<ItemsControl Name="GradientStops" ItemsSource="{TemplateBinding EditingColorGradient}" ClipToBounds="False">
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.Styles>
|
||||||
<Style Selector="ItemsControl#GradientStops > ContentPresenter">
|
<Style Selector="ItemsControl#GradientStops > ContentPresenter">
|
||||||
<Setter Property="Canvas.Left">
|
<Setter Property="Canvas.Left">
|
||||||
@ -134,7 +134,7 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Items="{TemplateBinding EditingColorGradient}"
|
ItemsSource="{TemplateBinding EditingColorGradient}"
|
||||||
ClipToBounds="False"
|
ClipToBounds="False"
|
||||||
Margin="5 0">
|
Margin="5 0">
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.Styles>
|
||||||
@ -182,7 +182,7 @@
|
|||||||
<ListBox Name="GradientColors"
|
<ListBox Name="GradientColors"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
MaxHeight="280"
|
MaxHeight="280"
|
||||||
Items="{TemplateBinding EditingColorGradient}"
|
ItemsSource="{TemplateBinding EditingColorGradient}"
|
||||||
SelectedItem="{TemplateBinding SelectedColorStop, Mode=TwoWay}"
|
SelectedItem="{TemplateBinding SelectedColorStop, Mode=TwoWay}"
|
||||||
Padding="10 0 15 0">
|
Padding="10 0 15 0">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System.Reactive.Linq;
|
|||||||
using System.Reactive.Subjects;
|
using System.Reactive.Subjects;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Input.Platform;
|
||||||
using IContainer = DryIoc.IContainer;
|
using IContainer = DryIoc.IContainer;
|
||||||
|
|
||||||
namespace Artemis.UI.Shared;
|
namespace Artemis.UI.Shared;
|
||||||
@ -26,6 +27,11 @@ public static class UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static IContainer Locator { get; set; } = null!;
|
public static IContainer Locator { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the clipboard.
|
||||||
|
/// </summary>
|
||||||
|
public static IClipboard Clipboard { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a boolean indicating whether hotkeys are to be disabled.
|
/// Gets a boolean indicating whether hotkeys are to be disabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -21,12 +21,12 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview7" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Win32" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Win32" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
|
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
|
||||||
<PackageReference Include="Microsoft.Win32" Version="2.0.1" />
|
<PackageReference Include="Microsoft.Win32" Version="2.0.1" />
|
||||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
|
||||||
|
|||||||
18
src/Artemis.UI.Windows/Extensions/IWindowImplExtensions.cs
Normal file
18
src/Artemis.UI.Windows/Extensions/IWindowImplExtensions.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Artemis.UI.Exceptions;
|
||||||
|
using Avalonia.Platform;
|
||||||
|
|
||||||
|
namespace Artemis.UI.Windows.Extensions;
|
||||||
|
|
||||||
|
public static class IWindowImplExtensions
|
||||||
|
{
|
||||||
|
public static IPlatformHandle GetHandle(this IWindowImpl window)
|
||||||
|
{
|
||||||
|
// This is unfortunate
|
||||||
|
IPlatformHandle? handle = (IPlatformHandle?) window.GetType().GetProperties().FirstOrDefault(p => p.Name == "Handle")?.GetValue(window);
|
||||||
|
if (handle == null)
|
||||||
|
throw new ArtemisUIException("Could not get IWindowImpl internal platform handle, Avalonia API change?");
|
||||||
|
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
|
using Artemis.UI.Windows.Extensions;
|
||||||
using Artemis.UI.Windows.Utilities;
|
using Artemis.UI.Windows.Utilities;
|
||||||
using Avalonia.Controls.Platform;
|
using Avalonia.Controls.Platform;
|
||||||
using Avalonia.Platform;
|
using Avalonia.Platform;
|
||||||
@ -45,13 +46,14 @@ public class WindowsInputProvider : InputProvider
|
|||||||
|
|
||||||
_window = PlatformManager.CreateWindow();
|
_window = PlatformManager.CreateWindow();
|
||||||
|
|
||||||
_hWndProcHook = GetWindowLongPtr(_window.Handle.Handle, GWL_WNDPROC);
|
IPlatformHandle handle = _window.GetHandle();
|
||||||
|
_hWndProcHook = GetWindowLongPtr(handle.Handle, GWL_WNDPROC);
|
||||||
_fnWndProcHook = CustomWndProc;
|
_fnWndProcHook = CustomWndProc;
|
||||||
nint newLong = Marshal.GetFunctionPointerForDelegate(_fnWndProcHook);
|
nint newLong = Marshal.GetFunctionPointerForDelegate(_fnWndProcHook);
|
||||||
SetWindowLongPtr(_window.Handle.Handle, GWL_WNDPROC, newLong);
|
SetWindowLongPtr(handle.Handle, GWL_WNDPROC, newLong);
|
||||||
|
|
||||||
RawInputDevice.RegisterDevice(HidUsageAndPage.Keyboard, RawInputDeviceFlags.InputSink, _window.Handle.Handle);
|
RawInputDevice.RegisterDevice(HidUsageAndPage.Keyboard, RawInputDeviceFlags.InputSink, handle.Handle);
|
||||||
RawInputDevice.RegisterDevice(HidUsageAndPage.Mouse, RawInputDeviceFlags.InputSink, _window.Handle.Handle);
|
RawInputDevice.RegisterDevice(HidUsageAndPage.Mouse, RawInputDeviceFlags.InputSink, handle.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Guid Id { get; } = new("6737b204-ffb1-4cd9-8776-9fb851db303a");
|
public static Guid Id { get; } = new("6737b204-ffb1-4cd9-8776-9fb851db303a");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Artemis.UI.Windows.Extensions;
|
||||||
using Avalonia.Controls.Platform;
|
using Avalonia.Controls.Platform;
|
||||||
using Avalonia.Platform;
|
using Avalonia.Platform;
|
||||||
using SharpVk;
|
using SharpVk;
|
||||||
@ -14,7 +15,7 @@ internal sealed class Win32VkContext : VkContext
|
|||||||
Window = PlatformManager.CreateWindow();
|
Window = PlatformManager.CreateWindow();
|
||||||
Instance = Instance.Create(null, new[] {"VK_KHR_surface", "VK_KHR_win32_surface"});
|
Instance = Instance.Create(null, new[] {"VK_KHR_surface", "VK_KHR_win32_surface"});
|
||||||
PhysicalDevice = Instance.EnumeratePhysicalDevices().First();
|
PhysicalDevice = Instance.EnumeratePhysicalDevices().First();
|
||||||
Surface = Instance.CreateWin32Surface(Kernel32.CurrentModuleHandle, Window.Handle.Handle);
|
Surface = Instance.CreateWin32Surface(Kernel32.CurrentModuleHandle, Window.GetHandle().Handle);
|
||||||
|
|
||||||
(GraphicsFamily, PresentFamily) = FindQueueFamilies();
|
(GraphicsFamily, PresentFamily) = FindQueueFamilies();
|
||||||
|
|
||||||
|
|||||||
@ -15,17 +15,17 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.0.0-preview6" />
|
||||||
<PackageReference Include="Avalonia.Controls.Skia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Controls.Skia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview7" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="DryIoc.dll" Version="5.3.4" />
|
<PackageReference Include="DryIoc.dll" Version="5.3.4" />
|
||||||
<PackageReference Include="DynamicData" Version="7.13.1" />
|
<PackageReference Include="DynamicData" Version="7.13.1" />
|
||||||
<PackageReference Include="FluentAvaloniaUI" Version="2.0.0-preview6" />
|
<PackageReference Include="FluentAvaloniaUI" Version="2.0.0-preview7" />
|
||||||
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
||||||
<PackageReference Include="Live.Avalonia" Version="1.3.1" />
|
<PackageReference Include="Live.Avalonia" Version="1.3.1" />
|
||||||
<PackageReference Include="Markdown.Avalonia.Tight" Version="11.0.0-b1" />
|
<PackageReference Include="Markdown.Avalonia.Tight" Version="11.0.0-b1" />
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
<ComboBox Classes="brush condensed"
|
<ComboBox Classes="brush condensed"
|
||||||
Width="200"
|
Width="200"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Items="{CompiledBinding Descriptors}"
|
ItemsSource="{CompiledBinding Descriptors}"
|
||||||
SelectedItem="{CompiledBinding SelectedDescriptor}"
|
SelectedItem="{CompiledBinding SelectedDescriptor}"
|
||||||
PlaceholderText="Please select a brush">
|
PlaceholderText="Please select a brush">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
|||||||
@ -18,33 +18,24 @@ public static class ProfileElementExtensions
|
|||||||
|
|
||||||
public static async Task CopyToClipboard(this Folder folder)
|
public static async Task CopyToClipboard(this Folder folder)
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
DataObject dataObject = new();
|
DataObject dataObject = new();
|
||||||
string copy = CoreJson.SerializeObject(new FolderClipboardModel(folder), true);
|
string copy = CoreJson.SerializeObject(new FolderClipboardModel(folder), true);
|
||||||
dataObject.Set(ClipboardDataFormat, copy);
|
dataObject.Set(ClipboardDataFormat, copy);
|
||||||
await Application.Current.Clipboard.SetDataObjectAsync(dataObject);
|
await Shared.UI.Clipboard.SetDataObjectAsync(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task CopyToClipboard(this Layer layer)
|
public static async Task CopyToClipboard(this Layer layer)
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
DataObject dataObject = new();
|
DataObject dataObject = new();
|
||||||
string copy = CoreJson.SerializeObject(layer.LayerEntity, true);
|
string copy = CoreJson.SerializeObject(layer.LayerEntity, true);
|
||||||
dataObject.Set(ClipboardDataFormat, copy);
|
dataObject.Set(ClipboardDataFormat, copy);
|
||||||
await Application.Current.Clipboard.SetDataObjectAsync(dataObject);
|
await Shared.UI.Clipboard.SetDataObjectAsync(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static async Task<RenderProfileElement?> PasteChildFromClipboard(this Folder parent)
|
public static async Task<RenderProfileElement?> PasteChildFromClipboard(this Folder parent)
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
byte[]? bytes = (byte[]?) await Shared.UI.Clipboard.GetDataAsync(ClipboardDataFormat);
|
||||||
return null;
|
|
||||||
|
|
||||||
byte[]? bytes = (byte[]?) await Application.Current.Clipboard.GetDataAsync(ClipboardDataFormat);
|
|
||||||
if (bytes == null!)
|
if (bytes == null!)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@ public partial class MainWindow : ReactiveAppWindow<RootViewModel>
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ApplyWindowSize();
|
ApplyWindowSize();
|
||||||
|
|
||||||
|
Shared.UI.Clipboard = GetTopLevel(this)!.Clipboard!;
|
||||||
RootPanel.LayoutUpdated += OnLayoutUpdated;
|
RootPanel.LayoutUpdated += OnLayoutUpdated;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
</Window.Styles>
|
</Window.Styles>
|
||||||
|
|
||||||
<Grid ColumnDefinitions="240,*">
|
<Grid ColumnDefinitions="240,*">
|
||||||
<ListBox Items="{CompiledBinding Items}" SelectedItem="{CompiledBinding SelectedItem}" Grid.Column="0" Margin="10">
|
<ListBox ItemsSource="{CompiledBinding Items}" SelectedItem="{CompiledBinding SelectedItem}" Grid.Column="0" Margin="10">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate x:DataType="shared:ViewModelBase">
|
<DataTemplate x:DataType="shared:ViewModelBase">
|
||||||
<TextBlock Text="{CompiledBinding DisplayName}" VerticalAlignment="Center" />
|
<TextBlock Text="{CompiledBinding DisplayName}" VerticalAlignment="Center" />
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TreeView Grid.Row="1" Items="{Binding MainDataModel.Children}">
|
<TreeView Grid.Row="1" ItemsSource="{Binding MainDataModel.Children}">
|
||||||
<TreeView.Styles>
|
<TreeView.Styles>
|
||||||
<Style Selector="TreeViewItem">
|
<Style Selector="TreeViewItem">
|
||||||
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
|
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<TextBlock Grid.Column="1" VerticalAlignment="Center" Classes="h5" Text="{Binding Plugin.Info.Name}" />
|
<TextBlock Grid.Column="1" VerticalAlignment="Center" Classes="h5" Text="{Binding Plugin.Info.Name}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ItemsControl Items="{Binding Profilers}" />
|
<ItemsControl ItemsSource="{Binding Profilers}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Classes="subtitle" Text="{Binding Profiler.Name}" Margin="10 10 0 0" />
|
<TextBlock Classes="subtitle" Text="{Binding Profiler.Name}" Margin="10 10 0 0" />
|
||||||
|
|
||||||
<DataGrid Items="{Binding Measurements}"
|
<DataGrid ItemsSource="{Binding Measurements}"
|
||||||
CanUserSortColumns="True"
|
CanUserSortColumns="True"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto">
|
||||||
<ItemsControl Items="{Binding Items}" Margin="0 0 10 0" />
|
<ItemsControl ItemsSource="{Binding Items}" Margin="0 0 10 0" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class PerformanceDebugViewModel : ActivatableViewModelBase
|
|||||||
{
|
{
|
||||||
_coreService = coreService;
|
_coreService = coreService;
|
||||||
_pluginManagementService = pluginManagementService;
|
_pluginManagementService = pluginManagementService;
|
||||||
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(500), DispatcherPriority.Normal, (_, _) => Update());
|
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(500), DispatcherPriority.Background, (_, _) => Update());
|
||||||
|
|
||||||
DisplayName = "Performance";
|
DisplayName = "Performance";
|
||||||
|
|
||||||
|
|||||||
@ -54,9 +54,9 @@
|
|||||||
|
|
||||||
<Border Grid.Column="2" Classes="card-condensed" CornerRadius="10 0 0 0" Margin="0 10 0 0" Background="#ff323232">
|
<Border Grid.Column="2" Classes="card-condensed" CornerRadius="10 0 0 0" Margin="0 10 0 0" Background="#ff323232">
|
||||||
<Panel>
|
<Panel>
|
||||||
<TabControl Items="{CompiledBinding Tabs}" IsVisible="{CompiledBinding Tabs.Count}" Padding="12">
|
<TabControl ItemsSource="{CompiledBinding Tabs}" IsVisible="{CompiledBinding Tabs.Count}" Padding="12">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="shared:ActivatableViewModelBase">
|
||||||
<TextBlock Text="{CompiledBinding DisplayName}" />
|
<TextBlock Text="{CompiledBinding DisplayName}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TabControl.ItemTemplate>
|
</TabControl.ItemTemplate>
|
||||||
|
|||||||
@ -3,29 +3,31 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
|
xmlns:device="clr-namespace:Artemis.UI.Screens.Device"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Device.DeviceInfoTabView">
|
x:Class="Artemis.UI.Screens.Device.DeviceInfoTabView"
|
||||||
|
x:DataType="device:DeviceInfoTabViewModel">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
<Grid RowDefinitions="Auto,*" ColumnDefinitions="*,*" Margin="-5">
|
<Grid RowDefinitions="Auto,*" ColumnDefinitions="*,*" Margin="-5">
|
||||||
<!-- First row -->
|
<!-- First row -->
|
||||||
<Border Classes="card" Grid.Column="0" Grid.Row="0" Margin="5">
|
<Border Classes="card" Grid.Column="0" Grid.Row="0" Margin="5">
|
||||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||||
<TextBlock FontWeight="Bold">Device name</TextBlock>
|
<TextBlock FontWeight="Bold">Device name</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.RgbDevice.DeviceInfo.DeviceName}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.RgbDevice.DeviceInfo.DeviceName}" />
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
<TextBlock FontWeight="Bold">Manufacturer</TextBlock>
|
<TextBlock FontWeight="Bold">Manufacturer</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.RgbDevice.DeviceInfo.Manufacturer}" />
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
|
|
||||||
<TextBlock FontWeight="Bold">Device type</TextBlock>
|
<TextBlock FontWeight="Bold">Device type</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.DeviceType}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.DeviceType}" />
|
||||||
<Border Classes="card-separator" IsVisible="{Binding IsKeyboard}" />
|
<Border Classes="card-separator" IsVisible="{CompiledBinding IsKeyboard}" />
|
||||||
|
|
||||||
<StackPanel IsVisible="{Binding IsKeyboard}">
|
<StackPanel IsVisible="{CompiledBinding IsKeyboard}">
|
||||||
<TextBlock FontWeight="Bold">Physical layout</TextBlock>
|
<TextBlock FontWeight="Bold">Physical layout</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.PhysicalLayout}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.PhysicalLayout}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
@ -33,20 +35,20 @@
|
|||||||
<Border Classes="card" Grid.Row="0" Grid.Column="1" Margin="5">
|
<Border Classes="card" Grid.Row="0" Grid.Column="1" Margin="5">
|
||||||
<StackPanel VerticalAlignment="Top">
|
<StackPanel VerticalAlignment="Top">
|
||||||
<TextBlock FontWeight="Bold">Size (1px = 1mm)</TextBlock>
|
<TextBlock FontWeight="Bold">Size (1px = 1mm)</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.RgbDevice.Size}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.RgbDevice.Size}" />
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
<TextBlock FontWeight="Bold">Location (1px = 1mm)</TextBlock>
|
<TextBlock FontWeight="Bold">Location (1px = 1mm)</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.RgbDevice.Location}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.RgbDevice.Location}" />
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
<TextBlock FontWeight="Bold">Rotation (degrees)</TextBlock>
|
<TextBlock FontWeight="Bold">Rotation (degrees)</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.RgbDevice.Rotation.Degrees}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.RgbDevice.Rotation.Degrees}" />
|
||||||
<Border Classes="card-separator" IsVisible="{Binding IsKeyboard}" />
|
<Border Classes="card-separator" IsVisible="{CompiledBinding IsKeyboard}" />
|
||||||
|
|
||||||
<StackPanel IsVisible="{Binding IsKeyboard}">
|
<StackPanel IsVisible="{CompiledBinding IsKeyboard}">
|
||||||
<TextBlock FontWeight="Bold">Logical layout</TextBlock>
|
<TextBlock FontWeight="Bold">Logical layout</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.LogicalLayout}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.LogicalLayout}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
@ -59,14 +61,13 @@
|
|||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
Classes="icon-button"
|
Classes="icon-button"
|
||||||
ToolTip.Tip="Copy path to clipboard"
|
ToolTip.Tip="Copy path to clipboard"
|
||||||
Command="{Binding CopyToClipboard}"
|
Click="LayoutPathButton_OnClick">
|
||||||
CommandParameter="{Binding DefaultLayoutPath}">
|
|
||||||
<avalonia:MaterialIcon Kind="ContentCopy" Width="18" Height="18" />
|
<avalonia:MaterialIcon Kind="ContentCopy" Width="18" Height="18" />
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Text="{Binding DefaultLayoutPath}" />
|
Text="{CompiledBinding DefaultLayoutPath}" />
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*,Auto">
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
@ -74,12 +75,11 @@
|
|||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
Classes="icon-button"
|
Classes="icon-button"
|
||||||
ToolTip.Tip="Copy path to clipboard"
|
ToolTip.Tip="Copy path to clipboard"
|
||||||
Command="{Binding CopyToClipboard}"
|
Click="ImagePathButton_OnClick">
|
||||||
CommandParameter="{Binding Device.Layout.Image.LocalPath}">
|
|
||||||
<avalonia:MaterialIcon Kind="ContentCopy" Width="18" Height="18" />
|
<avalonia:MaterialIcon Kind="ContentCopy" Width="18" Height="18" />
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Device.Layout.Image.LocalPath}" />
|
<TextBlock TextWrapping="Wrap" Text="{CompiledBinding Device.Layout.Image.LocalPath}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
@ -10,4 +12,13 @@ public partial class DeviceInfoTabView : ReactiveUserControl<DeviceInfoTabViewMo
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LayoutPathButton_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel.DefaultLayoutPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImagePathButton_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel.Device.Layout.Image.LocalPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -3,6 +3,7 @@ using Artemis.Core;
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services;
|
using Artemis.UI.Shared.Services;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device;
|
namespace Artemis.UI.Screens.Device;
|
||||||
@ -25,13 +26,4 @@ public class DeviceInfoTabViewModel : ActivatableViewModelBase
|
|||||||
public ArtemisDevice Device { get; }
|
public ArtemisDevice Device { get; }
|
||||||
|
|
||||||
public string DefaultLayoutPath { get; }
|
public string DefaultLayoutPath { get; }
|
||||||
|
|
||||||
public async Task CopyToClipboard(string content)
|
|
||||||
{
|
|
||||||
if (Application.Current?.Clipboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
await Application.Current.Clipboard.SetTextAsync(content);
|
|
||||||
_notificationService.CreateNotification().WithMessage("Copied path to clipboard.").Show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<converters:LedIdToStringConverter x:Key="LedIdToStringConverter" />
|
<converters:LedIdToStringConverter x:Key="LedIdToStringConverter" />
|
||||||
<shared:ToStringConverter x:Key="ToStringConverter" />
|
<shared:ToStringConverter x:Key="ToStringConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<DataGrid Items="{CompiledBinding LedViewModels}" CanUserSortColumns="True" AutoGenerateColumns="False">
|
<DataGrid ItemsSource="{CompiledBinding LedViewModels}" CanUserSortColumns="True" AutoGenerateColumns="False">
|
||||||
<DataGrid.Columns >
|
<DataGrid.Columns >
|
||||||
<DataGridTemplateColumn CanUserSort="False" CanUserReorder="False" Header="Highlight">
|
<DataGridTemplateColumn CanUserSort="False" CanUserReorder="False" Header="Highlight">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<AutoCompleteBox HorizontalAlignment="Stretch"
|
<AutoCompleteBox HorizontalAlignment="Stretch"
|
||||||
Items="{CompiledBinding Regions}"
|
ItemsSource="{CompiledBinding Regions}"
|
||||||
SelectedItem="{CompiledBinding SelectedRegion}"
|
SelectedItem="{CompiledBinding SelectedRegion}"
|
||||||
ValueMemberBinding="{Binding EnglishName}"
|
ValueMemberBinding="{Binding EnglishName}"
|
||||||
Watermark="Enter keyboard country name"
|
Watermark="Enter keyboard country name"
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DataGrid Grid.Row="2"
|
<DataGrid Grid.Row="2"
|
||||||
Items="{CompiledBinding InputMappings}"
|
ItemsSource="{CompiledBinding InputMappings}"
|
||||||
CanUserSortColumns="True"
|
CanUserSortColumns="True"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<ListBox Grid.Row="0"
|
<ListBox Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Items="{CompiledBinding Prerequisites}"
|
ItemsSource="{CompiledBinding Prerequisites}"
|
||||||
SelectedItem="{CompiledBinding ActivePrerequisite, Mode=OneWay}"
|
SelectedItem="{CompiledBinding ActivePrerequisite, Mode=OneWay}"
|
||||||
IsHitTestVisible="False">
|
IsHitTestVisible="False">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<ListBox Grid.Row="0"
|
<ListBox Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Items="{CompiledBinding Prerequisites}"
|
ItemsSource="{CompiledBinding Prerequisites}"
|
||||||
SelectedItem="{CompiledBinding ActivePrerequisite, Mode=OneWay}"
|
SelectedItem="{CompiledBinding ActivePrerequisite, Mode=OneWay}"
|
||||||
IsHitTestVisible="False">
|
IsHitTestVisible="False">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<Border Grid.Column="1" BorderBrush="{DynamicResource ButtonBorderBrush}" BorderThickness="1 0 0 0" Margin="10 0 0 0" Padding="10 0 0 0">
|
<Border Grid.Column="1" BorderBrush="{DynamicResource ButtonBorderBrush}" BorderThickness="1 0 0 0" Margin="10 0 0 0" Padding="10 0 0 0">
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
<TextBlock Classes="h5">Plugin features</TextBlock>
|
<TextBlock Classes="h5">Plugin features</TextBlock>
|
||||||
<ListBox Grid.Row="1" MaxHeight="135" Items="{CompiledBinding PluginFeatures}" />
|
<ListBox Grid.Row="1" MaxHeight="135" ItemsSource="{CompiledBinding PluginFeatures}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<TextBlock Grid.Column="1" Grid.Row="0" Classes="h5 no-margin" Text="{CompiledBinding Plugin.Info.Name}" />
|
<TextBlock Grid.Column="1" Grid.Row="0" Classes="h5 no-margin" Text="{CompiledBinding Plugin.Info.Name}" />
|
||||||
|
|
||||||
<ItemsControl Grid.Column="2" Grid.Row="0" IsVisible="{CompiledBinding Platforms.Count}" Items="{CompiledBinding Platforms}" HorizontalAlignment="Right">
|
<ItemsControl Grid.Column="2" Grid.Row="0" IsVisible="{CompiledBinding Platforms.Count}" ItemsSource="{CompiledBinding Platforms}" HorizontalAlignment="Right">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Spacing="5" Orientation="Horizontal" />
|
<StackPanel Spacing="5" Orientation="Horizontal" />
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Classes="condition-type"
|
Classes="condition-type"
|
||||||
PlaceholderText="Select an activation type"
|
PlaceholderText="Select an activation type"
|
||||||
Items="{CompiledBinding ConditionTypeViewModels}"
|
ItemsSource="{CompiledBinding ConditionTypeViewModels}"
|
||||||
IsEnabled="{CompiledBinding ProfileElement, Converter={x:Static ObjectConverters.IsNotNull}}"
|
IsEnabled="{CompiledBinding ProfileElement, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
SelectedItem="{CompiledBinding SelectedConditionTypeViewModel}"
|
SelectedItem="{CompiledBinding SelectedConditionTypeViewModel}"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
|
|||||||
@ -55,11 +55,11 @@ public class PlaybackViewModel : ActivatableViewModelBase
|
|||||||
_keyBindingsEnabled = Shared.UI.KeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
_keyBindingsEnabled = Shared.UI.KeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
||||||
|
|
||||||
_lastUpdate = DateTime.MinValue;
|
_lastUpdate = DateTime.MinValue;
|
||||||
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(60.0 / 1000), DispatcherPriority.Render, Update);
|
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(60.0 / 1000), DispatcherPriority.Background, Update);
|
||||||
updateTimer.Start();
|
updateTimer.Start();
|
||||||
Disposable.Create(() =>
|
Disposable.Create(() =>
|
||||||
{
|
{
|
||||||
updateTimer.Stop();
|
// updateTimer.Stop();
|
||||||
_settingsService.GetSetting("ProfileEditor.RepeatTimeline", true).Value = _repeating && _repeatTimeline;
|
_settingsService.GetSetting("ProfileEditor.RepeatTimeline", true).Value = _repeating && _repeatTimeline;
|
||||||
_settingsService.GetSetting("ProfileEditor.RepeatSegment", false).Value = _repeating && _repeatSegment;
|
_settingsService.GetSetting("ProfileEditor.RepeatSegment", false).Value = _repeating && _repeatSegment;
|
||||||
}).DisposeWith(d);
|
}).DisposeWith(d);
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<Border Grid.Row="1" Classes="card" Margin="0 15">
|
<Border Grid.Row="1" Classes="card" Margin="0 15">
|
||||||
<Panel>
|
<Panel>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" IsVisible="{CompiledBinding AdaptionHints.Count}">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" IsVisible="{CompiledBinding AdaptionHints.Count}">
|
||||||
<ItemsControl Items="{CompiledBinding AdaptionHints}" Classes="adaption-hints">
|
<ItemsControl ItemsSource="{CompiledBinding AdaptionHints}" Classes="adaption-hints">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Spacing="10" />
|
<StackPanel Spacing="10" />
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
<Grid RowDefinitions="*,Auto">
|
<Grid RowDefinitions="*,Auto">
|
||||||
<TreeView Name="Profile" Classes="no-right-margin draggable"
|
<TreeView Name="Profile" Classes="no-right-margin draggable"
|
||||||
Items="{CompiledBinding Children}"
|
ItemsSource="{CompiledBinding Children}"
|
||||||
SelectedItem="{CompiledBinding SelectedChild}"
|
SelectedItem="{CompiledBinding SelectedChild}"
|
||||||
SelectionChanged="ProfileTreeView_OnSelectionChanged">
|
SelectionChanged="ProfileTreeView_OnSelectionChanged">
|
||||||
<TreeView.Styles>
|
<TreeView.Styles>
|
||||||
|
|||||||
@ -256,15 +256,9 @@ public abstract class TreeItemViewModel : ActivatableViewModelBase
|
|||||||
|
|
||||||
private async void UpdateCanPaste(bool isFlyoutOpen)
|
private async void UpdateCanPaste(bool isFlyoutOpen)
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
string[] formats = await Shared.UI.Clipboard.GetFormatsAsync();
|
||||||
{
|
|
||||||
CanPaste = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] formats = await Application.Current.Clipboard.GetFormatsAsync();
|
|
||||||
//diogotr7: This can be null on Linux sometimes. I'm not sure why.
|
//diogotr7: This can be null on Linux sometimes. I'm not sure why.
|
||||||
if (formats == null)
|
if (formats == null!)
|
||||||
{
|
{
|
||||||
CanPaste = false;
|
CanPaste = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search" />
|
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search" />
|
||||||
<ListBox Name="EffectDescriptorsList"
|
<ListBox Name="EffectDescriptorsList"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Items="{CompiledBinding LayerEffectDescriptors}"
|
ItemsSource="{CompiledBinding LayerEffectDescriptors}"
|
||||||
IsVisible="{CompiledBinding LayerEffectDescriptors.Count}"
|
IsVisible="{CompiledBinding LayerEffectDescriptors.Count}"
|
||||||
Height="300">
|
Height="300">
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
Name="TreeScrollViewer"
|
Name="TreeScrollViewer"
|
||||||
Offset="{CompiledBinding #TimelineScrollViewer.Offset, Mode=OneWay}">
|
Offset="{CompiledBinding #TimelineScrollViewer.Offset, Mode=OneWay}">
|
||||||
<Grid RowDefinitions="*,Auto">
|
<Grid RowDefinitions="*,Auto">
|
||||||
<ItemsControl Items="{CompiledBinding PropertyGroupViewModels}" Padding="0 0 8 0">
|
<ItemsControl ItemsSource="{CompiledBinding PropertyGroupViewModels}" Padding="0 0 8 0">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<TreeDataTemplate DataType="{x:Type local:PropertyGroupViewModel}" ItemsSource="{CompiledBinding Children}">
|
<TreeDataTemplate DataType="{x:Type local:PropertyGroupViewModel}" ItemsSource="{CompiledBinding Children}">
|
||||||
<ContentControl Content="{CompiledBinding TreeGroupViewModel}" />
|
<ContentControl Content="{CompiledBinding TreeGroupViewModel}" />
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
</Ellipse.Transitions>
|
</Ellipse.Transitions>
|
||||||
<Ellipse.ContextFlyout>
|
<Ellipse.ContextFlyout>
|
||||||
<MenuFlyout Opening="FlyoutBase_OnOpening">
|
<MenuFlyout Opening="FlyoutBase_OnOpening">
|
||||||
<MenuItem Header="Easing" Items="{Binding EasingViewModels}">
|
<MenuItem Header="Easing" ItemsSource="{Binding EasingViewModels}">
|
||||||
<MenuItem.Styles>
|
<MenuItem.Styles>
|
||||||
<Style Selector="MenuItem > MenuItem">
|
<Style Selector="MenuItem > MenuItem">
|
||||||
<Setter Property="Icon">
|
<Setter Property="Icon">
|
||||||
|
|||||||
@ -150,9 +150,6 @@ public class TimelineKeyframeViewModel<T> : ActivatableViewModelBase, ITimelineK
|
|||||||
|
|
||||||
private async Task ExecuteCopy()
|
private async Task ExecuteCopy()
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
List<KeyframeClipboardModel> keyframes = new();
|
List<KeyframeClipboardModel> keyframes = new();
|
||||||
if (!IsSelected)
|
if (!IsSelected)
|
||||||
keyframes.Add(new KeyframeClipboardModel(Keyframe));
|
keyframes.Add(new KeyframeClipboardModel(Keyframe));
|
||||||
@ -162,15 +159,12 @@ public class TimelineKeyframeViewModel<T> : ActivatableViewModelBase, ITimelineK
|
|||||||
string copy = CoreJson.SerializeObject(keyframes, true);
|
string copy = CoreJson.SerializeObject(keyframes, true);
|
||||||
DataObject dataObject = new();
|
DataObject dataObject = new();
|
||||||
dataObject.Set(KeyframeClipboardModel.ClipboardDataFormat, copy);
|
dataObject.Set(KeyframeClipboardModel.ClipboardDataFormat, copy);
|
||||||
await Application.Current.Clipboard.SetDataObjectAsync(dataObject);
|
await Shared.UI.Clipboard.SetDataObjectAsync(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ExecutePaste()
|
private async Task ExecutePaste()
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
List<KeyframeClipboardModel>? keyframes = await Shared.UI.Clipboard.GetJsonAsync<List<KeyframeClipboardModel>>(KeyframeClipboardModel.ClipboardDataFormat);
|
||||||
return;
|
|
||||||
|
|
||||||
List<KeyframeClipboardModel>? keyframes = await Application.Current.Clipboard.GetJsonAsync<List<KeyframeClipboardModel>>(KeyframeClipboardModel.ClipboardDataFormat);
|
|
||||||
if (keyframes == null)
|
if (keyframes == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -201,13 +195,7 @@ public class TimelineKeyframeViewModel<T> : ActivatableViewModelBase, ITimelineK
|
|||||||
|
|
||||||
private async void UpdateCanPaste(bool isFlyoutOpen)
|
private async void UpdateCanPaste(bool isFlyoutOpen)
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
string[] formats = await Shared.UI.Clipboard.GetFormatsAsync();
|
||||||
{
|
|
||||||
CanPaste = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] formats = await Application.Current.Clipboard.GetFormatsAsync();
|
|
||||||
CanPaste = formats.Contains("Artemis.Keyframes");
|
CanPaste = formats.Contains("Artemis.Keyframes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<ItemsControl Grid.Row="0"
|
<ItemsControl Grid.Row="0"
|
||||||
Height="28"
|
Height="28"
|
||||||
IsVisible="{CompiledBinding !PropertyGroupViewModel.IsExpanded}"
|
IsVisible="{CompiledBinding !PropertyGroupViewModel.IsExpanded}"
|
||||||
Items="{CompiledBinding KeyframePositions}"
|
ItemsSource="{CompiledBinding KeyframePositions}"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<Rectangle Grid.Row="1" HorizontalAlignment="Stretch" Fill="{DynamicResource ButtonBorderBrush}" Height="1" />
|
<Rectangle Grid.Row="1" HorizontalAlignment="Stretch" Fill="{DynamicResource ButtonBorderBrush}" Height="1" />
|
||||||
|
|
||||||
<ItemsControl Grid.Row="2"
|
<ItemsControl Grid.Row="2"
|
||||||
Items="{CompiledBinding Children}"
|
ItemsSource="{CompiledBinding Children}"
|
||||||
IsVisible="{CompiledBinding PropertyGroupViewModel.IsExpanded}"
|
IsVisible="{CompiledBinding PropertyGroupViewModel.IsExpanded}"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<ItemsControl.DataTemplates>
|
<ItemsControl.DataTemplates>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.ProfileEditor.Properties.Timeline.TimelinePropertyView">
|
x:Class="Artemis.UI.Screens.ProfileEditor.Properties.Timeline.TimelinePropertyView">
|
||||||
<Border Height="29" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ButtonBorderBrush}">
|
<Border Height="29" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ButtonBorderBrush}">
|
||||||
<ItemsControl Items="{Binding KeyframeViewModels}">
|
<ItemsControl ItemsSource="{Binding KeyframeViewModels}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<Canvas />
|
<Canvas />
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<KeyBinding Command="{CompiledBinding PasteKeyframes}" Gesture="Ctrl+V" />
|
<KeyBinding Command="{CompiledBinding PasteKeyframes}" Gesture="Ctrl+V" />
|
||||||
<KeyBinding Command="{CompiledBinding DeleteSelectedKeyframes}" Gesture="Delete" />
|
<KeyBinding Command="{CompiledBinding DeleteSelectedKeyframes}" Gesture="Delete" />
|
||||||
</Grid.KeyBindings>
|
</Grid.KeyBindings>
|
||||||
<ItemsControl Items="{CompiledBinding PropertyGroupViewModels}">
|
<ItemsControl ItemsSource="{CompiledBinding PropertyGroupViewModels}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<TreeDataTemplate DataType="{x:Type local:PropertyGroupViewModel}" ItemsSource="{CompiledBinding Children}">
|
<TreeDataTemplate DataType="{x:Type local:PropertyGroupViewModel}" ItemsSource="{CompiledBinding Children}">
|
||||||
<ContentControl Content="{CompiledBinding TimelineGroupViewModel}" />
|
<ContentControl Content="{CompiledBinding TimelineGroupViewModel}" />
|
||||||
|
|||||||
@ -169,10 +169,10 @@ public class TimelineViewModel : ActivatableViewModelBase
|
|||||||
|
|
||||||
private async Task ExecutePasteKeyframes()
|
private async Task ExecutePasteKeyframes()
|
||||||
{
|
{
|
||||||
if (_profileElement == null || Application.Current?.Clipboard == null)
|
if (_profileElement == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
List<KeyframeClipboardModel>? keyframes = await Application.Current.Clipboard.GetJsonAsync<List<KeyframeClipboardModel>>(KeyframeClipboardModel.ClipboardDataFormat);
|
List<KeyframeClipboardModel>? keyframes = await Shared.UI.Clipboard.GetJsonAsync<List<KeyframeClipboardModel>>(KeyframeClipboardModel.ClipboardDataFormat);
|
||||||
if (keyframes == null)
|
if (keyframes == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search" />
|
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search" />
|
||||||
<ListBox Name="EffectDescriptorsList"
|
<ListBox Name="EffectDescriptorsList"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Items="{CompiledBinding Presets}"
|
ItemsSource="{CompiledBinding Presets}"
|
||||||
IsVisible="{CompiledBinding Presets.Count}"
|
IsVisible="{CompiledBinding Presets.Count}"
|
||||||
Height="300">
|
Height="300">
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,7 @@
|
|||||||
Do not bind directly to the PropertyGroupViewModel.Children collection
|
Do not bind directly to the PropertyGroupViewModel.Children collection
|
||||||
Instead use a reference provided by the VM that is null when collapsed, virtualization for noobs
|
Instead use a reference provided by the VM that is null when collapsed, virtualization for noobs
|
||||||
-->
|
-->
|
||||||
<ItemsControl Items="{CompiledBinding Children}"
|
<ItemsControl ItemsSource="{CompiledBinding Children}"
|
||||||
IsVisible="{CompiledBinding PropertyGroupViewModel.IsExpanded}"
|
IsVisible="{CompiledBinding PropertyGroupViewModel.IsExpanded}"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<ItemsControl.DataTemplates>
|
<ItemsControl.DataTemplates>
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
</Grid.Transitions>
|
</Grid.Transitions>
|
||||||
|
|
||||||
<!-- The bottom layer consists of devices -->
|
<!-- The bottom layer consists of devices -->
|
||||||
<ItemsControl Name="DevicesContainer" Items="{CompiledBinding Devices}" ClipToBounds="False">
|
<ItemsControl Name="DevicesContainer" ItemsSource="{CompiledBinding Devices}" ClipToBounds="False">
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.Styles>
|
||||||
<Style Selector="ContentPresenter">
|
<Style Selector="ContentPresenter">
|
||||||
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<!-- The middle layer contains visualizers -->
|
<!-- The middle layer contains visualizers -->
|
||||||
<ItemsControl Items="{CompiledBinding Visualizers}" ClipToBounds="False" IsVisible="{CompiledBinding !SuspendedEditing}">
|
<ItemsControl ItemsSource="{CompiledBinding Visualizers}" ClipToBounds="False" IsVisible="{CompiledBinding !SuspendedEditing}">
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.Styles>
|
||||||
<Style Selector="ContentPresenter">
|
<Style Selector="ContentPresenter">
|
||||||
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<!-- The top layer contains tools -->
|
<!-- The top layer contains tools -->
|
||||||
<ItemsControl Items="{CompiledBinding Tools}" ClipToBounds="False" IsVisible="{CompiledBinding !SuspendedEditing}">
|
<ItemsControl ItemsSource="{CompiledBinding Tools}" ClipToBounds="False" IsVisible="{CompiledBinding !SuspendedEditing}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<Grid />
|
<Grid />
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
<Border Grid.Row="0" Classes="card" Padding="0" Margin="4 0 4 4" ClipToBounds="True">
|
<Border Grid.Row="0" Classes="card" Padding="0" Margin="4 0 4 4" ClipToBounds="True">
|
||||||
<Grid ColumnDefinitions="Auto,*">
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
<Border Grid.Column="0">
|
<Border Grid.Column="0">
|
||||||
<ItemsControl Items="{CompiledBinding Tools}">
|
<ItemsControl ItemsSource="{CompiledBinding Tools}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="shared:IToolViewModel">
|
<DataTemplate DataType="shared:IToolViewModel">
|
||||||
<ToggleButton Classes="icon-button editor-sidebar-button"
|
<ToggleButton Classes="icon-button editor-sidebar-button"
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:dialogs="clr-namespace:Artemis.UI.Screens.Scripting.Dialogs"
|
xmlns:dialogs="clr-namespace:Artemis.UI.Screens.Scripting.Dialogs"
|
||||||
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
||||||
|
xmlns:scriptingProviders="clr-namespace:Artemis.Core.ScriptingProviders;assembly=Artemis.Core"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Scripting.Dialogs.ScriptConfigurationCreateView"
|
x:Class="Artemis.UI.Screens.Scripting.Dialogs.ScriptConfigurationCreateView"
|
||||||
x:DataType="dialogs:ScriptConfigurationCreateViewModel">
|
x:DataType="dialogs:ScriptConfigurationCreateViewModel">
|
||||||
@ -12,14 +13,14 @@
|
|||||||
<TextBlock Classes="label" Margin="0 5">Script name</TextBlock>
|
<TextBlock Classes="label" Margin="0 5">Script name</TextBlock>
|
||||||
<TextBox Watermark="Name" Text="{CompiledBinding ScriptName}" />
|
<TextBox Watermark="Name" Text="{CompiledBinding ScriptName}" />
|
||||||
<TextBlock Classes="label" Margin="0 5">Script type</TextBlock>
|
<TextBlock Classes="label" Margin="0 5">Script type</TextBlock>
|
||||||
<ComboBox SelectedItem="{CompiledBinding SelectedScriptingProvider}" Items="{CompiledBinding ScriptingProviders}" HorizontalAlignment="Stretch">
|
<ComboBox SelectedItem="{CompiledBinding SelectedScriptingProvider}" ItemsSource="{CompiledBinding ScriptingProviders}" HorizontalAlignment="Stretch">
|
||||||
<ComboBox.ItemsPanel>
|
<ComboBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel />
|
<VirtualizingStackPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ComboBox.ItemsPanel>
|
</ComboBox.ItemsPanel>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="scriptingProviders:ScriptingProvider">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<shared:ArtemisIcon Icon="{CompiledBinding Plugin.Info.ResolvedIcon}" Width="16" Height="16" Margin="0 0 5 0" />
|
<shared:ArtemisIcon Icon="{CompiledBinding Plugin.Info.ResolvedIcon}" Width="16" Height="16" Margin="0 0 5 0" />
|
||||||
<TextBlock Text="{CompiledBinding LanguageName}" />
|
<TextBlock Text="{CompiledBinding LanguageName}" />
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<DockPanel>
|
<DockPanel>
|
||||||
<ScrollViewer DockPanel.Dock="Left" VerticalScrollBarVisibility="Auto" Width="300" Margin="10">
|
<ScrollViewer DockPanel.Dock="Left" VerticalScrollBarVisibility="Auto" Width="300" Margin="10">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<ListBox Items="{CompiledBinding ScriptConfigurations}" SelectedItem="{CompiledBinding SelectedScript}">
|
<ListBox ItemsSource="{CompiledBinding ScriptConfigurations}" SelectedItem="{CompiledBinding SelectedScript}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate DataType="{x:Type scripting:ScriptConfigurationViewModel}">
|
<DataTemplate DataType="{x:Type scripting:ScriptConfigurationViewModel}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto" RowDefinitions="*,*" Margin="4">
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto" RowDefinitions="*,*" Margin="4">
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
x:Class="Artemis.UI.Screens.Settings.SettingsView"
|
x:Class="Artemis.UI.Screens.Settings.SettingsView"
|
||||||
x:DataType="settings:SettingsViewModel">
|
x:DataType="settings:SettingsViewModel">
|
||||||
<Border Classes="router-container">
|
<Border Classes="router-container">
|
||||||
<TabControl Margin="12" Items="{CompiledBinding SettingTabs}" SelectedItem="{CompiledBinding SelectedTab}">
|
<TabControl Margin="12" ItemsSource="{CompiledBinding SettingTabs}" SelectedItem="{CompiledBinding SelectedTab}">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding DisplayName}" />
|
<TextBlock Text="{Binding DisplayName}" />
|
||||||
|
|||||||
@ -2,8 +2,10 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:settings="clr-namespace:Artemis.UI.Screens.Settings"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Settings.DevicesTabView">
|
x:Class="Artemis.UI.Screens.Settings.DevicesTabView"
|
||||||
|
x:DataType="settings:DevicesTabViewModel">
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
<StackPanel MaxWidth="1050">
|
<StackPanel MaxWidth="1050">
|
||||||
<TextBlock Classes="h4">Device management</TextBlock>
|
<TextBlock Classes="h4">Device management</TextBlock>
|
||||||
@ -16,7 +18,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
<ItemsControl Items="{Binding Devices}" Margin="-5 0" MaxWidth="1050">
|
<ItemsControl ItemsSource="{CompiledBinding Devices}" Margin="-5 0" MaxWidth="1050">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel />
|
<WrapPanel />
|
||||||
|
|||||||
@ -238,7 +238,7 @@
|
|||||||
<ComboBox Classes="brush"
|
<ComboBox Classes="brush"
|
||||||
Width="200"
|
Width="200"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Items="{CompiledBinding LayerBrushDescriptors}"
|
ItemsSource="{CompiledBinding LayerBrushDescriptors}"
|
||||||
SelectedItem="{CompiledBinding SelectedLayerBrushDescriptor}">
|
SelectedItem="{CompiledBinding SelectedLayerBrushDescriptor}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate DataType="{x:Type layerBrushes:LayerBrushDescriptor}">
|
<DataTemplate DataType="{x:Type layerBrushes:LayerBrushDescriptor}">
|
||||||
@ -279,7 +279,7 @@
|
|||||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||||
<ComboBox Width="150"
|
<ComboBox Width="150"
|
||||||
SelectedItem="{CompiledBinding CorePreferredGraphicsContext.Value}"
|
SelectedItem="{CompiledBinding CorePreferredGraphicsContext.Value}"
|
||||||
Items="{CompiledBinding GraphicsContexts}" />
|
ItemsSource="{CompiledBinding GraphicsContexts}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
@ -296,9 +296,9 @@
|
|||||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||||
<ComboBox Width="150"
|
<ComboBox Width="150"
|
||||||
SelectedItem="{CompiledBinding SelectedRenderScale}"
|
SelectedItem="{CompiledBinding SelectedRenderScale}"
|
||||||
Items="{CompiledBinding RenderScales}">
|
ItemsSource="{CompiledBinding RenderScales}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="settings:RenderSettingViewModel">
|
||||||
<TextBlock Text="{CompiledBinding Display}" />
|
<TextBlock Text="{CompiledBinding Display}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
@ -322,9 +322,9 @@
|
|||||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||||
<ComboBox Width="150"
|
<ComboBox Width="150"
|
||||||
SelectedItem="{CompiledBinding SelectedTargetFrameRate}"
|
SelectedItem="{CompiledBinding SelectedTargetFrameRate}"
|
||||||
Items="{CompiledBinding TargetFrameRates}">
|
ItemsSource="{CompiledBinding TargetFrameRates}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="settings:RenderSettingViewModel">
|
||||||
<TextBlock Text="{CompiledBinding Display}" />
|
<TextBlock Text="{CompiledBinding Display}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" VerticalAlignment="Top">
|
<ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" VerticalAlignment="Top">
|
||||||
<ItemsRepeater Items="{CompiledBinding Plugins}" MaxWidth="900" VerticalAlignment="Center">
|
<ItemsRepeater ItemsSource="{CompiledBinding Plugins}" MaxWidth="900" VerticalAlignment="Center">
|
||||||
<ItemsRepeater.ItemTemplate>
|
<ItemsRepeater.ItemTemplate>
|
||||||
<DataTemplate x:DataType="plugins:PluginSettingsViewModel">
|
<DataTemplate x:DataType="plugins:PluginSettingsViewModel">
|
||||||
<ContentControl Content="{CompiledBinding}" Height="200"/>
|
<ContentControl Content="{CompiledBinding}" Height="200"/>
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<Grid ColumnDefinitions="300,*" Margin="0 10" IsVisible="{CompiledBinding ReleaseViewModels.Count}">
|
<Grid ColumnDefinitions="300,*" Margin="0 10" IsVisible="{CompiledBinding ReleaseViewModels.Count}">
|
||||||
<Border Classes="card-condensed" Grid.Column="0" Margin="0 0 10 0">
|
<Border Classes="card-condensed" Grid.Column="0" Margin="0 0 10 0">
|
||||||
<ListBox Items="{CompiledBinding ReleaseViewModels}" SelectedItem="{CompiledBinding SelectedReleaseViewModel}">
|
<ListBox ItemsSource="{CompiledBinding ReleaseViewModels}" SelectedItem="{CompiledBinding SelectedReleaseViewModel}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate x:DataType="updating:ReleaseViewModel">
|
<DataTemplate x:DataType="updating:ReleaseViewModel">
|
||||||
<Panel>
|
<Panel>
|
||||||
|
|||||||
@ -23,7 +23,7 @@ public class ModuleActivationRequirementViewModel : ActivatableViewModelBase
|
|||||||
|
|
||||||
this.WhenActivated(d =>
|
this.WhenActivated(d =>
|
||||||
{
|
{
|
||||||
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(500), DispatcherPriority.Normal, Update);
|
_updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(500), DispatcherPriority.Background, Update);
|
||||||
_updateTimer.Start();
|
_updateTimer.Start();
|
||||||
|
|
||||||
Disposable.Create(() =>
|
Disposable.Create(() =>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock TextWrapping="Wrap">These requirements allow the module creator to decide when the data is available to your profile you cannot override them.</TextBlock>
|
<TextBlock TextWrapping="Wrap">These requirements allow the module creator to decide when the data is available to your profile you cannot override them.</TextBlock>
|
||||||
|
|
||||||
<ItemsControl Items="{CompiledBinding ActivationRequirements}" />
|
<ItemsControl ItemsSource="{CompiledBinding ActivationRequirements}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@ -46,14 +46,14 @@
|
|||||||
<TextBlock Classes="label">Profile name</TextBlock>
|
<TextBlock Classes="label">Profile name</TextBlock>
|
||||||
<TextBox Watermark="Name" Text="{CompiledBinding ProfileName}" />
|
<TextBox Watermark="Name" Text="{CompiledBinding ProfileName}" />
|
||||||
<TextBlock Classes="label">Module</TextBlock>
|
<TextBlock Classes="label">Module</TextBlock>
|
||||||
<ComboBox SelectedItem="{CompiledBinding SelectedModule}" IsEnabled="{CompiledBinding Modules.Count}" Items="{CompiledBinding Modules}" HorizontalAlignment="Stretch">
|
<ComboBox SelectedItem="{CompiledBinding SelectedModule}" IsEnabled="{CompiledBinding Modules.Count}" ItemsSource="{CompiledBinding Modules}" HorizontalAlignment="Stretch">
|
||||||
<ComboBox.ItemsPanel>
|
<ComboBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel />
|
<VirtualizingStackPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ComboBox.ItemsPanel>
|
</ComboBox.ItemsPanel>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="local:ProfileModuleViewModel">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<shared:ArtemisIcon Icon="{CompiledBinding Icon, FallbackValue='Close'}" Width="16" Height="16" Margin="0 0 5 0" />
|
<shared:ArtemisIcon Icon="{CompiledBinding Icon, FallbackValue='Close'}" Width="16" Height="16" Margin="0 0 5 0" />
|
||||||
<TextBlock Text="{CompiledBinding Name, FallbackValue='None'}" />
|
<TextBlock Text="{CompiledBinding Name, FallbackValue='None'}" />
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<Border Background="{DynamicResource CheckerboardBrush}" CornerRadius="{DynamicResource CardCornerRadius}" Width="78" Height="78">
|
<Border Background="{DynamicResource CheckerboardBrush}" CornerRadius="{DynamicResource CardCornerRadius}" Width="78" Height="78">
|
||||||
<avalonia:MaterialIcon Kind="{CompiledBinding SelectedMaterialIcon.Icon}" Width="45" Height="45" />
|
<avalonia:MaterialIcon Kind="{CompiledBinding SelectedMaterialIcon.Icon}" Width="45" Height="45" />
|
||||||
</Border>
|
</Border>
|
||||||
<ComboBox Items="{CompiledBinding MaterialIcons}"
|
<ComboBox ItemsSource="{CompiledBinding MaterialIcons}"
|
||||||
SelectedItem="{CompiledBinding SelectedMaterialIcon}"
|
SelectedItem="{CompiledBinding SelectedMaterialIcon}"
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
IsTextSearchEnabled="True"
|
IsTextSearchEnabled="True"
|
||||||
|
|||||||
@ -218,7 +218,7 @@
|
|||||||
<Panel Grid.Row="1" IsVisible="{CompiledBinding !IsCollapsed}">
|
<Panel Grid.Row="1" IsVisible="{CompiledBinding !IsCollapsed}">
|
||||||
<ListBox Name="SidebarListBox"
|
<ListBox Name="SidebarListBox"
|
||||||
Classes="sidebar-listbox"
|
Classes="sidebar-listbox"
|
||||||
Items="{CompiledBinding ProfileConfigurations}"
|
ItemsSource="{CompiledBinding ProfileConfigurations}"
|
||||||
SelectedItem="{CompiledBinding SelectedProfileConfiguration}"
|
SelectedItem="{CompiledBinding SelectedProfileConfiguration}"
|
||||||
MinHeight="35"
|
MinHeight="35"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
|||||||
@ -23,14 +23,14 @@
|
|||||||
<ListBox Classes="sidebar-listbox"
|
<ListBox Classes="sidebar-listbox"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="10 2"
|
Margin="10 2"
|
||||||
Items="{CompiledBinding SidebarScreens}"
|
ItemsSource="{CompiledBinding SidebarScreens}"
|
||||||
SelectedItem="{CompiledBinding SelectedSidebarScreen}" />
|
SelectedItem="{CompiledBinding SelectedSidebarScreen}" />
|
||||||
<Border Grid.Row="2" Margin="8" Height="1" Background="{DynamicResource ButtonBorderBrush}"></Border>
|
<Border Grid.Row="2" Margin="8" Height="1" Background="{DynamicResource ButtonBorderBrush}"></Border>
|
||||||
|
|
||||||
<!-- Categories -->
|
<!-- Categories -->
|
||||||
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<ItemsControl Margin="10 2" Items="{CompiledBinding SidebarCategories}" Classes="profile-categories" />
|
<ItemsControl Margin="10 2" ItemsSource="{CompiledBinding SidebarCategories}" Classes="profile-categories" />
|
||||||
<Button Content="Add new category"
|
<Button Content="Add new category"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Margin="0 15">
|
<ScrollViewer Grid.Row="1" Margin="0 15">
|
||||||
<ItemsControl Items="{CompiledBinding DeviceProviders}" Margin="-4 0 8 0">
|
<ItemsControl ItemsSource="{CompiledBinding DeviceProviders}" Margin="-4 0 8 0">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<UniformGrid Columns="2" />
|
<UniformGrid Columns="2" />
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.2" Easing="CubicEaseOut" />
|
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.2" Easing="CubicEaseOut" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Grid.Transitions>
|
</Grid.Transitions>
|
||||||
<ItemsControl Name="DeviceContainer" Items="{CompiledBinding SurfaceDeviceViewModels}" ClipToBounds="False">
|
<ItemsControl Name="DeviceContainer" ItemsSource="{CompiledBinding SurfaceDeviceViewModels}" ClipToBounds="False">
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.Styles>
|
||||||
<Style Selector="ContentPresenter">
|
<Style Selector="ContentPresenter">
|
||||||
<Setter Property="Canvas.Left" Value="{Binding Device.X}" />
|
<Setter Property="Canvas.Left" Value="{Binding Device.X}" />
|
||||||
@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
<Border Grid.Column="1" Classes="card-condensed" Margin="15 0 0 0">
|
<Border Grid.Column="1" Classes="card-condensed" Margin="15 0 0 0">
|
||||||
<Grid RowDefinitions="*,Auto,Auto" ColumnDefinitions="*,*">
|
<Grid RowDefinitions="*,Auto,Auto" ColumnDefinitions="*,*">
|
||||||
<ListBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Items="{CompiledBinding ListDeviceViewModels}">
|
<ListBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{CompiledBinding ListDeviceViewModels}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ContentControl Content="{Binding}" ContextFlyout="{StaticResource DeviceMenuFlyout}"></ContentControl>
|
<ContentControl Content="{Binding}" ContextFlyout="{StaticResource DeviceMenuFlyout}"></ContentControl>
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search"></TextBox>
|
<TextBox Name="SearchBox" Text="{CompiledBinding SearchText}" Margin="0 0 0 15" Watermark="Search"></TextBox>
|
||||||
<TreeView Name="NodeTree"
|
<TreeView Name="NodeTree"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Items="{CompiledBinding Categories}"
|
ItemsSource="{CompiledBinding Categories}"
|
||||||
IsVisible="{CompiledBinding Categories.Count}"
|
IsVisible="{CompiledBinding Categories.Count}"
|
||||||
SelectedItem="{CompiledBinding SelectedNode}"
|
SelectedItem="{CompiledBinding SelectedNode}"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
<ContentControl Content="{CompiledBinding DragViewModel}" ClipToBounds="False" />
|
<ContentControl Content="{CompiledBinding DragViewModel}" ClipToBounds="False" />
|
||||||
|
|
||||||
<!-- Cables -->
|
<!-- Cables -->
|
||||||
<ItemsControl Items="{CompiledBinding CableViewModels}" ClipToBounds="False">
|
<ItemsControl ItemsSource="{CompiledBinding CableViewModels}" ClipToBounds="False">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<Canvas />
|
<Canvas />
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<!-- Nodes -->
|
<!-- Nodes -->
|
||||||
<ItemsControl Name="NodesContainer" Items="{CompiledBinding NodeViewModels}" ClipToBounds="False">
|
<ItemsControl Name="NodesContainer" ItemsSource="{CompiledBinding NodeViewModels}" ClipToBounds="False">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<Canvas />
|
<Canvas />
|
||||||
|
|||||||
@ -293,22 +293,16 @@ public class NodeScriptViewModel : ActivatableViewModelBase
|
|||||||
|
|
||||||
private async Task ExecuteCopySelected()
|
private async Task ExecuteCopySelected()
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
List<INode> nodes = NodeViewModels.Where(vm => vm.IsSelected).Select(vm => vm.Node).Where(n => !n.IsDefaultNode && !n.IsExitNode).ToList();
|
List<INode> nodes = NodeViewModels.Where(vm => vm.IsSelected).Select(vm => vm.Node).Where(n => !n.IsDefaultNode && !n.IsExitNode).ToList();
|
||||||
DataObject dataObject = new();
|
DataObject dataObject = new();
|
||||||
string copy = CoreJson.SerializeObject(new NodesClipboardModel(NodeScript, nodes), true);
|
string copy = CoreJson.SerializeObject(new NodesClipboardModel(NodeScript, nodes), true);
|
||||||
dataObject.Set(CLIPBOARD_DATA_FORMAT, copy);
|
dataObject.Set(CLIPBOARD_DATA_FORMAT, copy);
|
||||||
await Application.Current.Clipboard.SetDataObjectAsync(dataObject);
|
await Shared.UI.Clipboard.SetDataObjectAsync(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ExecutePasteSelected()
|
private async Task ExecutePasteSelected()
|
||||||
{
|
{
|
||||||
if (Application.Current?.Clipboard == null)
|
byte[]? bytes = (byte[]?) await Shared.UI.Clipboard.GetDataAsync(CLIPBOARD_DATA_FORMAT);
|
||||||
return;
|
|
||||||
|
|
||||||
byte[]? bytes = (byte[]?) await Application.Current.Clipboard.GetDataAsync(CLIPBOARD_DATA_FORMAT);
|
|
||||||
if (bytes == null!)
|
if (bytes == null!)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<Grid Margin="15" ColumnDefinitions="*,*" RowDefinitions="Auto,Auto,*">
|
<Grid Margin="15" ColumnDefinitions="*,*" RowDefinitions="Auto,Auto,*">
|
||||||
<Menu Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Top" Margin="-10 -10 -10 0">
|
<Menu Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Top" Margin="-10 -10 -10 0">
|
||||||
<MenuItem Header="_File">
|
<MenuItem Header="_File">
|
||||||
<MenuItem Header="Add Node" Items="{CompiledBinding Categories}">
|
<MenuItem Header="Add Node" ItemsSource="{CompiledBinding Categories}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<avalonia:MaterialIcon Kind="Plus" />
|
<avalonia:MaterialIcon Kind="Plus" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<Style Selector="MenuItem > MenuItem > MenuItem">
|
<Style Selector="MenuItem > MenuItem > MenuItem">
|
||||||
<Setter Property="Command" Value="{Binding CreateNode}" />
|
<Setter Property="Command" Value="{Binding CreateNode}" />
|
||||||
<Setter Property="Header" Value="{Binding Header}" />
|
<Setter Property="Header" Value="{Binding Header}" />
|
||||||
<Setter Property="Items" Value="{Binding Items}" />
|
<Setter Property="ItemsSource" Value="{Binding Items}" />
|
||||||
</Style>
|
</Style>
|
||||||
</MenuItem.Styles>
|
</MenuItem.Styles>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
@ -67,9 +67,9 @@ public class NodeScriptWindowViewModel : NodeScriptWindowViewModelBase
|
|||||||
{
|
{
|
||||||
_keyBindingsEnabled = Shared.UI.KeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
_keyBindingsEnabled = Shared.UI.KeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
||||||
|
|
||||||
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Normal, Update);
|
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Background, Update);
|
||||||
// TODO: Remove in favor of saving each time a node editor command is executed
|
// TODO: Remove in favor of saving each time a node editor command is executed
|
||||||
DispatcherTimer saveTimer = new(TimeSpan.FromMinutes(2), DispatcherPriority.Normal, Save);
|
DispatcherTimer saveTimer = new(TimeSpan.FromMinutes(2), DispatcherPriority.Background, Save);
|
||||||
|
|
||||||
updateTimer.Start();
|
updateTimer.Start();
|
||||||
saveTimer.Start();
|
saveTimer.Start();
|
||||||
|
|||||||
@ -75,8 +75,8 @@
|
|||||||
IsVisible="{CompiledBinding DisplayCustomViewModelAbove}" />
|
IsVisible="{CompiledBinding DisplayCustomViewModelAbove}" />
|
||||||
|
|
||||||
<StackPanel Grid.Row="1" Grid.Column="0" IsVisible="{CompiledBinding HasInputPins}">
|
<StackPanel Grid.Row="1" Grid.Column="0" IsVisible="{CompiledBinding HasInputPins}">
|
||||||
<ItemsControl Items="{CompiledBinding InputPinViewModels}" Margin="4 0" />
|
<ItemsControl ItemsSource="{CompiledBinding InputPinViewModels}" Margin="4 0" />
|
||||||
<ItemsControl Items="{CompiledBinding InputPinCollectionViewModels}" />
|
<ItemsControl ItemsSource="{CompiledBinding InputPinCollectionViewModels}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ContentControl Grid.Row="1"
|
<ContentControl Grid.Row="1"
|
||||||
@ -86,8 +86,8 @@
|
|||||||
IsVisible="{CompiledBinding DisplayCustomViewModelBetween}" />
|
IsVisible="{CompiledBinding DisplayCustomViewModelBetween}" />
|
||||||
|
|
||||||
<StackPanel Grid.Row="1" Grid.Column="2" IsVisible="{CompiledBinding HasOutputPins}">
|
<StackPanel Grid.Row="1" Grid.Column="2" IsVisible="{CompiledBinding HasOutputPins}">
|
||||||
<ItemsControl Items="{CompiledBinding OutputPinViewModels}" Margin="4 0" />
|
<ItemsControl ItemsSource="{CompiledBinding OutputPinViewModels}" Margin="4 0" />
|
||||||
<ItemsControl Items="{CompiledBinding OutputPinCollectionViewModels}" />
|
<ItemsControl ItemsSource="{CompiledBinding OutputPinCollectionViewModels}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ContentControl Grid.Row="2"
|
<ContentControl Grid.Row="2"
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
Command="{CompiledBinding AddPin}">
|
Command="{CompiledBinding AddPin}">
|
||||||
<avalonia:MaterialIcon Kind="Add"></avalonia:MaterialIcon>
|
<avalonia:MaterialIcon Kind="Add"></avalonia:MaterialIcon>
|
||||||
</Button>
|
</Button>
|
||||||
<ItemsControl Items="{CompiledBinding PinViewModels}" Margin="4 0">
|
<ItemsControl ItemsSource="{CompiledBinding PinViewModels}" Margin="4 0">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="pins:PinViewModel">
|
<DataTemplate DataType="pins:PinViewModel">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
Command="{CompiledBinding AddPin}">
|
Command="{CompiledBinding AddPin}">
|
||||||
<avalonia:MaterialIcon Kind="Add"></avalonia:MaterialIcon>
|
<avalonia:MaterialIcon Kind="Add"></avalonia:MaterialIcon>
|
||||||
</Button>
|
</Button>
|
||||||
<ItemsControl Items="{CompiledBinding PinViewModels}" Margin="4 0" HorizontalAlignment="Right">
|
<ItemsControl ItemsSource="{CompiledBinding PinViewModels}" Margin="4 0" HorizontalAlignment="Right">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="pins:PinViewModel">
|
<DataTemplate DataType="pins:PinViewModel">
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -8,9 +8,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview6" />
|
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview7" />
|
||||||
<PackageReference Include="DryIoc.dll" Version="5.3.4" />
|
<PackageReference Include="DryIoc.dll" Version="5.3.4" />
|
||||||
<PackageReference Include="NoStringEvaluating" Version="2.5.2" />
|
<PackageReference Include="NoStringEvaluating" Version="2.5.2" />
|
||||||
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
<PackageReference Include="ReactiveUI" Version="18.4.26" />
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
x:DataType="screens:LayerPropertyNodeCustomViewModel">
|
x:DataType="screens:LayerPropertyNodeCustomViewModel">
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel Spacing="5" VerticalAlignment="Top" IsVisible="{CompiledBinding !OutsideProfileContext}">
|
<StackPanel Spacing="5" VerticalAlignment="Top" IsVisible="{CompiledBinding !OutsideProfileContext}">
|
||||||
<ComboBox Classes="condensed" Items="{CompiledBinding ProfileElements}" SelectedItem="{CompiledBinding SelectedProfileElement}" />
|
<ComboBox Classes="condensed" ItemsSource="{CompiledBinding ProfileElements}" SelectedItem="{CompiledBinding SelectedProfileElement}" />
|
||||||
<ComboBox Classes="condensed" Items="{CompiledBinding LayerProperties}" SelectedItem="{CompiledBinding SelectedLayerProperty}" />
|
<ComboBox Classes="condensed" ItemsSource="{CompiledBinding LayerProperties}" SelectedItem="{CompiledBinding SelectedLayerProperty}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel IsVisible="{CompiledBinding OutsideProfileContext}" VerticalAlignment="Center">
|
<StackPanel IsVisible="{CompiledBinding OutsideProfileContext}" VerticalAlignment="Center">
|
||||||
<TextBlock Classes="BodyStrongTextBlockStyle" TextAlignment="Center">
|
<TextBlock Classes="BodyStrongTextBlockStyle" TextAlignment="Center">
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
x:DataType="screens:PressedKeyPositionNodeCustomViewModel">
|
x:DataType="screens:PressedKeyPositionNodeCustomViewModel">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock FontSize="13" Margin="0 -2 0 5">Layer</TextBlock>
|
<TextBlock FontSize="13" Margin="0 -2 0 5">Layer</TextBlock>
|
||||||
<ComboBox Classes="condensed" Items="{CompiledBinding Layers}" SelectedItem="{CompiledBinding SelectedLayer}" PlaceholderText="Select a layer">
|
<ComboBox Classes="condensed" ItemsSource="{CompiledBinding Layers}" SelectedItem="{CompiledBinding SelectedLayer}" PlaceholderText="Select a layer">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate DataType="core:Layer">
|
<DataTemplate DataType="core:Layer">
|
||||||
<StackPanel Spacing="5" Orientation="Horizontal">
|
<StackPanel Spacing="5" Orientation="Horizontal">
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.VisualScripting.Nodes.Operators.Screens.EnumEqualsNodeCustomView">
|
x:Class="Artemis.VisualScripting.Nodes.Operators.Screens.EnumEqualsNodeCustomView">
|
||||||
<ComboBox IsEnabled="{Binding EnumValues.Count}"
|
<ComboBox IsEnabled="{Binding EnumValues.Count}"
|
||||||
Items="{Binding EnumValues}"
|
ItemsSource="{Binding EnumValues}"
|
||||||
SelectedItem="{Binding CurrentValue}"
|
SelectedItem="{Binding CurrentValue}"
|
||||||
PlaceholderText="Select a value"
|
PlaceholderText="Select a value"
|
||||||
Classes="condensed"
|
Classes="condensed"
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class DisplayValueNodeCustomViewModel : CustomNodeViewModel
|
|||||||
// Because the DisplayValueNode has no output it never evaluates, manually do so here
|
// Because the DisplayValueNode has no output it never evaluates, manually do so here
|
||||||
this.WhenActivated(d =>
|
this.WhenActivated(d =>
|
||||||
{
|
{
|
||||||
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Normal, Update);
|
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Background, Update);
|
||||||
updateTimer.Start();
|
updateTimer.Start();
|
||||||
Disposable.Create(() => updateTimer.Stop()).DisposeWith(d);
|
Disposable.Create(() => updateTimer.Stop()).DisposeWith(d);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -6,5 +6,5 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.VisualScripting.Nodes.Transition.Screens.EasingFunctionNodeCustomView"
|
x:Class="Artemis.VisualScripting.Nodes.Transition.Screens.EasingFunctionNodeCustomView"
|
||||||
x:DataType="screens:EasingFunctionNodeCustomViewModel">
|
x:DataType="screens:EasingFunctionNodeCustomViewModel">
|
||||||
<ComboBox Classes="condensed" MinWidth="75" Items="{CompiledBinding EasingViewModels}" SelectedItem="{CompiledBinding SelectedEasingViewModel}" />
|
<ComboBox Classes="condensed" MinWidth="75" ItemsSource="{CompiledBinding EasingViewModels}" SelectedItem="{CompiledBinding SelectedEasingViewModel}" />
|
||||||
</UserControl>
|
</UserControl>
|
||||||
Loading…
x
Reference in New Issue
Block a user