From ef9cfb9ce846596c139af7f10de0c96dff8a98f5 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 28 Aug 2020 21:34:28 +0200 Subject: [PATCH] Project - Cleaned up some test code UI - Added scaffolding for databindings --- .../Types/SKSizeLayerProperty.cs | 2 +- .../Shared/DataModelVisualizationViewModel.cs | 2 +- .../DisplayConditionsView.xaml | 4 - .../DataBindings/DataBindingView.xaml | 271 ++++++++++++++++++ ...abViewModel.cs => DataBindingViewModel.cs} | 4 +- .../DataBindings/DataBindingsTabView.xaml | 12 - .../DataBindings/DataBindingsTabsView.xaml | 18 ++ .../DataBindings/DataBindingsTabsViewModel.cs | 16 ++ .../DataBindings/DataBindingsView.xaml | 17 +- .../DataBindings/DataBindingsViewModel.cs | 37 ++- .../LayerProperties/LayerPropertiesView.xaml | 126 ++++---- .../LayerPropertiesViewModel.cs | 7 +- .../Tree/TreePropertyView.xaml | 20 +- .../Tree/TreePropertyViewModel.cs | 14 +- src/Artemis.sln | 24 -- .../TestModules/TestModule1/PluginModule.cs | 37 --- .../Properties/launchSettings.json | 9 - .../TestModule1/TestModule1.csproj | 39 --- .../TestModules/TestModule1/plugin.json | 7 - .../TestModules/TestModule2/PluginModule.cs | 38 --- .../Properties/launchSettings.json | 9 - .../TestModule2/TestModule2.csproj | 39 --- .../TestModules/TestModule2/plugin.json | 7 - .../TestModule3/DataModels/PluginDataModel.cs | 40 --- .../TestModules/TestModule3/PluginModule.cs | 36 --- .../Properties/launchSettings.json | 9 - .../TestModule3/TestModule3.csproj | 39 --- .../TestModules/TestModule3/plugin.json | 7 - 28 files changed, 437 insertions(+), 453 deletions(-) create mode 100644 src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml rename src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/{DataBindingsTabViewModel.cs => DataBindingViewModel.cs} (75%) delete mode 100644 src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabView.xaml create mode 100644 src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsView.xaml create mode 100644 src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsViewModel.cs delete mode 100644 src/Plugins/TestModules/TestModule1/PluginModule.cs delete mode 100644 src/Plugins/TestModules/TestModule1/Properties/launchSettings.json delete mode 100644 src/Plugins/TestModules/TestModule1/TestModule1.csproj delete mode 100644 src/Plugins/TestModules/TestModule1/plugin.json delete mode 100644 src/Plugins/TestModules/TestModule2/PluginModule.cs delete mode 100644 src/Plugins/TestModules/TestModule2/Properties/launchSettings.json delete mode 100644 src/Plugins/TestModules/TestModule2/TestModule2.csproj delete mode 100644 src/Plugins/TestModules/TestModule2/plugin.json delete mode 100644 src/Plugins/TestModules/TestModule3/DataModels/PluginDataModel.cs delete mode 100644 src/Plugins/TestModules/TestModule3/PluginModule.cs delete mode 100644 src/Plugins/TestModules/TestModule3/Properties/launchSettings.json delete mode 100644 src/Plugins/TestModules/TestModule3/TestModule3.csproj delete mode 100644 src/Plugins/TestModules/TestModule3/plugin.json diff --git a/src/Artemis.Core/Models/Profile/LayerProperties/Types/SKSizeLayerProperty.cs b/src/Artemis.Core/Models/Profile/LayerProperties/Types/SKSizeLayerProperty.cs index 9fc026286..80c9ddd9c 100644 --- a/src/Artemis.Core/Models/Profile/LayerProperties/Types/SKSizeLayerProperty.cs +++ b/src/Artemis.Core/Models/Profile/LayerProperties/Types/SKSizeLayerProperty.cs @@ -26,7 +26,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties.Types public override List GetDataBindingProperties() { - return typeof(SKSize).GetProperties().ToList(); + return typeof(SKSize).GetProperties().Where(p => p.CanWrite).ToList(); } } } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs index e61b1d1a8..2e095d188 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs @@ -156,7 +156,7 @@ namespace Artemis.UI.Shared.DataModelVisualization.Shared if (Children.Any()) { foreach (var child in Children) - child.ApplyTypeFilter(looseMatch, filteredTypes); + child?.ApplyTypeFilter(looseMatch, filteredTypes); IsMatchingFilteredTypes = true; return; diff --git a/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsView.xaml b/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsView.xaml index 73148588c..4db3d2b77 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsView.xaml @@ -172,9 +172,5 @@ - - - - \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml new file mode 100644 index 000000000..3c2c32b75 --- /dev/null +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Replace value + + + Add to value + + + Subtract from value + + + + + + + + + + Ease in + + + Ease out + + + Ease in and out + + + + + + + + + + + + Test result + + + + + + + + + + + + Input + 1250 + + Output + 909 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs similarity index 75% rename from src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabViewModel.cs rename to src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs index 1343d0706..9059a6ac4 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs @@ -4,9 +4,9 @@ using Stylet; namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings { - public class DataBindingsTabViewModel : PropertyChangedBase + public class DataBindingViewModel : PropertyChangedBase { - public DataBindingsTabViewModel(BaseLayerProperty layerProperty, PropertyInfo dataBindingProperty) + public DataBindingViewModel(BaseLayerProperty layerProperty, PropertyInfo dataBindingProperty) { DisplayName = dataBindingProperty.Name.ToUpper(); LayerProperty = layerProperty; diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabView.xaml deleted file mode 100644 index 7ba15e6eb..000000000 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabView.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsView.xaml new file mode 100644 index 000000000..c0d22438d --- /dev/null +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsView.xaml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsViewModel.cs new file mode 100644 index 000000000..26676b271 --- /dev/null +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsTabsViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Stylet; + +namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings +{ + public class DataBindingsTabsViewModel : PropertyChangedBase + { + public DataBindingsTabsViewModel() + { + Tabs = new BindableCollection(); + } + public BindableCollection Tabs { get; set; } + } +} diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsView.xaml index eea97b713..93861e1b9 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsView.xaml @@ -9,16 +9,9 @@ mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance local:DataBindingsViewModel}"> - - - - - - - - - + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs index c2873a44a..707d56fd7 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs @@ -1,25 +1,50 @@ -using Artemis.Core.Models.Profile.LayerProperties; +using System.Linq; +using Artemis.Core.Models.Profile.LayerProperties; using Stylet; namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings { public class DataBindingsViewModel : PropertyChangedBase { + private DataBindingViewModel _dataBindingViewModel; + private DataBindingsTabsViewModel _dataBindingsTabsViewModel; + public DataBindingsViewModel(BaseLayerProperty layerProperty) { - Tabs = new BindableCollection(); LayerProperty = layerProperty; - Initialise(); } - public BindableCollection Tabs { get; set; } public BaseLayerProperty LayerProperty { get; } + public DataBindingViewModel DataBindingViewModel + { + get => _dataBindingViewModel; + set => SetAndNotify(ref _dataBindingViewModel, value); + } + + public DataBindingsTabsViewModel DataBindingsTabsViewModel + { + get => _dataBindingsTabsViewModel; + set => SetAndNotify(ref _dataBindingsTabsViewModel, value); + } + private void Initialise() { - foreach (var dataBindingProperty in LayerProperty.GetDataBindingProperties()) - Tabs.Add(new DataBindingsTabViewModel(LayerProperty, dataBindingProperty)); + var properties = LayerProperty.GetDataBindingProperties(); + if (properties.Count == 0) + return; + + if (properties.Count == 1) + { + DataBindingViewModel = new DataBindingViewModel(LayerProperty, properties.First()); + } + else + { + DataBindingsTabsViewModel = new DataBindingsTabsViewModel(); + foreach (var dataBindingProperty in LayerProperty.GetDataBindingProperties()) + DataBindingsTabsViewModel.Tabs.Add(new DataBindingViewModel(LayerProperty, dataBindingProperty)); + } } } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesView.xaml index 255e7c213..0adc9b3ab 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesView.xaml @@ -168,60 +168,34 @@ Grid.Column="2" x:Name="RightSideTransitioner" SelectedIndex="{Binding RightSideIndex}" - DefaultTransitionOrigin="0, 0.5" - AutoApplyTransitionOrigins="True"> - - - - - - + DefaultTransitionOrigin="0, 0.5"> + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + - + + + diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesViewModel.cs index 7b976ce1f..c83ba39d0 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/LayerPropertiesViewModel.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Threading.Tasks; using System.Windows; using System.Windows.Input; using System.Windows.Media; @@ -227,11 +228,9 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties { RightSideIndex = 1; DataBindingsViewModel = new DataBindingsViewModel(ProfileEditorService.SelectedDataBinding); - } else - { - RightSideIndex = 0; - DataBindingsViewModel = null; } + else + RightSideIndex = 0; } #region View model managament diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml index f7c2553ff..efffe5037 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml @@ -45,15 +45,15 @@ - - + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyViewModel.cs index 66fb63562..e15617f39 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyViewModel.cs @@ -9,7 +9,6 @@ using Stylet; namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree { - public class TreePropertyViewModel : TreePropertyViewModel { private readonly IProfileEditorService _profileEditorService; @@ -21,6 +20,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree _profileEditorService = profileEditorService; LayerPropertyViewModel = (LayerPropertyViewModel) layerPropertyBaseViewModel; PropertyInputViewModel = propertyInputViewModel; + + _profileEditorService.SelectedDataBindingChanged += ProfileEditorServiceOnSelectedDataBindingChanged; } public LayerPropertyViewModel LayerPropertyViewModel { get; } @@ -37,9 +38,10 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree set => ApplyKeyframesEnabled(value); } - public void OpenDataBindings() + public bool DataBindingsOpen { - _profileEditorService.ChangeSelectedDataBinding(LayerPropertyViewModel.BaseLayerProperty); + get => _profileEditorService.SelectedDataBinding == LayerPropertyViewModel.BaseLayerProperty; + set => _profileEditorService.ChangeSelectedDataBinding(value ? LayerPropertyViewModel.BaseLayerProperty : null); } public override void Dispose() @@ -47,6 +49,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree PropertyInputViewModel.Dispose(); } + private void ProfileEditorServiceOnSelectedDataBindingChanged(object sender, EventArgs e) + { + NotifyOfPropertyChange(nameof(DataBindingsOpen)); + } + private void ApplyKeyframesEnabled(bool enable) { // If enabling keyframes for the first time, add a keyframe with the current value at the current position @@ -77,6 +84,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree } public LayerPropertyBaseViewModel LayerPropertyBaseViewModel { get; } + public abstract void Dispose(); } } \ No newline at end of file diff --git a/src/Artemis.sln b/src/Artemis.sln index e84109a10..8b6d01397 100644 --- a/src/Artemis.sln +++ b/src/Artemis.sln @@ -79,14 +79,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Deb EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Modules.Overlay", "Plugins\Artemis.Plugins.Modules.Overlay\Artemis.Plugins.Modules.Overlay.csproj", "{00318027-7FDB-4C86-AB86-9005A481E330}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestModules", "TestModules", "{7497B6D5-FA21-4BDB-A752-28C935B748D2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestModule1", "Plugins\TestModules\TestModule1\TestModule1.csproj", "{CA3F9E44-10BE-4940-96A5-CA25750E40DA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestModule2", "Plugins\TestModules\TestModule2\TestModule2.csproj", "{228EF084-4430-4D0E-B728-D47C1C35F34D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestModule3", "Plugins\TestModules\TestModule3\TestModule3.csproj", "{979A10FE-7994-4426-A542-97058163FC27}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -185,18 +177,6 @@ Global {00318027-7FDB-4C86-AB86-9005A481E330}.Debug|x64.Build.0 = Debug|x64 {00318027-7FDB-4C86-AB86-9005A481E330}.Release|x64.ActiveCfg = Release|x64 {00318027-7FDB-4C86-AB86-9005A481E330}.Release|x64.Build.0 = Release|x64 - {CA3F9E44-10BE-4940-96A5-CA25750E40DA}.Debug|x64.ActiveCfg = Debug|x64 - {CA3F9E44-10BE-4940-96A5-CA25750E40DA}.Debug|x64.Build.0 = Debug|x64 - {CA3F9E44-10BE-4940-96A5-CA25750E40DA}.Release|x64.ActiveCfg = Release|x64 - {CA3F9E44-10BE-4940-96A5-CA25750E40DA}.Release|x64.Build.0 = Release|x64 - {228EF084-4430-4D0E-B728-D47C1C35F34D}.Debug|x64.ActiveCfg = Debug|x64 - {228EF084-4430-4D0E-B728-D47C1C35F34D}.Debug|x64.Build.0 = Debug|x64 - {228EF084-4430-4D0E-B728-D47C1C35F34D}.Release|x64.ActiveCfg = Release|x64 - {228EF084-4430-4D0E-B728-D47C1C35F34D}.Release|x64.Build.0 = Release|x64 - {979A10FE-7994-4426-A542-97058163FC27}.Debug|x64.ActiveCfg = Debug|x64 - {979A10FE-7994-4426-A542-97058163FC27}.Debug|x64.Build.0 = Debug|x64 - {979A10FE-7994-4426-A542-97058163FC27}.Release|x64.ActiveCfg = Release|x64 - {979A10FE-7994-4426-A542-97058163FC27}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -225,10 +205,6 @@ Global {62214042-667E-4B29-B64E-1A68CE6FE209} = {2C1477DC-7A5C-4B65-85DB-1F16A18FB2EC} {3D83760B-0A36-4C8F-978D-7949C3FC862B} = {88792A7E-F037-4280-81D3-B131508EF1D8} {00318027-7FDB-4C86-AB86-9005A481E330} = {B258A061-FA19-4835-8DC4-E9C3AE3664A0} - {7497B6D5-FA21-4BDB-A752-28C935B748D2} = {B258A061-FA19-4835-8DC4-E9C3AE3664A0} - {CA3F9E44-10BE-4940-96A5-CA25750E40DA} = {7497B6D5-FA21-4BDB-A752-28C935B748D2} - {228EF084-4430-4D0E-B728-D47C1C35F34D} = {7497B6D5-FA21-4BDB-A752-28C935B748D2} - {979A10FE-7994-4426-A542-97058163FC27} = {7497B6D5-FA21-4BDB-A752-28C935B748D2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C203080A-4473-4CC2-844B-F552EA43D66A} diff --git a/src/Plugins/TestModules/TestModule1/PluginModule.cs b/src/Plugins/TestModules/TestModule1/PluginModule.cs deleted file mode 100644 index 7e865baf2..000000000 --- a/src/Plugins/TestModules/TestModule1/PluginModule.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Artemis.Core.Models.Surface; -using Artemis.Core.Plugins.Modules; -using SkiaSharp; - - - - -namespace TestModule1 -{ - // The core of your module. Hover over the method names to see a description. - public class PluginModule : ProfileModule - { - // This is the beginning of your plugin life cycle. Use this instead of a constructor. - public override void EnablePlugin() - { - DisplayName = "TestModule1"; - DisplayIcon = "ToyBrickPlus"; - DefaultPriorityCategory = ModulePriorityCategory.Normal; - - } - - // This is the end of your plugin life cycle. - public override void DisablePlugin() - { - // Make sure to clean up resources where needed (dispose IDisposables etc.) - } - - - public override void ModuleActivated(bool isOverride) - { - } - - public override void ModuleDeactivated(bool isOverride) - { - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule1/Properties/launchSettings.json b/src/Plugins/TestModules/TestModule1/Properties/launchSettings.json deleted file mode 100644 index e7eb59a06..000000000 --- a/src/Plugins/TestModules/TestModule1/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "ModuleProject": { - "commandName": "Executable", - "executablePath": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1\\Artemis.UI.exe", - "workingDirectory": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1" - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule1/TestModule1.csproj b/src/Plugins/TestModules/TestModule1/TestModule1.csproj deleted file mode 100644 index 3138b0b63..000000000 --- a/src/Plugins/TestModules/TestModule1/TestModule1.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - netcoreapp3.1 - false - - TestModule1 - TestModule1 - x64 - - - x64 - - - - - - - - - - - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.Core.dll - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.UI.Shared.dll - - - - - - PreserveNewest - - - - - - \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule1/plugin.json b/src/Plugins/TestModules/TestModule1/plugin.json deleted file mode 100644 index a9b30c57a..000000000 --- a/src/Plugins/TestModules/TestModule1/plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Guid": "e7aed08d-a998-457e-91d8-61cd5689896b", - "Name": "TestModule1", - "Description": "This is my awesome plugin", - "Version": "1.0.0.0", - "Main": "TestModule1.dll" -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule2/PluginModule.cs b/src/Plugins/TestModules/TestModule2/PluginModule.cs deleted file mode 100644 index b8cdaefdc..000000000 --- a/src/Plugins/TestModules/TestModule2/PluginModule.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Artemis.Core.Models.Surface; -using Artemis.Core.Plugins.Modules; -using SkiaSharp; - - - - -namespace TestModule2 -{ - // The core of your module. Hover over the method names to see a description. - public class PluginModule : ProfileModule - { - // This is the beginning of your plugin life cycle. Use this instead of a constructor. - public override void EnablePlugin() - { - DisplayName = "TestModule2"; - DisplayIcon = "ToyBrickPlus"; - DefaultPriorityCategory = ModulePriorityCategory.Application; - - } - - // This is the end of your plugin life cycle. - public override void DisablePlugin() - { - // Make sure to clean up resources where needed (dispose IDisposables etc.) - } - - public override void ModuleActivated(bool isOverride) - { - // When this gets called your activation requirements have been met and the module will start displaying - } - - public override void ModuleDeactivated(bool isOverride) - { - // When this gets called your activation requirements are no longer met and your module will stop displaying - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule2/Properties/launchSettings.json b/src/Plugins/TestModules/TestModule2/Properties/launchSettings.json deleted file mode 100644 index e7eb59a06..000000000 --- a/src/Plugins/TestModules/TestModule2/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "ModuleProject": { - "commandName": "Executable", - "executablePath": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1\\Artemis.UI.exe", - "workingDirectory": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1" - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule2/TestModule2.csproj b/src/Plugins/TestModules/TestModule2/TestModule2.csproj deleted file mode 100644 index 3cba5c3ab..000000000 --- a/src/Plugins/TestModules/TestModule2/TestModule2.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - netcoreapp3.1 - false - - TestModule2 - TestModule2 - x64 - - - x64 - - - - - - - - - - - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.Core.dll - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.UI.Shared.dll - - - - - - PreserveNewest - - - - - - \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule2/plugin.json b/src/Plugins/TestModules/TestModule2/plugin.json deleted file mode 100644 index 3b83d3294..000000000 --- a/src/Plugins/TestModules/TestModule2/plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Guid": "5ea31fec-3774-4cbf-8774-1cab7caaaa18", - "Name": "TestModule2", - "Description": "This is my awesome plugin", - "Version": "1.0.0.0", - "Main": "TestModule2.dll" -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule3/DataModels/PluginDataModel.cs b/src/Plugins/TestModules/TestModule3/DataModels/PluginDataModel.cs deleted file mode 100644 index 387358336..000000000 --- a/src/Plugins/TestModules/TestModule3/DataModels/PluginDataModel.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections.Generic; -using Artemis.Core.Plugins.DataModelExpansions; -using Artemis.Core.Plugins.DataModelExpansions.Attributes; - -namespace TestModule3.DataModels -{ - public class PluginDataModel : DataModel - { - public PluginDataModel() - { - PluginSubDataModel = new PluginSubDataModel(); - } - - // Your datamodel can have regular properties and you can annotate them if you'd like - [DataModelProperty(Name = "A test string", Description = "It doesn't do much, but it's there.")] - public string TemplateDataModelString { get; set; } - - // You can even have classes in your datamodel, just don't forget to instantiate them ;) - [DataModelProperty(Name = "A class within the datamodel")] - public PluginSubDataModel PluginSubDataModel { get; set; } - } - - public class PluginSubDataModel - { - public PluginSubDataModel() - { - ListOfInts = new List { 1, 2, 3, 4, 5 }; - } - - // You don't need to annotate properties, they will still show up - public float FloatyFloat { get; set; } - - // You can even have a list! - public List ListOfInts { get; set; } - - // If you don't want a property to show up in the datamodel, annotate it with DataModelIgnore - [DataModelIgnore] - public string MyDarkestSecret { get; set; } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule3/PluginModule.cs b/src/Plugins/TestModules/TestModule3/PluginModule.cs deleted file mode 100644 index 1594ae23c..000000000 --- a/src/Plugins/TestModules/TestModule3/PluginModule.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Artemis.Core.Models.Surface; -using Artemis.Core.Plugins.Modules; -using SkiaSharp; -using TestModule3.DataModels; - - - -namespace TestModule3 -{ - // The core of your module. Hover over the method names to see a description. - public class PluginModule : ProfileModule - { - // This is the beginning of your plugin life cycle. Use this instead of a constructor. - public override void EnablePlugin() - { - DisplayName = "TestModule3"; - DisplayIcon = "ToyBrickPlus"; - DefaultPriorityCategory = ModulePriorityCategory.Normal; - - } - - // This is the end of your plugin life cycle. - public override void DisablePlugin() - { - // Make sure to clean up resources where needed (dispose IDisposables etc.) - } - - public override void ModuleActivated(bool isOverride) - { - } - - public override void ModuleDeactivated(bool isOverride) - { - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule3/Properties/launchSettings.json b/src/Plugins/TestModules/TestModule3/Properties/launchSettings.json deleted file mode 100644 index e7eb59a06..000000000 --- a/src/Plugins/TestModules/TestModule3/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "ModuleProject": { - "commandName": "Executable", - "executablePath": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1\\Artemis.UI.exe", - "workingDirectory": "C:\\Repos\\Artemis\\src\\Artemis.UI\\bin\\x64\\Debug\\netcoreapp3.1" - } - } -} \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule3/TestModule3.csproj b/src/Plugins/TestModules/TestModule3/TestModule3.csproj deleted file mode 100644 index a1c4adfb5..000000000 --- a/src/Plugins/TestModules/TestModule3/TestModule3.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - netcoreapp3.1 - false - - TestModule3 - TestModule3 - x64 - - - x64 - - - - - - - - - - - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.Core.dll - - - C:\Repos\Artemis\src\Artemis.UI\bin\x64\Debug\netcoreapp3.1\Artemis.UI.Shared.dll - - - - - - PreserveNewest - - - - - - \ No newline at end of file diff --git a/src/Plugins/TestModules/TestModule3/plugin.json b/src/Plugins/TestModules/TestModule3/plugin.json deleted file mode 100644 index 826638c33..000000000 --- a/src/Plugins/TestModules/TestModule3/plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Guid": "48011e31-a309-4069-820e-e734f37fc79f", - "Name": "TestModule3", - "Description": "This is my awesome plugin", - "Version": "1.0.0.0", - "Main": "TestModule3.dll" -} \ No newline at end of file