mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profile editor - Added initial VMs and UI panels
UI screens - Simplified namespaces
This commit is contained in:
parent
9a4e7f9c9f
commit
16b6bb47b4
@ -28,6 +28,14 @@ namespace Artemis.UI.Shared
|
|||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
CloseRequested?.Invoke(this, EventArgs.Empty);
|
CloseRequested?.Invoke(this, EventArgs.Empty);
|
||||||
|
OnCloseRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when the the window hosting the view model should close
|
||||||
|
/// </summary>
|
||||||
|
public virtual void OnCloseRequested()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -10,6 +10,16 @@
|
|||||||
<Rectangle Grid.Row="1" Grid.Column="1" Fill="Black" Opacity="0.15" />
|
<Rectangle Grid.Row="1" Grid.Column="1" Fill="Black" Opacity="0.15" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</VisualBrush.Visual>
|
</VisualBrush.Visual>
|
||||||
|
</VisualBrush>
|
||||||
|
<VisualBrush x:Key="LargeCheckerboardBrush" TileMode="Tile" Stretch="Uniform" SourceRect="0,0,25,25">
|
||||||
|
<VisualBrush.Visual>
|
||||||
|
<Grid Width="25" Height="25" RowDefinitions="*,*" ColumnDefinitions="*,*">
|
||||||
|
<Rectangle Grid.Row="0" Grid.Column="0" Fill="Black" Opacity="0.15" />
|
||||||
|
<Rectangle Grid.Row="0" Grid.Column="1" />
|
||||||
|
<Rectangle Grid.Row="1" Grid.Column="0" />
|
||||||
|
<Rectangle Grid.Row="1" Grid.Column="1" Fill="Black" Opacity="0.15" />
|
||||||
|
</Grid>
|
||||||
|
</VisualBrush.Visual>
|
||||||
</VisualBrush>
|
</VisualBrush>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
<StyleInclude Source="/Styles/Border.axaml" />
|
<StyleInclude Source="/Styles/Border.axaml" />
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
<!-- Add Styles Here -->
|
<!-- Add Styles Here -->
|
||||||
<Style Selector="Border.router-container">
|
<Style Selector="Border.router-container">
|
||||||
<Setter Property="Background" Value="{DynamicResource SolidBackgroundFillColorTertiary}" />
|
<Setter Property="Background" Value="{DynamicResource SolidBackgroundFillColorTertiary}" />
|
||||||
|
<Setter Property="Margin" Value="0 10 0 0"></Setter>
|
||||||
<Setter Property="CornerRadius" Value="8 0 0 0" />
|
<Setter Property="CornerRadius" Value="8 0 0 0" />
|
||||||
<Setter Property="ClipToBounds" Value="True" />
|
<Setter Property="ClipToBounds" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
@ -33,7 +34,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Border.card-condensed">
|
<Style Selector="Border.card-condensed">
|
||||||
<Setter Property="Padding" Value="15" />
|
<Setter Property="Padding" Value="10" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource CardCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource CardCornerRadius}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@ -1,2 +1,9 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=events/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=events/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Cdebugger_005Ctabs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Cdevice_005Ctabs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Cplugins_005Cdialogs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Cprofileeditor_005Cpanels/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Csettings_005Ctabs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Csidebar_005Ccontentdialogs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=screens_005Csidebar_005Cdialogs/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
@ -1,10 +1,9 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.UI.Screens.Device;
|
using Artemis.UI.Screens.Device;
|
||||||
using Artemis.UI.Screens.Device.Tabs;
|
|
||||||
using Artemis.UI.Screens.Plugins;
|
using Artemis.UI.Screens.Plugins;
|
||||||
using Artemis.UI.Screens.ProfileEditor;
|
using Artemis.UI.Screens.ProfileEditor;
|
||||||
using Artemis.UI.Screens.Settings.Tabs;
|
using Artemis.UI.Screens.Settings;
|
||||||
using Artemis.UI.Screens.Sidebar;
|
using Artemis.UI.Screens.Sidebar;
|
||||||
using Artemis.UI.Screens.SurfaceEditor;
|
using Artemis.UI.Screens.SurfaceEditor;
|
||||||
using Artemis.UI.Services;
|
using Artemis.UI.Services;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Artemis.UI.Screens.Debugger.Tabs.DataModel;
|
using Artemis.UI.Screens.Debugger.DataModel;
|
||||||
using Artemis.UI.Screens.Debugger.Tabs.Logs;
|
using Artemis.UI.Screens.Debugger.Logs;
|
||||||
using Artemis.UI.Screens.Debugger.Tabs.Performance;
|
using Artemis.UI.Screens.Debugger.Performance;
|
||||||
using Artemis.UI.Screens.Debugger.Tabs.Render;
|
using Artemis.UI.Screens.Debugger.Render;
|
||||||
using Artemis.UI.Screens.Debugger.Tabs.Settings;
|
using Artemis.UI.Screens.Debugger.Settings;
|
||||||
using Artemis.UI.Services.Interfaces;
|
using Artemis.UI.Services.Interfaces;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
xmlns:dataModel="clr-namespace:Artemis.UI.Shared.DataModelVisualization.Shared;assembly=Artemis.UI.Shared"
|
xmlns:dataModel="clr-namespace:Artemis.UI.Shared.DataModelVisualization.Shared;assembly=Artemis.UI.Shared"
|
||||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.DataModel.DataModelDebugView">
|
x:Class="Artemis.UI.Screens.Debugger.DataModel.DataModelDebugView">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converters:TypeToStringConverter x:Key="TypeToStringConverter" />
|
<converters:TypeToStringConverter x:Key="TypeToStringConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.DataModel
|
namespace Artemis.UI.Screens.Debugger.DataModel
|
||||||
{
|
{
|
||||||
public class DataModelDebugView : ReactiveUserControl<DataModelDebugViewModel>
|
public class DataModelDebugView : ReactiveUserControl<DataModelDebugViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,12 +10,11 @@ using Artemis.Core.Modules;
|
|||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.DataModelVisualization.Shared;
|
using Artemis.UI.Shared.DataModelVisualization.Shared;
|
||||||
using Artemis.UI.Shared.Services;
|
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
using DynamicData;
|
using DynamicData;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.DataModel
|
namespace Artemis.UI.Screens.Debugger.DataModel
|
||||||
{
|
{
|
||||||
public class DataModelDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
public class DataModelDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Logs.LogsDebugView">
|
x:Class="Artemis.UI.Screens.Debugger.Logs.LogsDebugView">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Classes="h3">Logs</TextBlock>
|
<TextBlock Classes="h3">Logs</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap">
|
<TextBlock TextWrapping="Wrap">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Logs
|
namespace Artemis.UI.Screens.Debugger.Logs
|
||||||
{
|
{
|
||||||
public class LogsDebugView : ReactiveUserControl<LogsDebugViewModel>
|
public class LogsDebugView : ReactiveUserControl<LogsDebugViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Logs
|
namespace Artemis.UI.Screens.Debugger.Logs
|
||||||
{
|
{
|
||||||
public class LogsDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
public class LogsDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public class PerformanceDebugMeasurementViewModel : ViewModelBase
|
public class PerformanceDebugMeasurementViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Performance.PerformanceDebugPluginView">
|
x:Class="Artemis.UI.Screens.Debugger.Performance.PerformanceDebugPluginView">
|
||||||
<Border Classes="card-condensed" Margin="0 5">
|
<Border Classes="card-condensed" Margin="0 5">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Grid ColumnDefinitions="40,*">
|
<Grid ColumnDefinitions="40,*">
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public partial class PerformanceDebugPluginView : UserControl
|
public partial class PerformanceDebugPluginView : UserControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@ using System.Linq;
|
|||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public class PerformanceDebugPluginViewModel : ViewModelBase
|
public class PerformanceDebugPluginViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
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:local="clr-namespace:Artemis.UI.Screens.Debugger.Tabs.Performance"
|
xmlns:local="clr-namespace:Artemis.UI.Screens.Debugger.Performance"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Performance.PerformanceDebugProfilerView">
|
x:Class="Artemis.UI.Screens.Debugger.Performance.PerformanceDebugProfilerView">
|
||||||
<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" />
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public partial class PerformanceDebugProfilerView : UserControl
|
public partial class PerformanceDebugProfilerView : UserControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@ using System.Linq;
|
|||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public class PerformanceDebugProfilerViewModel : ViewModelBase
|
public class PerformanceDebugProfilerViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Performance.PerformanceDebugView">
|
x:Class="Artemis.UI.Screens.Debugger.Performance.PerformanceDebugView">
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
<StackPanel Grid.Row="0">
|
<StackPanel Grid.Row="0">
|
||||||
<TextBlock Classes="h3">Performance</TextBlock>
|
<TextBlock Classes="h3">Performance</TextBlock>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public class PerformanceDebugView : ReactiveUserControl<PerformanceDebugViewModel>
|
public class PerformanceDebugView : ReactiveUserControl<PerformanceDebugViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@ using Artemis.Core.Services;
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Performance
|
namespace Artemis.UI.Screens.Debugger.Performance
|
||||||
{
|
{
|
||||||
public class PerformanceDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
public class PerformanceDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Render.RenderDebugView">
|
x:Class="Artemis.UI.Screens.Debugger.Render.RenderDebugView">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Classes="h3">Render</TextBlock>
|
<TextBlock Classes="h3">Render</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap">
|
<TextBlock TextWrapping="Wrap">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Render
|
namespace Artemis.UI.Screens.Debugger.Render
|
||||||
{
|
{
|
||||||
public class RenderDebugView : ReactiveUserControl<RenderDebugViewModel>
|
public class RenderDebugView : ReactiveUserControl<RenderDebugViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,19 +1,13 @@
|
|||||||
using System.Diagnostics;
|
using System.IO;
|
||||||
using System.IO;
|
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
|
||||||
using System.Timers;
|
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Media.Imaging;
|
using Avalonia.Media.Imaging;
|
||||||
using Avalonia.Platform;
|
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Render
|
namespace Artemis.UI.Screens.Debugger.Render
|
||||||
{
|
{
|
||||||
public class RenderDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
public class RenderDebugViewModel : ActivatableViewModelBase, IRoutableViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Debugger.Tabs.Settings.DebugSettingsView">
|
x:Class="Artemis.UI.Screens.Debugger.Settings.DebugSettingsView">
|
||||||
<TextBlock>Settings</TextBlock>
|
<TextBlock>Settings</TextBlock>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Settings
|
namespace Artemis.UI.Screens.Debugger.Settings
|
||||||
{
|
{
|
||||||
public class DebugSettingsView : ReactiveUserControl<DebugSettingsViewModel>
|
public class DebugSettingsView : ReactiveUserControl<DebugSettingsViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Debugger.Tabs.Settings
|
namespace Artemis.UI.Screens.Debugger.Settings
|
||||||
{
|
{
|
||||||
public class DebugSettingsViewModel : ActivatableViewModelBase, IRoutableViewModel
|
public class DebugSettingsViewModel : ActivatableViewModelBase, IRoutableViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
|||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
using Artemis.UI.Screens.Settings.Tabs;
|
using Artemis.UI.Screens.Settings;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Device.Tabs.DeviceInfoTabView">
|
x:Class="Artemis.UI.Screens.Device.DeviceInfoTabView">
|
||||||
<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">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public partial class DeviceInfoTabView : UserControl
|
public partial class DeviceInfoTabView : UserControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,7 +5,7 @@ using Artemis.UI.Shared.Services.Interfaces;
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public class DeviceInfoTabViewModel : ActivatableViewModelBase
|
public class DeviceInfoTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Device.Tabs.DeviceLedsTabView">
|
x:Class="Artemis.UI.Screens.Device.DeviceLedsTabView">
|
||||||
Welcome to Avalonia!
|
Welcome to Avalonia!
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public partial class DeviceLedsTabView : UserControl
|
public partial class DeviceLedsTabView : UserControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@ using Artemis.UI.Shared;
|
|||||||
using DynamicData.Binding;
|
using DynamicData.Binding;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public class DeviceLedsTabViewModel : ActivatableViewModelBase
|
public class DeviceLedsTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,14 +5,14 @@
|
|||||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||||
xmlns:tabs="clr-namespace:Artemis.UI.Screens.Device.Tabs"
|
xmlns:device="clr-namespace:Artemis.UI.Screens.Device"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="1200"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="1200"
|
||||||
x:Class="Artemis.UI.Screens.Device.Tabs.DevicePropertiesTabView">
|
x:Class="Artemis.UI.Screens.Device.DevicePropertiesTabView">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converters:SKColorToColorConverter x:Key="SKColorToColorConverter" />
|
<converters:SKColorToColorConverter x:Key="SKColorToColorConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<tabs:DevicePropertiesTabViewModel />
|
<device:DevicePropertiesTabViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
|
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
|
|||||||
@ -2,7 +2,7 @@ using Avalonia.Input;
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public partial class DevicePropertiesTabView : ReactiveUserControl<DevicePropertiesTabViewModel>
|
public partial class DevicePropertiesTabView : ReactiveUserControl<DevicePropertiesTabViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,7 +10,7 @@ using Artemis.UI.Shared.Services.Interfaces;
|
|||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public class DevicePropertiesTabViewModel : ActivatableViewModelBase
|
public class DevicePropertiesTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Device.Tabs.InputMappingsTabView">
|
x:Class="Artemis.UI.Screens.Device.InputMappingsTabView">
|
||||||
Welcome to Avalonia!
|
Welcome to Avalonia!
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public partial class InputMappingsTabView : UserControl
|
public partial class InputMappingsTabView : UserControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@ using Artemis.UI.Shared;
|
|||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device.Tabs
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public class InputMappingsTabViewModel : ActivatableViewModelBase
|
public class InputMappingsTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,123 +6,124 @@
|
|||||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="900"
|
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="900"
|
||||||
x:Class="Artemis.UI.Screens.Home.HomeView">
|
x:Class="Artemis.UI.Screens.Home.HomeView">
|
||||||
<Grid RowDefinitions="200,*">
|
<Border Classes="router-container">
|
||||||
<Image Grid.Row="0"
|
<Grid RowDefinitions="200,*">
|
||||||
Grid.RowSpan="2"
|
<Image Grid.Row="0"
|
||||||
VerticalAlignment="Top"
|
Grid.RowSpan="2"
|
||||||
Source="/Assets/Images/home-banner.png"
|
VerticalAlignment="Top"
|
||||||
Height="200"
|
Source="/Assets/Images/home-banner.png"
|
||||||
Stretch="UniformToFill" />
|
Height="200"
|
||||||
|
Stretch="UniformToFill" />
|
||||||
|
|
||||||
<!-- TODO: Replace with a shadow when available -->
|
<!-- TODO: Replace with a shadow when available -->
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Foreground="Black"
|
Foreground="Black"
|
||||||
FontSize="32"
|
FontSize="32"
|
||||||
Margin="32"
|
Margin="32"
|
||||||
Text=" Welcome to Artemis, the unified RGB platform." />
|
Text=" Welcome to Artemis, the unified RGB platform." />
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
FontSize="32"
|
FontSize="32"
|
||||||
Margin="30"
|
Margin="30"
|
||||||
Text=" Welcome to Artemis, the unified RGB platform." />
|
Text=" Welcome to Artemis, the unified RGB platform." />
|
||||||
|
|
||||||
<Grid Grid.Row="1" MaxWidth="840" Margin="30" VerticalAlignment="Bottom" ColumnDefinitions="*,*" RowDefinitions="*,*">
|
<Grid Grid.Row="1" MaxWidth="840" Margin="30" VerticalAlignment="Bottom" ColumnDefinitions="*,*" RowDefinitions="*,*">
|
||||||
<Border Classes="card" Margin="8" Grid.ColumnSpan="2" ClipToBounds="True">
|
<Border Classes="card" Margin="8" Grid.ColumnSpan="2" ClipToBounds="True">
|
||||||
<Grid VerticalAlignment="Stretch" RowDefinitions="Auto,Auto" ColumnDefinitions="150,*">
|
<Grid VerticalAlignment="Stretch" RowDefinitions="Auto,Auto" ColumnDefinitions="150,*">
|
||||||
<avalonia:MaterialIcon Kind="Plug" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<avalonia:MaterialIcon Kind="Plug" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||||
<TextBlock Classes="h3">Plugins</TextBlock>
|
<TextBlock Classes="h3">Plugins</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
||||||
Artemis is built up using plugins. This means devices, brushes, effects and modules (for supporting games) can all be added via plugins.
|
Artemis is built up using plugins. This means devices, brushes, effects and modules (for supporting games) can all be added via plugins.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Margin="0 15">
|
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Margin="0 15">
|
||||||
Under Settings > Plugins you can find your currently installed plugins, these default plugins are created by Artemis developers. We're also keeping track of a list of third-party plugins on our wiki.
|
Under Settings > Plugins you can find your currently installed plugins, these default plugins are created by Artemis developers. We're also keeping track of a list of third-party plugins on our wiki.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<controls:HyperlinkButton Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/plugins" HorizontalAlignment="Right">
|
<controls:HyperlinkButton Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/plugins" HorizontalAlignment="Right">
|
||||||
<controls:HyperlinkButton.ContextMenu>
|
<controls:HyperlinkButton.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="Test"></MenuItem>
|
<MenuItem Header="Test"></MenuItem>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</controls:HyperlinkButton.ContextMenu>
|
</controls:HyperlinkButton.ContextMenu>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="OpenInBrowser" />
|
<avalonia:MaterialIcon Kind="OpenInBrowser" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Get more plugins</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Get more plugins</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border Classes="card" Margin="8" Grid.Row="1" Grid.Column="0" ClipToBounds="True">
|
<Border Classes="card" Margin="8" Grid.Row="1" Grid.Column="0" ClipToBounds="True">
|
||||||
<Grid VerticalAlignment="Stretch" RowDefinitions="150,95" ColumnDefinitions="150,*">
|
<Grid VerticalAlignment="Stretch" RowDefinitions="150,95" ColumnDefinitions="150,*">
|
||||||
<avalonia:MaterialIcon Kind="Discord" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<avalonia:MaterialIcon Kind="Discord" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||||
<TextBlock Classes="h3">Have a chat</TextBlock>
|
<TextBlock Classes="h3">Have a chat</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
||||||
If you need help, have some feedback or have any other questions feel free to contact us through any of the following channels.
|
If you need help, have some feedback or have any other questions feel free to contact us through any of the following channels.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DockPanel Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0">
|
<DockPanel Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0">
|
||||||
<Grid Margin="8" RowDefinitions="*,*">
|
<Grid Margin="8" RowDefinitions="*,*">
|
||||||
<controls:HyperlinkButton Grid.Row="0" NavigateUri="https://github.com/Artemis-RGB/Artemis">
|
<controls:HyperlinkButton Grid.Row="0" NavigateUri="https://github.com/Artemis-RGB/Artemis">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="Gift" />
|
<avalonia:MaterialIcon Kind="Gift" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">GitHub</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">GitHub</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
<controls:HyperlinkButton Grid.Row="0" HorizontalAlignment="Right" NavigateUri="https://artemis-rgb.com">
|
<controls:HyperlinkButton Grid.Row="0" HorizontalAlignment="Right" NavigateUri="https://artemis-rgb.com">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="Web" />
|
<avalonia:MaterialIcon Kind="Web" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Website</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Website</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
<controls:HyperlinkButton Grid.Row="1" NavigateUri="https://discordapp.com/invite/S3MVaC9">
|
<controls:HyperlinkButton Grid.Row="1" NavigateUri="https://discordapp.com/invite/S3MVaC9">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="Discord" />
|
<avalonia:MaterialIcon Kind="Discord" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Discord</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Discord</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
<controls:HyperlinkButton Grid.Row="1" HorizontalAlignment="Right" NavigateUri="mailto:spoinky.nl@gmail.com">
|
<controls:HyperlinkButton Grid.Row="1" HorizontalAlignment="Right" NavigateUri="mailto:spoinky.nl@gmail.com">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="Email" />
|
<avalonia:MaterialIcon Kind="Email" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">E-mail</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">E-mail</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<Border Classes="card" Margin="8" Grid.Row="1" Grid.Column="1" ClipToBounds="True">
|
<Border Classes="card" Margin="8" Grid.Row="1" Grid.Column="1" ClipToBounds="True">
|
||||||
<Grid VerticalAlignment="Stretch" RowDefinitions="150,95" ColumnDefinitions="150,*">
|
<Grid VerticalAlignment="Stretch" RowDefinitions="150,95" ColumnDefinitions="150,*">
|
||||||
<avalonia:MaterialIcon Kind="Github" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<avalonia:MaterialIcon Kind="Github" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||||
<TextBlock Classes="h3">Open Source</TextBlock>
|
<TextBlock Classes="h3">Open Source</TextBlock>
|
||||||
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top">
|
||||||
This project is open source. If you like it and want to say thanks you could hit the GitHub Star button, I like numbers.
|
This project is open source. If you like it and want to say thanks you could hit the GitHub Star button, I like numbers.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<controls:HyperlinkButton Grid.Row="1"
|
<controls:HyperlinkButton Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
NavigateUri="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VQBAEJYUFLU4J">
|
NavigateUri="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VQBAEJYUFLU4J">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<avalonia:MaterialIcon Kind="Gift" />
|
<avalonia:MaterialIcon Kind="Gift" />
|
||||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Donate</TextBlock>
|
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Donate</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
Feel like making a donation? It would be gratefully received. Click the button to donate via PayPal.
|
Feel like making a donation? It would be gratefully received. Click the button to donate via PayPal.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -10,7 +10,7 @@ using Artemis.UI.Shared;
|
|||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Plugins.Dialogs
|
namespace Artemis.UI.Screens.Plugins
|
||||||
{
|
{
|
||||||
public class PluginPrerequisitesInstallDialogViewModel : DialogViewModelBase<bool>
|
public class PluginPrerequisitesInstallDialogViewModel : DialogViewModelBase<bool>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,7 +11,7 @@ using Artemis.UI.Shared;
|
|||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Plugins.Dialogs
|
namespace Artemis.UI.Screens.Plugins
|
||||||
{
|
{
|
||||||
public class PluginPrerequisitesUninstallDialogViewModel : DialogViewModelBase<bool>
|
public class PluginPrerequisitesUninstallDialogViewModel : DialogViewModelBase<bool>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,6 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Screens.Plugins.Dialogs;
|
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services.Builders;
|
using Artemis.UI.Shared.Services.Builders;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
|
|||||||
@ -9,7 +9,6 @@ using Artemis.Core;
|
|||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Exceptions;
|
using Artemis.UI.Exceptions;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
using Artemis.UI.Screens.Plugins.Dialogs;
|
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:paz="clr-namespace:Avalonia.Controls.PanAndZoom;assembly=Avalonia.Controls.PanAndZoom"
|
||||||
|
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
|
||||||
|
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="Artemis.UI.Screens.ProfileEditor.VisualEditor.VisualEditorView">
|
||||||
|
<paz:ZoomBorder Name="ZoomBorder"
|
||||||
|
Stretch="None"
|
||||||
|
ZoomSpeed="1.2"
|
||||||
|
ClipToBounds="True"
|
||||||
|
Focusable="True"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource LargeCheckerboardBrush}"
|
||||||
|
ZoomChanged="ZoomBorder_OnZoomChanged">
|
||||||
|
<Grid Name="ContainerGrid"
|
||||||
|
Background="Transparent">
|
||||||
|
<ItemsControl Items="{Binding Devices}" ClipToBounds="False">
|
||||||
|
<ItemsControl.Styles>
|
||||||
|
<Style Selector="ContentPresenter">
|
||||||
|
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
||||||
|
<Setter Property="Canvas.Top" Value="{Binding Y}" />
|
||||||
|
</Style>
|
||||||
|
</ItemsControl.Styles>
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<Canvas />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate DataType="core:ArtemisDevice">
|
||||||
|
<controls:DeviceVisualizer Device="{Binding}" ShowColors="True" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
</paz:ZoomBorder>
|
||||||
|
</UserControl>
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.PanAndZoom;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
|
namespace Artemis.UI.Screens.ProfileEditor.VisualEditor
|
||||||
|
{
|
||||||
|
public class VisualEditorView : ReactiveUserControl<VisualEditorViewModel>
|
||||||
|
{
|
||||||
|
private readonly ZoomBorder _zoomBorder;
|
||||||
|
|
||||||
|
public VisualEditorView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
_zoomBorder = this.Find<ZoomBorder>("ZoomBorder");
|
||||||
|
_zoomBorder.PropertyChanged += ZoomBorderOnPropertyChanged;
|
||||||
|
UpdateZoomBorderBackground();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ZoomBorderOnPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Property.Name == nameof(_zoomBorder.Background))
|
||||||
|
UpdateZoomBorderBackground();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateZoomBorderBackground()
|
||||||
|
{
|
||||||
|
if (_zoomBorder.Background is VisualBrush visualBrush)
|
||||||
|
visualBrush.DestinationRect = new RelativeRect(_zoomBorder.OffsetX * -1, _zoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ZoomBorder_OnZoomChanged(object sender, ZoomChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateZoomBorderBackground();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using Artemis.Core;
|
||||||
|
using Artemis.Core.Services;
|
||||||
|
using Artemis.UI.Services;
|
||||||
|
using Artemis.UI.Shared;
|
||||||
|
|
||||||
|
namespace Artemis.UI.Screens.ProfileEditor.VisualEditor
|
||||||
|
{
|
||||||
|
public class VisualEditorViewModel : ActivatableViewModelBase
|
||||||
|
{
|
||||||
|
public VisualEditorViewModel(IProfileEditorService profileEditorService, IRgbService rgbService)
|
||||||
|
{
|
||||||
|
Devices = new ObservableCollection<ArtemisDevice>(rgbService.EnabledDevices);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableCollection<ArtemisDevice> Devices { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,12 +2,265 @@
|
|||||||
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:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileEditorView">
|
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileEditorView">
|
||||||
<StackPanel Orientation="Horizontal">
|
<UserControl.Styles>
|
||||||
<TextBlock Classes="h4 subtitle" Text="Wow, you're editing "/>
|
<Style Selector="GridSplitter.editor-grid-splitter-vertical">
|
||||||
<TextBlock Classes="h4" Text="{Binding Profile.Name}"/>
|
<Setter Property="MinWidth" Value="4" />
|
||||||
<TextBlock Classes="h4 subtitle" Text=". That's amazing! keep it up man, you can do it!!!!11!11"/>
|
<Setter Property="Margin" Value="1 1 1 5" />
|
||||||
</StackPanel>
|
</Style>
|
||||||
|
<Style Selector="GridSplitter.editor-grid-splitter-horizontal">
|
||||||
|
<Setter Property="MinHeight" Value="4" />
|
||||||
|
<Setter Property="Margin" Value="5 1" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector=":is(Button).editor-sidebar-button">
|
||||||
|
<Setter Property="Width" Value="40" />
|
||||||
|
<Setter Property="Height" Value="40" />
|
||||||
|
<Setter Property="Margin" Value="4" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector=":is(Button).editor-sidebar-button avalonia|MaterialIcon">
|
||||||
|
<Setter Property="Width" Value="18" />
|
||||||
|
<Setter Property="Height" Value="18" />
|
||||||
|
</Style>
|
||||||
|
</UserControl.Styles>
|
||||||
|
<Grid ColumnDefinitions="4*,Auto,*" RowDefinitions="Auto,*" Margin="0 0 4 4">
|
||||||
|
<Menu Grid.Row="0" Grid.ColumnSpan="3" VerticalAlignment="Top">
|
||||||
|
<MenuItem Header="_File">
|
||||||
|
<MenuItem Header="New">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Plus" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
<MenuItem Header="Folder" Command="{Binding AddFolder}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Folder" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Layer" Command="{Binding AddLayer}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Layers" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="View Properties" Command="{Binding ViewProperties}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Settings" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_View Scripts" Command="{Binding ViewScripts}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="BookEdit" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Adapt Profile" Command="{Binding AdaptProfile}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Magic" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Suspend Profile">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding ProfileConfiguration.IsSuspended}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Export Profile" Command="{Binding ExportProfile}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Export" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Duplicate Profile" Command="{Binding DuplicateProfile}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="ContentDuplicate" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Delete Profile" Command="{Binding DeleteProfile}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Trash" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Edit" SubmenuOpened="MenuItem_OnSubmenuOpened">
|
||||||
|
<MenuItem Header="_Duplicate"
|
||||||
|
Command="{Binding Duplicate}"
|
||||||
|
HotKey="Ctrl+D"
|
||||||
|
IsEnabled="{Binding HasSelectedElement}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="ContentDuplicate" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Copy"
|
||||||
|
Command="{Binding Copy}"
|
||||||
|
HotKey="Ctrl+C"
|
||||||
|
IsEnabled="{Binding HasSelectedElement}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="ContentCopy" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Paste"
|
||||||
|
Command="{Binding Paste}"
|
||||||
|
HotKey="Ctrl+V">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIconExt Kind="ContentPaste" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Run">
|
||||||
|
<MenuItem Header="_Switch run mode"
|
||||||
|
Command="{Binding ToggleSuspend}"
|
||||||
|
HotKey="F5">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="SwapHorizontal" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Run Profile on Focus Loss"
|
||||||
|
ToolTip.Tip="If enabled, run mode is set to normal on focus loss"
|
||||||
|
HotKey="Shift+F5">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding StopOnFocusLoss.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Options">
|
||||||
|
<MenuItem Header="Focus Selected Layer"
|
||||||
|
ToolTip.Tip="If enabled, displays only the layer you currently have selected"
|
||||||
|
IsEnabled="False">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding FocusSelectedLayer.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Display Data Model Values">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding ShowDataModelValues.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Display Full Condition Paths">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding ShowFullPaths.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Always Display Cable Values" ToolTip.Tip="If enabled, cable values are always shown instead of only on hover">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding AlwaysShowValues.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Apply All Data Bindings During Edit" ToolTip.Tip="If enabled, updates all data bindings instead of only the one you are editing">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox BorderThickness="0"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
IsChecked="{Binding AlwaysApplyDataBindings.Value}" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Help">
|
||||||
|
<MenuItem Header="Artemis Wiki" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="BookEdit" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Editor" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/en/guides/user/profiles">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Edit" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Layers" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/layers">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Layers" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Display Conditions" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/conditions">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="NotEqual" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Timeline" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/timeline">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Stopwatch" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Data Bindings" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/data-bindings">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="VectorLink" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Scripting" Command="{Binding OpenUrl}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/scripting">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="CodeJson" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Report a Bug" Command="{Binding OpenUrl}" CommandParameter="https://github.com/Artemis-RGB/Artemis/issues">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Github" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Get Help on Discord" Command="{Binding OpenUrl}" CommandParameter="https://discord.gg/S3MVaC9">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<avalonia:MaterialIcon Kind="Discord" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
</UserControl>
|
<Grid Grid.Row="1" Grid.Column="0" RowDefinitions="3*,Auto,*">
|
||||||
|
<Border Grid.Row="0" Classes="card" Padding="0" Margin="4 0 4 4" ClipToBounds="True">
|
||||||
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
|
<Border Grid.Column="0" Background="{DynamicResource CardStrokeColorDefaultSolidBrush}">
|
||||||
|
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<ToggleButton Classes="icon-button editor-sidebar-button">
|
||||||
|
<avalonia:MaterialIcon Kind="HandLeft" />
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Classes="icon-button editor-sidebar-button">
|
||||||
|
<avalonia:MaterialIcon Kind="TransitConnectionVariant" />
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Classes="icon-button editor-sidebar-button">
|
||||||
|
<avalonia:MaterialIcon Kind="SelectionDrag" />
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Classes="icon-button editor-sidebar-button">
|
||||||
|
<avalonia:MaterialIcon Kind="SelectOff" />
|
||||||
|
</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ContentControl Grid.Column="1" Content="{Binding VisualEditorViewModel}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<GridSplitter Grid.Row="1" Classes="editor-grid-splitter-horizontal" />
|
||||||
|
|
||||||
|
<Border Grid.Row="2" Classes="card card-condensed" Margin="4">
|
||||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Properties/timeline</TextBlock>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<GridSplitter Grid.Row="1" Grid.Column="1" Classes="editor-grid-splitter-vertical" />
|
||||||
|
|
||||||
|
<Grid Grid.Row="1" Grid.Column="2" RowDefinitions="*,Auto,*">
|
||||||
|
<Border Grid.Row="0" Classes="card card-condensed" Margin="4 0 4 4">
|
||||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Profile elements</TextBlock>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<GridSplitter Grid.Row="1" Classes="editor-grid-splitter-horizontal" />
|
||||||
|
|
||||||
|
<Border Grid.Row="2" Classes="card card-condensed" Margin="4">
|
||||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Conditions</TextBlock>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
@ -14,5 +15,10 @@ namespace Artemis.UI.Screens.ProfileEditor
|
|||||||
{
|
{
|
||||||
AvaloniaXamlLoader.Load(this);
|
AvaloniaXamlLoader.Load(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MenuItem_OnSubmenuOpened(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
|
using Artemis.UI.Screens.ProfileEditor.VisualEditor;
|
||||||
using Artemis.UI.Services;
|
using Artemis.UI.Services;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
@ -11,18 +12,23 @@ namespace Artemis.UI.Screens.ProfileEditor
|
|||||||
private ProfileConfiguration? _profile;
|
private ProfileConfiguration? _profile;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ProfileEditorViewModel(IScreen hostScreen, IProfileEditorService profileEditorService) : base(hostScreen, "profile-editor")
|
public ProfileEditorViewModel(IScreen hostScreen, VisualEditorViewModel visualEditorViewModel, IProfileEditorService profileEditorService) : base(hostScreen, "profile-editor")
|
||||||
{
|
{
|
||||||
this.WhenActivated(disposables =>
|
VisualEditorViewModel = visualEditorViewModel;
|
||||||
{
|
this.WhenActivated(disposables => { profileEditorService.CurrentProfileConfiguration.WhereNotNull().Subscribe(p => Profile = p).DisposeWith(disposables); });
|
||||||
profileEditorService.CurrentProfileConfiguration.WhereNotNull().Subscribe(p => Profile = p).DisposeWith(disposables);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public VisualEditorViewModel VisualEditorViewModel { get; }
|
||||||
|
|
||||||
public ProfileConfiguration? Profile
|
public ProfileConfiguration? Profile
|
||||||
{
|
{
|
||||||
get => _profile;
|
get => _profile;
|
||||||
set => this.RaiseAndSetIfChanged(ref _profile, value);
|
set => this.RaiseAndSetIfChanged(ref _profile, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OpenUrl(string url)
|
||||||
|
{
|
||||||
|
Utilities.OpenUrl(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12,13 +12,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ContentControl Grid.Column="0" Content="{Binding SidebarViewModel}" />
|
<ContentControl Grid.Column="0" Content="{Binding SidebarViewModel}" />
|
||||||
|
<reactiveUi:RoutedViewHost Grid.Column="1" Router="{Binding Router}">
|
||||||
<Border Classes="router-container" Grid.Column="1" Margin="0 10 0 0">
|
<reactiveUi:RoutedViewHost.PageTransition>
|
||||||
<reactiveUi:RoutedViewHost Router="{Binding Router}">
|
<CrossFade Duration="0.1" />
|
||||||
<reactiveUi:RoutedViewHost.PageTransition>
|
</reactiveUi:RoutedViewHost.PageTransition>
|
||||||
<CrossFade Duration="0.1" />
|
</reactiveUi:RoutedViewHost>
|
||||||
</reactiveUi:RoutedViewHost.PageTransition>
|
|
||||||
</reactiveUi:RoutedViewHost>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -4,11 +4,13 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Settings.SettingsView">
|
x:Class="Artemis.UI.Screens.Settings.SettingsView">
|
||||||
<TabControl Margin="12" Items="{Binding SettingTabs}">
|
<Border Classes="router-container">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl Margin="12" Items="{Binding SettingTabs}">
|
||||||
<DataTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<TextBlock Text="{Binding DisplayName}" />
|
<DataTemplate>
|
||||||
</DataTemplate>
|
<TextBlock Text="{Binding DisplayName}" />
|
||||||
</TabControl.ItemTemplate>
|
</DataTemplate>
|
||||||
</TabControl>
|
</TabControl.ItemTemplate>
|
||||||
|
</TabControl>
|
||||||
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Artemis.UI.Screens.Settings.Tabs;
|
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1400"
|
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1400"
|
||||||
x:Class="Artemis.UI.Screens.Settings.Tabs.AboutTabView">
|
x:Class="Artemis.UI.Screens.Settings.AboutTabView">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<StackPanel Margin="15" MaxWidth="800">
|
<StackPanel Margin="15" MaxWidth="800">
|
||||||
<Grid RowDefinitions="*,*" ColumnDefinitions="Auto,*,Auto">
|
<Grid RowDefinitions="*,*" ColumnDefinitions="Auto,*,Auto">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public partial class AboutTabView : ReactiveUserControl<AboutTabViewModel>
|
public partial class AboutTabView : ReactiveUserControl<AboutTabViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@ using Avalonia.Media.Imaging;
|
|||||||
using Flurl.Http;
|
using Flurl.Http;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public class AboutTabViewModel : ActivatableViewModelBase
|
public class AboutTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Settings.Tabs.DevicesTabView">
|
x:Class="Artemis.UI.Screens.Settings.DevicesTabView">
|
||||||
<Grid MaxWidth="1050">
|
<Grid MaxWidth="1050">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public class DevicesTabView : ReactiveUserControl<DevicesTabViewModel>
|
public class DevicesTabView : ReactiveUserControl<DevicesTabViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,7 +14,7 @@ using Avalonia.Threading;
|
|||||||
using DynamicData;
|
using DynamicData;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public class DevicesTabViewModel : ActivatableViewModelBase
|
public class DevicesTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
||||||
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="2400"
|
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="2400"
|
||||||
x:Class="Artemis.UI.Screens.Settings.Tabs.GeneralTabView">
|
x:Class="Artemis.UI.Screens.Settings.GeneralTabView">
|
||||||
|
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Margin="15" MaxWidth="1000">
|
<StackPanel Margin="15" MaxWidth="1000">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public partial class GeneralTabView : ReactiveUserControl<GeneralTabViewModel>
|
public partial class GeneralTabView : ReactiveUserControl<GeneralTabViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,7 +14,7 @@ using Artemis.UI.Shared;
|
|||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public class GeneralTabViewModel : ActivatableViewModelBase
|
public class GeneralTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Settings.Tabs.PluginsTabView">
|
x:Class="Artemis.UI.Screens.Settings.PluginsTabView">
|
||||||
<Grid RowDefinitions="Auto,*" ColumnDefinitions="*,*" Width="900">
|
<Grid RowDefinitions="Auto,*" ColumnDefinitions="*,*" Width="900">
|
||||||
<TextBox Grid.Row="0" Grid.Column="0" Text="{Binding SearchPluginInput}" Watermark="Search plugins" Margin="0 10" />
|
<TextBox Grid.Row="0" Grid.Column="0" Text="{Binding SearchPluginInput}" Watermark="Search plugins" Margin="0 10" />
|
||||||
<ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public partial class PluginsTabView : ReactiveUserControl<PluginsTabViewModel>
|
public partial class PluginsTabView : ReactiveUserControl<PluginsTabViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@ using Artemis.UI.Shared.Services.Interfaces;
|
|||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs
|
namespace Artemis.UI.Screens.Settings
|
||||||
{
|
{
|
||||||
public class PluginsTabViewModel : ActivatableViewModelBase
|
public class PluginsTabViewModel : ActivatableViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Sidebar.ContentDialogs.SidebarCategoryEditView">
|
x:Class="Artemis.UI.Screens.Sidebar.SidebarCategoryEditView">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel.KeyBindings>
|
<StackPanel.KeyBindings>
|
||||||
<KeyBinding Gesture="Enter" Command="{Binding Confirm}" />
|
<KeyBinding Gesture="Enter" Command="{Binding Confirm}" />
|
||||||
|
|||||||
@ -3,7 +3,7 @@ using Avalonia.Markup.Xaml;
|
|||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.ContentDialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public class SidebarCategoryEditView : ReactiveUserControl<SidebarCategoryEditViewModel>
|
public class SidebarCategoryEditView : ReactiveUserControl<SidebarCategoryEditViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@ using FluentAvalonia.UI.Controls;
|
|||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using ReactiveUI.Validation.Extensions;
|
using ReactiveUI.Validation.Extensions;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.ContentDialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
|
public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,9 +7,9 @@
|
|||||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||||
xmlns:svg="clr-namespace:Avalonia.Svg.Skia;assembly=Avalonia.Svg.Skia"
|
xmlns:svg="clr-namespace:Avalonia.Svg.Skia;assembly=Avalonia.Svg.Skia"
|
||||||
xmlns:local="clr-namespace:Artemis.UI.Screens.Sidebar.Dialogs"
|
xmlns:local="clr-namespace:Artemis.UI.Screens.Sidebar"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="850"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="850"
|
||||||
x:Class="Artemis.UI.Screens.Sidebar.Dialogs.ProfileConfigurationEditView"
|
x:Class="Artemis.UI.Screens.Sidebar.ProfileConfigurationEditView"
|
||||||
Title="{Binding DisplayName}"
|
Title="{Binding DisplayName}"
|
||||||
Icon="/Assets/Images/Logo/bow.ico"
|
Icon="/Assets/Images/Logo/bow.ico"
|
||||||
Width="800"
|
Width="800"
|
||||||
|
|||||||
@ -2,7 +2,7 @@ using Avalonia;
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.Dialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public partial class ProfileConfigurationEditView : ReactiveWindow<ProfileConfigurationEditViewModel>
|
public partial class ProfileConfigurationEditView : ReactiveWindow<ProfileConfigurationEditViewModel>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,7 +15,7 @@ using Material.Icons;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.Dialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public class ProfileConfigurationEditViewModel : DialogViewModelBase<bool>
|
public class ProfileConfigurationEditViewModel : DialogViewModelBase<bool>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Material.Icons;
|
using Material.Icons;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.Dialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public class ProfileIconViewModel : ViewModelBase
|
public class ProfileIconViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Material.Icons;
|
using Material.Icons;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar.Dialogs
|
namespace Artemis.UI.Screens.Sidebar
|
||||||
{
|
{
|
||||||
public class ProfileModuleViewModel : ViewModelBase
|
public class ProfileModuleViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,8 +6,6 @@ using System.Threading.Tasks;
|
|||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
using Artemis.UI.Screens.Sidebar.ContentDialogs;
|
|
||||||
using Artemis.UI.Screens.Sidebar.Dialogs;
|
|
||||||
using Artemis.UI.Services;
|
using Artemis.UI.Services;
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.UI.Screens.Sidebar.Dialogs;
|
|
||||||
using Artemis.UI.Shared;
|
using Artemis.UI.Shared;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ using Artemis.UI.Ninject.Factories;
|
|||||||
using Artemis.UI.Screens.Home;
|
using Artemis.UI.Screens.Home;
|
||||||
using Artemis.UI.Screens.ProfileEditor;
|
using Artemis.UI.Screens.ProfileEditor;
|
||||||
using Artemis.UI.Screens.Settings;
|
using Artemis.UI.Screens.Settings;
|
||||||
using Artemis.UI.Screens.Sidebar.ContentDialogs;
|
|
||||||
using Artemis.UI.Screens.SurfaceEditor;
|
using Artemis.UI.Screens.SurfaceEditor;
|
||||||
using Artemis.UI.Screens.Workshop;
|
using Artemis.UI.Screens.Workshop;
|
||||||
using Artemis.UI.Services;
|
using Artemis.UI.Services;
|
||||||
|
|||||||
@ -8,107 +8,97 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.SurfaceEditor.SurfaceEditorView">
|
x:Class="Artemis.UI.Screens.SurfaceEditor.SurfaceEditorView">
|
||||||
|
|
||||||
<paz:ZoomBorder Name="ZoomBorder"
|
<Border Classes="router-container">
|
||||||
Stretch="None"
|
<paz:ZoomBorder Name="ZoomBorder"
|
||||||
ZoomSpeed="1.2"
|
Stretch="None"
|
||||||
ClipToBounds="True"
|
ZoomSpeed="1.2"
|
||||||
Focusable="True"
|
ClipToBounds="True"
|
||||||
VerticalAlignment="Stretch"
|
Focusable="True"
|
||||||
HorizontalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
ZoomChanged="ZoomBorder_OnZoomChanged"
|
HorizontalAlignment="Stretch"
|
||||||
PointerPressed="ZoomBorder_OnPointerPressed"
|
Background="{DynamicResource LargeCheckerboardBrush}"
|
||||||
PointerMoved="ZoomBorder_OnPointerMoved"
|
ZoomChanged="ZoomBorder_OnZoomChanged"
|
||||||
PointerReleased="ZoomBorder_OnPointerReleased">
|
PointerPressed="ZoomBorder_OnPointerPressed"
|
||||||
<paz:ZoomBorder.Background>
|
PointerMoved="ZoomBorder_OnPointerMoved"
|
||||||
<VisualBrush TileMode="Tile" Stretch="Uniform" SourceRect="0,0,25,25">
|
PointerReleased="ZoomBorder_OnPointerReleased">
|
||||||
<VisualBrush.Visual>
|
<Grid Name="ContainerGrid" Background="Transparent">
|
||||||
<Grid Width="25" Height="25" RowDefinitions="*,*" ColumnDefinitions="*,*">
|
<ItemsControl Items="{Binding SurfaceDeviceViewModels}" ClipToBounds="False">
|
||||||
<Rectangle Grid.Row="0" Grid.Column="0" Fill="Black" Opacity="0.15" />
|
<ItemsControl.Styles>
|
||||||
<Rectangle Grid.Row="0" Grid.Column="1" />
|
<Style Selector="ContentPresenter">
|
||||||
<Rectangle Grid.Row="1" Grid.Column="0" />
|
<Setter Property="Canvas.Left" Value="{Binding Device.X}" />
|
||||||
<Rectangle Grid.Row="1" Grid.Column="1" Fill="Black" Opacity="0.15" />
|
<Setter Property="Canvas.Top" Value="{Binding Device.Y}" />
|
||||||
</Grid>
|
</Style>
|
||||||
</VisualBrush.Visual>
|
</ItemsControl.Styles>
|
||||||
</VisualBrush>
|
<ItemsControl.ItemsPanel>
|
||||||
</paz:ZoomBorder.Background>
|
<ItemsPanelTemplate>
|
||||||
<Grid Name="ContainerGrid"
|
<Canvas />
|
||||||
Background="Transparent">
|
</ItemsPanelTemplate>
|
||||||
<ItemsControl Items="{Binding SurfaceDeviceViewModels}" ClipToBounds="False">
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.Styles>
|
<ItemsControl.ItemTemplate>
|
||||||
<Style Selector="ContentPresenter">
|
<DataTemplate>
|
||||||
<Setter Property="Canvas.Left" Value="{Binding Device.X}" />
|
<ContentControl Content="{Binding}">
|
||||||
<Setter Property="Canvas.Top" Value="{Binding Device.Y}" />
|
<ContentControl.ContextFlyout>
|
||||||
</Style>
|
<MenuFlyout>
|
||||||
</ItemsControl.Styles>
|
<MenuItem Header="Identify" Command="{Binding IdentifyDevice}" CommandParameter="{Binding Device}">
|
||||||
<ItemsControl.ItemsPanel>
|
<MenuItem.Icon>
|
||||||
<ItemsPanelTemplate>
|
<avalonia:MaterialIcon Kind="AlarmLight" />
|
||||||
<Canvas />
|
</MenuItem.Icon>
|
||||||
</ItemsPanelTemplate>
|
</MenuItem>
|
||||||
</ItemsControl.ItemsPanel>
|
<MenuItem Header="-" />
|
||||||
<ItemsControl.ItemTemplate>
|
<MenuItem Header="Bring to Front" Command="{Binding $parent[4].DataContext.BringToFront}" CommandParameter="{Binding Device}">
|
||||||
<DataTemplate>
|
<MenuItem.Icon>
|
||||||
<ContentControl Content="{Binding}">
|
<avalonia:MaterialIcon Kind="ArrangeBringToFront" />
|
||||||
<ContentControl.ContextFlyout>
|
</MenuItem.Icon>
|
||||||
<MenuFlyout>
|
</MenuItem>
|
||||||
<MenuItem Header="Identify" Command="{Binding IdentifyDevice}" CommandParameter="{Binding Device}">
|
<MenuItem Header="Bring Forward" Command="{Binding $parent[4].DataContext.BringForward}" CommandParameter="{Binding Device}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<avalonia:MaterialIcon Kind="AlarmLight" />
|
<avalonia:MaterialIcon Kind="ArrangeBringForward" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="-" />
|
<MenuItem Header="Send to Back" Command="{Binding $parent[4].DataContext.SendToBack}" CommandParameter="{Binding Device}">
|
||||||
<MenuItem Header="Bring to Front" Command="{Binding $parent[4].DataContext.BringToFront}" CommandParameter="{Binding Device}">
|
<MenuItem.Icon>
|
||||||
<MenuItem.Icon>
|
<avalonia:MaterialIcon Kind="ArrangeSendToBack" />
|
||||||
<avalonia:MaterialIcon Kind="ArrangeBringToFront" />
|
</MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
</MenuItem>
|
||||||
</MenuItem>
|
<MenuItem Header="Send Backward" Command="{Binding $parent[4].DataContext.SendBackward}" CommandParameter="{Binding Device}">
|
||||||
<MenuItem Header="Bring Forward" Command="{Binding $parent[4].DataContext.BringForward}" CommandParameter="{Binding Device}">
|
<MenuItem.Icon>
|
||||||
<MenuItem.Icon>
|
<avalonia:MaterialIcon Kind="ArrangeSendBackward" />
|
||||||
<avalonia:MaterialIcon Kind="ArrangeBringForward" />
|
</MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
</MenuItem>
|
||||||
</MenuItem>
|
<MenuItem Header="-" />
|
||||||
<MenuItem Header="Send to Back" Command="{Binding $parent[4].DataContext.SendToBack}" CommandParameter="{Binding Device}">
|
<MenuItem Header="Identify input"
|
||||||
<MenuItem.Icon>
|
Command="{Binding DetectInput}"
|
||||||
<avalonia:MaterialIcon Kind="ArrangeSendToBack" />
|
CommandParameter="{Binding Device}"
|
||||||
</MenuItem.Icon>
|
ToolTip.Tip="Teach Artemis which keypresses and/or button presses belong to this device">
|
||||||
</MenuItem>
|
<MenuItem.Icon>
|
||||||
<MenuItem Header="Send Backward" Command="{Binding $parent[4].DataContext.SendBackward}" CommandParameter="{Binding Device}">
|
<avalonia:MaterialIcon Kind="GestureDoubleTap" />
|
||||||
<MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
<avalonia:MaterialIcon Kind="ArrangeSendBackward" />
|
</MenuItem>
|
||||||
</MenuItem.Icon>
|
<MenuItem Header="View properties" Command="{Binding ViewProperties}" CommandParameter="{Binding Device}">
|
||||||
</MenuItem>
|
<MenuItem.Icon>
|
||||||
<MenuItem Header="-" />
|
<avalonia:MaterialIcon Kind="Gear" />
|
||||||
<MenuItem Header="Identify input"
|
</MenuItem.Icon>
|
||||||
Command="{Binding DetectInput}"
|
</MenuItem>
|
||||||
CommandParameter="{Binding Device}"
|
</MenuFlyout>
|
||||||
ToolTip.Tip="Teach Artemis which keypresses and/or button presses belong to this device">
|
</ContentControl.ContextFlyout>
|
||||||
<MenuItem.Icon>
|
</ContentControl>
|
||||||
<avalonia:MaterialIcon Kind="GestureDoubleTap" />
|
</DataTemplate>
|
||||||
</MenuItem.Icon>
|
</ItemsControl.ItemTemplate>
|
||||||
</MenuItem>
|
</ItemsControl>
|
||||||
<MenuItem Header="View properties" Command="{Binding ViewProperties}" CommandParameter="{Binding Device}">
|
|
||||||
<MenuItem.Icon>
|
|
||||||
<avalonia:MaterialIcon Kind="Gear" />
|
|
||||||
</MenuItem.Icon>
|
|
||||||
</MenuItem>
|
|
||||||
</MenuFlyout>
|
|
||||||
</ContentControl.ContextFlyout>
|
|
||||||
</ContentControl>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
|
|
||||||
<controls:SelectionRectangle Name="SelectionRectangle"
|
<controls:SelectionRectangle Name="SelectionRectangle"
|
||||||
InputElement="{Binding #ZoomBorder}"
|
InputElement="{Binding #ZoomBorder}"
|
||||||
SelectionUpdated="{Binding UpdateSelection}" />
|
SelectionUpdated="{Binding UpdateSelection}" />
|
||||||
|
|
||||||
<Border Name="SurfaceBounds"
|
<Border Name="SurfaceBounds"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Width="{Binding MaxTextureSize}"
|
Width="{Binding MaxTextureSize}"
|
||||||
Height="{Binding MaxTextureSize}"
|
Height="{Binding MaxTextureSize}"
|
||||||
BorderThickness="2"
|
BorderThickness="2"
|
||||||
BorderBrush="{DynamicResource SystemAccentColorDark3}"
|
BorderBrush="{DynamicResource SystemAccentColorDark3}"
|
||||||
CornerRadius="8" />
|
CornerRadius="8" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</paz:ZoomBorder>
|
</paz:ZoomBorder>
|
||||||
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -11,10 +11,10 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
{
|
{
|
||||||
public class SurfaceEditorView : ReactiveUserControl<SurfaceEditorViewModel>
|
public class SurfaceEditorView : ReactiveUserControl<SurfaceEditorViewModel>
|
||||||
{
|
{
|
||||||
private readonly SelectionRectangle _selectionRectangle;
|
|
||||||
private readonly Grid _containerGrid;
|
private readonly Grid _containerGrid;
|
||||||
private readonly ZoomBorder _zoomBorder;
|
private readonly SelectionRectangle _selectionRectangle;
|
||||||
private readonly Border _surfaceBounds;
|
private readonly Border _surfaceBounds;
|
||||||
|
private readonly ZoomBorder _zoomBorder;
|
||||||
|
|
||||||
public SurfaceEditorView()
|
public SurfaceEditorView()
|
||||||
{
|
{
|
||||||
@ -25,8 +25,14 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
_selectionRectangle = this.Find<SelectionRectangle>("SelectionRectangle");
|
_selectionRectangle = this.Find<SelectionRectangle>("SelectionRectangle");
|
||||||
_surfaceBounds = this.Find<Border>("SurfaceBounds");
|
_surfaceBounds = this.Find<Border>("SurfaceBounds");
|
||||||
|
|
||||||
|
_zoomBorder.PropertyChanged += ZoomBorderOnPropertyChanged;
|
||||||
|
UpdateZoomBorderBackground();
|
||||||
|
}
|
||||||
|
|
||||||
((VisualBrush) _zoomBorder.Background).DestinationRect = new RelativeRect(_zoomBorder.OffsetX * -1, _zoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
private void ZoomBorderOnPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Property.Name == nameof(_zoomBorder.Background))
|
||||||
|
UpdateZoomBorderBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
@ -36,7 +42,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
|
|
||||||
private void ZoomBorder_OnZoomChanged(object sender, ZoomChangedEventArgs e)
|
private void ZoomBorder_OnZoomChanged(object sender, ZoomChangedEventArgs e)
|
||||||
{
|
{
|
||||||
((VisualBrush) _zoomBorder.Background).DestinationRect = new RelativeRect(_zoomBorder.OffsetX * -1, _zoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
UpdateZoomBorderBackground();
|
||||||
_selectionRectangle.BorderThickness = 1 / _zoomBorder.ZoomX;
|
_selectionRectangle.BorderThickness = 1 / _zoomBorder.ZoomX;
|
||||||
_surfaceBounds.BorderThickness = new Thickness(2 / _zoomBorder.ZoomX);
|
_surfaceBounds.BorderThickness = new Thickness(2 / _zoomBorder.ZoomX);
|
||||||
}
|
}
|
||||||
@ -53,7 +59,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
ViewModel?.StartMouseDrag(e.GetPosition(_containerGrid));
|
ViewModel?.StartMouseDrag(e.GetPosition(_containerGrid));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ViewModel?.ClearSelection();
|
ViewModel?.ClearSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ZoomBorder_OnPointerMoved(object? sender, PointerEventArgs e)
|
private void ZoomBorder_OnPointerMoved(object? sender, PointerEventArgs e)
|
||||||
@ -61,7 +69,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ReferenceEquals(e.Pointer.Captured, sender))
|
if (ReferenceEquals(e.Pointer.Captured, sender))
|
||||||
ViewModel?.UpdateMouseDrag(e.GetPosition(_containerGrid));
|
ViewModel?.UpdateMouseDrag(e.GetPosition(_containerGrid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,5 +84,11 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
e.Pointer.Capture(null);
|
e.Pointer.Capture(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateZoomBorderBackground()
|
||||||
|
{
|
||||||
|
if (_zoomBorder.Background is VisualBrush visualBrush)
|
||||||
|
visualBrush.DestinationRect = new RelativeRect(_zoomBorder.OffsetX * -1, _zoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6,27 +6,28 @@
|
|||||||
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Artemis.UI.Screens.Workshop.WorkshopView">
|
x:Class="Artemis.UI.Screens.Workshop.WorkshopView">
|
||||||
<StackPanel Margin="12">
|
<Border Classes="router-container">
|
||||||
<TextBlock>Workshop!! :3</TextBlock>
|
<StackPanel Margin="12">
|
||||||
<Border Classes="card" Margin="0 12">
|
<TextBlock>Workshop!! :3</TextBlock>
|
||||||
<StackPanel>
|
<Border Classes="card" Margin="0 12">
|
||||||
<TextBlock Classes="h4">Notification tests</TextBlock>
|
<StackPanel>
|
||||||
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Informational}">
|
<TextBlock Classes="h4">Notification tests</TextBlock>
|
||||||
Notification test (default)
|
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Informational}">
|
||||||
</Button>
|
Notification test (default)
|
||||||
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Warning}">
|
</Button>
|
||||||
Notification test (warning)
|
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Warning}">
|
||||||
</Button>
|
Notification test (warning)
|
||||||
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Error}">
|
</Button>
|
||||||
Notification test (error)
|
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Error}">
|
||||||
</Button>
|
Notification test (error)
|
||||||
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Success}">
|
</Button>
|
||||||
Notification test (success)
|
<Button Margin="0 5" Command="{Binding ShowNotification}" CommandParameter="{x:Static builders:NotificationSeverity.Success}">
|
||||||
</Button>
|
Notification test (success)
|
||||||
|
</Button>
|
||||||
|
|
||||||
<controls:HotkeyBox Watermark="Some hotkey" Width="250" HorizontalAlignment="Left"></controls:HotkeyBox>
|
<controls:HotkeyBox Watermark="Some hotkey" Width="250" HorizontalAlignment="Left" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
Loading…
x
Reference in New Issue
Block a user