mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Started layout editor implementation
Rearranged VMs/Views Updated RGB.NET
This commit is contained in:
1 parent
390dcc6ae1
commit
6e23c079b1
52 files changed
+741
-185
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="Artemis.UI.Views.Controls.Editor.SurfaceEditorView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:editor="clr-namespace:Artemis.UI.ViewModels.Controls.Editor"
|
||||
xmlns:xaml="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance editor:SurfaceEditorViewModel}">
|
||||
<Grid>
|
||||
<TextBlock>Surface editor view</TextBlock>
|
||||
<ItemsControl ItemsSource="{Binding Devices}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Canvas />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style TargetType="ContentPresenter">
|
||||
<Setter Property="Canvas.Left" Value="{Binding Device.Location.X}" />
|
||||
<Setter Property="Canvas.Top" Value="{Binding Device.Location.Y}" />
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl Width="{Binding Device.Size.Width}" Height="{Binding Device.Size.Height}" xaml:View.Model="{Binding }"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="Artemis.UI.Views.Controls.RgbDevice.RgbDeviceView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:rgbDevice="clr-namespace:Artemis.UI.ViewModels.Controls.RgbDevice"
|
||||
xmlns:xaml="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance rgbDevice:RgbDeviceViewModel}"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<ItemsControl ItemsSource="{Binding Leds}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Canvas />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style TargetType="ContentPresenter">
|
||||
<Setter Property="Canvas.Left" Value="{Binding Led.LedRectangle.X}" />
|
||||
<Setter Property="Canvas.Top" Value="{Binding Led.LedRectangle.Y}" />
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl Width="{Binding Led.LedRectangle.Width}" Height="{Binding Led.LedRectangle.Width}" xaml:View.Model="{Binding}" ToolTip="{Binding Tooltip}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="Artemis.UI.Views.Controls.RgbDevice.RgbLedView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.UI.Views.Controls.RgbDevice"
|
||||
xmlns:rgbDevice="clr-namespace:Artemis.UI.ViewModels.Controls.RgbDevice"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance rgbDevice:RgbLedViewModel}"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Image Width="Auto" Height="Auto" Source="{Binding DisplayDrawing}" Margin="2" />
|
||||
</UserControl>
|
||||
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="Artemis.UI.Views.Controls.Settings.RgbDeviceSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:settings="clr-namespace:Artemis.UI.ViewModels.Controls.Settings"
|
||||
d:DataContext="{d:DesignInstance settings:RgbDeviceSettingsViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding Name}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Manufacturer}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Type}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user