Added layer properties to core and hooked it up with the UI

Implemented timeline caret scrolling logic
Added special treeview style for the layer properties tree
This commit is contained in:
Robert committed 2020-01-06 16:01:35 +01:00
1 parent 14065bffef
commit 59f0062c97
48 files changed
+618 -381

No files matched your search

@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for EllipseToolView.xaml
/// Interaction logic for EllipseToolView.xaml
/// </summary>
public partial class EllipseToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -1,12 +1,10 @@
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.LayerShapes;
using Artemis.UI.Properties;
using Artemis.UI.Services.Interfaces;
using SkiaSharp;
using SkiaSharp.Views.WPF;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
@@ -1,9 +1,9 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.FillToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
</UserControl>
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for FillToolView.xaml
/// Interaction logic for FillToolView.xaml
/// </summary>
public partial class FillToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -31,7 +31,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
led => panZoomVm.TransformContainingRect(led.RgbLed.AbsoluteLedRectangle).Contains(position))
);
if (layer == null)
if (layer == null)
return;
layer.LayerShape = new Fill(layer);
ProfileEditorService.UpdateSelectedProfileElement();
@@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.PolygonToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
<Grid />
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for PolygonToolView.xaml
/// Interaction logic for PolygonToolView.xaml
/// </summary>
public partial class PolygonToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -31,7 +31,7 @@
</Style>
</UserControl.Resources>
<Canvas Background="Transparent" Width="50" Height="50">
<Canvas.ContextMenu>
<ContextMenu>
<MenuItem Header="Ellipse action 1" Command="{s:Action CreateLayer}" CommandParameter="{Binding}">
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for RectangleToolView.xaml
/// Interaction logic for RectangleToolView.xaml
/// </summary>
public partial class RectangleToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.SelectionAddToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
<Grid />
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for SelectionAddToolView.xaml
/// Interaction logic for SelectionAddToolView.xaml
/// </summary>
public partial class SelectionAddToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.SelectionRemoveToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
<Grid />
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for SelectionRemoveToolView.xaml
/// Interaction logic for SelectionRemoveToolView.xaml
/// </summary>
public partial class SelectionRemoveToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -20,7 +20,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
base.MouseUp(sender, e);
var position = e.GetPosition((IInputElement)sender);
var position = e.GetPosition((IInputElement) sender);
var selectedRect = new Rect(MouseDownStartPosition, position);
foreach (var device in ProfileViewModel.Devices)
@@ -1,12 +1,12 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.SelectionToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style TargetType="Shape" x:Key="ShowIfMouseDown">
@@ -60,4 +60,4 @@
</Rectangle.Fill>
</Rectangle>
</Canvas>
</UserControl>
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for SelectionToolView.xaml
/// Interaction logic for SelectionToolView.xaml
/// </summary>
public partial class SelectionToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}
@@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools.ViewpointMoveToolView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
<Grid />
</UserControl>
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
/// <summary>
/// Interaction logic for ViewpointMoveToolView.xaml
/// Interaction logic for ViewpointMoveToolView.xaml
/// </summary>
public partial class ViewpointMoveToolView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
InitializeComponent();
}
}
}
}