mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Workshop - Layout info WIP
This commit is contained in:
1 parent
c77d51fb58
commit
f4b9b67f1a
25 files changed
+361
-63
No files matched your search
@@ -0,0 +1,10 @@
|
||||
<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:layout="clr-namespace:Artemis.UI.Screens.Workshop.Layout"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Layout.LayoutInfoView"
|
||||
x:DataType="layout:LayoutInfoViewModel">
|
||||
Welcome to Avalonia!
|
||||
</UserControl>
|
||||
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Artemis.UI.Screens.Workshop.Layout;
|
||||
|
||||
public partial class LayoutInfoView : UserControl
|
||||
{
|
||||
public LayoutInfoView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Artemis.Core;
|
||||
using Artemis.UI.Screens.Workshop.SubmissionWizard.Models;
|
||||
using Artemis.UI.Shared;
|
||||
using PropertyChanged.SourceGenerator;
|
||||
using RGB.NET.Core;
|
||||
using KeyboardLayoutType = Artemis.Core.KeyboardLayoutType;
|
||||
|
||||
namespace Artemis.UI.Screens.Workshop.Layout;
|
||||
|
||||
public partial class LayoutInfoViewModel : ViewModelBase
|
||||
{
|
||||
[Notify] private Guid _deviceProvider;
|
||||
[Notify] private string? _vendor;
|
||||
[Notify] private string? _model;
|
||||
[Notify] private KeyboardLayoutType? _physicalLayout;
|
||||
[Notify] private string? _logicalLayout;
|
||||
|
||||
/// <inheritdoc />
|
||||
public LayoutInfoViewModel(ArtemisLayout layout)
|
||||
{
|
||||
DisplayKeyboardLayout = layout.RgbLayout.Type == RGBDeviceType.Keyboard;
|
||||
}
|
||||
|
||||
public LayoutInfoViewModel(ArtemisLayout layout, LayoutInfo layoutInfo)
|
||||
{
|
||||
DisplayKeyboardLayout = layout.RgbLayout.Type == RGBDeviceType.Keyboard;
|
||||
|
||||
}
|
||||
|
||||
public bool DisplayKeyboardLayout { get; }
|
||||
}
|
||||
Reference in new issue
Block a user