Core port - Targeting .NET Core 3.1!

Core port - Updated projects to new project layout
Core port - Changed the way devices are identified to be consistent across different frameworks
Core port - Updated plugin system to no longer use AppDomain but AssemblyLoadContext (through McMaster.NETCore.Plugins)
Core port - Renamed a few events to keep Fody from getting confused
This commit is contained in:
SpoinkyNL committed 2020-02-22 18:38:32 +01:00
1 parent 46a738e1a0
commit b3f6aef101
61 files changed
+537 -2031

No files matched your search

@@ -43,7 +43,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
PropertyTimeline = propertyTimelineVmFactory.Create(this);
PopulateProperties(_profileEditorService.SelectedProfileElement, null);
_profileEditorService.SelectedProfileElementChanged += (sender, args) => PopulateProperties(args.ProfileElement, args.PreviousProfileElement);
_profileEditorService.ProfileElementSelected += (sender, args) => PopulateProperties(args.ProfileElement, args.PreviousProfileElement);
_profileEditorService.CurrentTimeChanged += ProfileEditorServiceOnCurrentTimeChanged;
}
@@ -6,10 +6,10 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:dd="urn:gong-wpf-dragdrop"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:profileTree="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.ProfileTree"
xmlns:treeItem="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.ProfileTree.TreeItem"
xmlns:behaviors="clr-namespace:Artemis.UI.Behaviors"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance {x:Type profileTree:ProfileTreeViewModel}}">
@@ -32,9 +32,9 @@
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
dd:DragDrop.DropHandler="{Binding}">
<i:Interaction.Behaviors>
<b:Interaction.Behaviors>
<behaviors:TreeViewSelectionBehavior ExpandSelected="True" SelectedItem="{Binding SelectedTreeItem}" />
</i:Interaction.Behaviors>
</b:Interaction.Behaviors>
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type treeItem:FolderViewModel}" ItemsSource="{Binding Children}">
<ContentControl s:View.Model="{Binding}" />
@@ -22,8 +22,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.ProfileTree
_folderVmFactory = folderVmFactory;
CreateRootFolderViewModel();
_profileEditorService.SelectedProfileChanged += OnSelectedProfileChanged;
_profileEditorService.SelectedProfileElementChanged += OnSelectedElementChanged;
_profileEditorService.ProfileSelected += OnProfileSelected;
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
}
public FolderViewModel RootFolder { get; set; }
@@ -137,7 +137,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.ProfileTree
#region Event handlers
private void OnSelectedElementChanged(object sender, EventArgs e)
private void OnProfileElementSelected(object sender, EventArgs e)
{
if (_profileEditorService.SelectedProfileElement == SelectedTreeItem?.ProfileElement)
return;
@@ -161,7 +161,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.ProfileTree
}
}
private void OnSelectedProfileChanged(object sender, EventArgs e)
private void OnProfileSelected(object sender, EventArgs e)
{
CreateRootFolderViewModel();
}
@@ -26,7 +26,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
Update();
Layer.RenderPropertiesUpdated += LayerOnRenderPropertiesUpdated;
_profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
_profileEditorService.ProfilePreviewUpdated += ProfileEditorServiceOnProfilePreviewUpdated;
}
@@ -42,7 +42,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
public void Dispose()
{
Layer.RenderPropertiesUpdated -= LayerOnRenderPropertiesUpdated;
_profileEditorService.SelectedProfileElementChanged -= OnSelectedProfileElementChanged;
_profileEditorService.ProfileElementSelected -= OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
_profileEditorService.ProfilePreviewUpdated -= ProfileEditorServiceOnProfilePreviewUpdated;
}
@@ -186,7 +186,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
Update();
}
private void OnSelectedProfileElementChanged(object sender, EventArgs e)
private void OnProfileElementSelected(object sender, EventArgs e)
{
IsSelected = _profileEditorService.SelectedProfileElement == Layer;
}
@@ -57,8 +57,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
CreateUpdateTrigger();
ActivateToolByIndex(0);
_profileEditorService.SelectedProfileChanged += OnSelectedProfileChanged;
_profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
_profileEditorService.ProfileSelected += OnProfileSelected;
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
eventAggregator.Subscribe(this);
}
@@ -151,10 +151,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
_updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / targetFps};
_updateTrigger.Update += UpdateLeds;
_surfaceService.ActiveSurfaceConfigurationChanged += OnActiveSurfaceConfigurationChanged;
_surfaceService.ActiveSurfaceConfigurationSelected += OnActiveSurfaceConfigurationSelected;
}
private void OnActiveSurfaceConfigurationChanged(object sender, SurfaceConfigurationEventArgs e)
private void OnActiveSurfaceConfigurationSelected(object sender, SurfaceConfigurationEventArgs e)
{
ApplySurfaceConfiguration(e.Surface);
}
@@ -349,12 +349,12 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
UpdateLedsDimStatus();
}
private void OnSelectedProfileChanged(object sender, EventArgs e)
private void OnProfileSelected(object sender, EventArgs e)
{
ApplyActiveProfile();
}
private void OnSelectedProfileElementChanged(object sender, EventArgs e)
private void OnProfileElementSelected(object sender, EventArgs e)
{
UpdateLedsDimStatus();
CanApplyToLayer = _profileEditorService.SelectedProfileElement is Layer;
@@ -25,8 +25,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
Cursor = Cursors.Arrow;
Update();
profileEditorService.SelectedProfileChanged += (sender, args) => Update();
profileEditorService.SelectedProfileElementChanged += (sender, args) => Update();
profileEditorService.ProfileSelected += (sender, args) => Update();
profileEditorService.ProfileElementSelected += (sender, args) => Update();
profileEditorService.SelectedProfileElementUpdated += (sender, args) => Update();
profileEditorService.ProfilePreviewUpdated += (sender, args) => Update();
}
@@ -22,7 +22,7 @@ namespace Artemis.UI.Screens.Settings.Debug
_rgbService = rgbService;
surfaceService.SurfaceConfigurationUpdated += (sender, args) => Execute.PostToUIThread(() => CurrentFrame = null);
surfaceService.ActiveSurfaceConfigurationChanged += (sender, args) => Execute.PostToUIThread(() => CurrentFrame = null);
surfaceService.ActiveSurfaceConfigurationSelected += (sender, args) => Execute.PostToUIThread(() => CurrentFrame = null);
}
public ImageSource CurrentFrame { get; set; }
@@ -28,7 +28,6 @@ namespace Artemis.UI.Screens.Settings
private readonly ISettingsService _settingsService;
private readonly ISurfaceService _surfaceService;
private readonly IWindowManager _windowManager;
private object _test;
public SettingsViewModel(IKernel kernel,
ISurfaceService surfaceService,
@@ -11,7 +11,7 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
Led = led;
ApplyLedToViewModel();
Led.PropertyChanged += OnLedOnPropertyChanged;
Led.PropertyChanged += ApplyViewModelOnLedChange;
}
public Led Led { get; set; }
@@ -30,7 +30,7 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
Height = Led.ActualSize.Height;
}
private void OnLedOnPropertyChanged(object sender, PropertyChangedEventArgs args)
private void ApplyViewModelOnLedChange(object sender, PropertyChangedEventArgs args)
{
if (args.PropertyName == "Location" || args.PropertyName == "ActualSize") ApplyLedToViewModel();
}