mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Marked all service implementations as internal
Core - Enabled XML docs Modules - Added DI to module VMs
This commit is contained in:
parent
ae9bdecef1
commit
a06ad8f011
@ -16,6 +16,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DocumentationFile>bin\AnyCPU\Debug\Artemis.Core.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>2.0-{chash:6}</NrtRevisionFormat>
|
||||
@ -27,6 +28,9 @@
|
||||
<NrtRequiredVcs>git</NrtRequiredVcs>
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile>bin\AnyCPU\Release\Artemis.Core.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Storage\Artemis.Storage.csproj">
|
||||
<Private>false</Private>
|
||||
@ -46,7 +50,7 @@
|
||||
<PackageReference Include="Serilog.Sinks.Debug" Version="1.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<PackageReference Include="System.Reflection.Metadata" Version="1.8.0" />
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Interop;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// A few useful constant values
|
||||
/// </summary>
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
@ -68,7 +70,7 @@ namespace Artemis.Core
|
||||
{
|
||||
typeof(float),
|
||||
typeof(double),
|
||||
typeof(decimal)
|
||||
typeof(decimal)
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -24,6 +24,7 @@ namespace Artemis.Core.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IArtemisService>()
|
||||
.BindAllInterfaces()
|
||||
@ -34,6 +35,7 @@ namespace Artemis.Core.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IProtectedArtemisService>()
|
||||
.BindAllInterfaces()
|
||||
@ -68,6 +70,7 @@ namespace Artemis.Core.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromAssemblyContaining<IStorageMigration>()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IStorageMigration>()
|
||||
.BindAllInterfaces()
|
||||
@ -78,6 +81,7 @@ namespace Artemis.Core.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromAssemblyContaining<IRepository>()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IRepository>()
|
||||
.BindAllInterfaces()
|
||||
|
||||
@ -5,7 +5,7 @@ using Artemis.Core.Models.Surface;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.ModuleActivationRequirements;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
using Artemis.Storage.Entities.Module;
|
||||
using SkiaSharp;
|
||||
|
||||
@ -134,10 +134,10 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
public abstract void Render(double deltaTime, ArtemisSurface surface, SKCanvas canvas, SKImageInfo canvasInfo);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the module's view model is being show, return view models here to create tabs for them
|
||||
/// Called when the module's view model is being show, return a list of module tabs here if you want them to show up in the UI
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract IEnumerable<ModuleViewModel> GetViewModels();
|
||||
public abstract IEnumerable<ModuleTab> GetModuleTabs();
|
||||
|
||||
/// <summary>
|
||||
/// Called when the <see cref="ActivationRequirements" /> are met
|
||||
|
||||
43
src/Artemis.Core/Plugins/Modules/ModuleTab.cs
Normal file
43
src/Artemis.Core/Plugins/Modules/ModuleTab.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
|
||||
namespace Artemis.Core.Plugins.Modules
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class ModuleTab<T> : ModuleTab where T : ModuleViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModuleTab{T}" /> class
|
||||
/// </summary>
|
||||
/// <param name="title">The title of the tab</param>
|
||||
public ModuleTab(string title)
|
||||
{
|
||||
Title = title;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Type Type => typeof(T);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a UI tab for a specific module
|
||||
/// </summary>
|
||||
public abstract class ModuleTab
|
||||
{
|
||||
/// <summary>
|
||||
/// The module this tab belongs to
|
||||
/// </summary>
|
||||
internal Module Module { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title of the tab
|
||||
/// </summary>
|
||||
public string Title { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of view model the tab contains
|
||||
/// </summary>
|
||||
public abstract Type Type { get; }
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Artemis.Core.Extensions;
|
||||
|
||||
namespace Artemis.Core.Plugins.ModuleActivationRequirements
|
||||
namespace Artemis.Core.Plugins.Modules
|
||||
{
|
||||
public class ProcessActivationRequirement : IModuleActivationRequirement
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace Artemis.Core.Services
|
||||
/// <summary>
|
||||
/// Provides Artemis's core update loop
|
||||
/// </summary>
|
||||
public class CoreService : ICoreService
|
||||
internal class CoreService : ICoreService
|
||||
{
|
||||
private readonly Stopwatch _frameStopWatch;
|
||||
private readonly ILogger _logger;
|
||||
@ -41,7 +41,7 @@ namespace Artemis.Core.Services
|
||||
private IntroAnimation _introAnimation;
|
||||
|
||||
// ReSharper disable once UnusedParameter.Local - Storage migration service is injected early to ensure it runs before anything else
|
||||
internal CoreService(ILogger logger, StorageMigrationService _, ISettingsService settingsService, IPluginService pluginService,
|
||||
public CoreService(ILogger logger, StorageMigrationService _, ISettingsService settingsService, IPluginService pluginService,
|
||||
IRgbService rgbService, ISurfaceService surfaceService, IProfileService profileService, IModuleService moduleService)
|
||||
{
|
||||
_logger = logger;
|
||||
@ -173,7 +173,10 @@ namespace Artemis.Core.Services
|
||||
List<Module> modules;
|
||||
lock (_modules)
|
||||
{
|
||||
modules = _modules.Where(m => m.IsActivated).OrderByDescending(m => m.PriorityCategory).ThenByDescending(m => m.Priority).ToList();
|
||||
modules = _modules.Where(m => m.IsActivated || m.InternalExpandsMainDataModel)
|
||||
.OrderByDescending(m => m.PriorityCategory)
|
||||
.ThenByDescending(m => m.Priority)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
// Update all active modules
|
||||
@ -194,7 +197,8 @@ namespace Artemis.Core.Services
|
||||
canvas.Clear(new SKColor(0, 0, 0));
|
||||
if (!ModuleRenderingDisabled)
|
||||
{
|
||||
foreach (var module in modules)
|
||||
// While non-activated modules may be updated above if they expand the main data model, they may never render
|
||||
foreach (var module in modules.Where(m => m.IsActivated))
|
||||
module.Render(args.DeltaTime, _surfaceService.ActiveSurface, canvas, _rgbService.BitmapBrush.Bitmap.Info);
|
||||
}
|
||||
|
||||
|
||||
@ -20,14 +20,14 @@ namespace Artemis.Core.Services
|
||||
/// <summary>
|
||||
/// Provides access to the main data model
|
||||
/// </summary>
|
||||
public class DataModelService : IDataModelService
|
||||
internal class DataModelService : IDataModelService
|
||||
{
|
||||
private readonly List<DataModel> _dataModelExpansions;
|
||||
private readonly IPluginService _pluginService;
|
||||
private readonly ILogger _logger;
|
||||
private readonly List<DisplayConditionOperator> _registeredConditionOperators;
|
||||
|
||||
internal DataModelService(IPluginService pluginService, ILogger logger)
|
||||
public DataModelService(IPluginService pluginService, ILogger logger)
|
||||
{
|
||||
_pluginService = pluginService;
|
||||
_logger = logger;
|
||||
|
||||
@ -6,7 +6,7 @@ using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
public class DeviceService : IDeviceService
|
||||
internal class DeviceService : IDeviceService
|
||||
{
|
||||
private readonly ICoreService _coreService;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ using Serilog;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
public class ModuleService : IModuleService
|
||||
internal class ModuleService : IModuleService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IModuleRepository _moduleRepository;
|
||||
|
||||
@ -26,7 +26,7 @@ namespace Artemis.Core.Services
|
||||
/// <summary>
|
||||
/// Provides access to plugin loading and unloading
|
||||
/// </summary>
|
||||
public class PluginService : IPluginService
|
||||
internal class PluginService : IPluginService
|
||||
{
|
||||
private readonly IKernel _kernel;
|
||||
private readonly ILogger _logger;
|
||||
@ -34,7 +34,7 @@ namespace Artemis.Core.Services
|
||||
private readonly List<PluginInfo> _plugins;
|
||||
private IKernel _childKernel;
|
||||
|
||||
internal PluginService(IKernel kernel, ILogger logger, IPluginRepository pluginRepository)
|
||||
public PluginService(IKernel kernel, ILogger logger, IPluginRepository pluginRepository)
|
||||
{
|
||||
_kernel = kernel;
|
||||
_logger = logger;
|
||||
|
||||
@ -15,7 +15,7 @@ using Serilog;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
public class RenderElementService : IRenderElementService
|
||||
internal class RenderElementService : IRenderElementService
|
||||
{
|
||||
private readonly IKernel _kernel;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
@ -14,7 +14,7 @@ namespace Artemis.Core.Services
|
||||
/// <summary>
|
||||
/// Provides wrapped access the RGB.NET
|
||||
/// </summary>
|
||||
public class RgbService : IRgbService, IDisposable
|
||||
internal class RgbService : IRgbService, IDisposable
|
||||
{
|
||||
private readonly List<IRGBDevice> _loadedDevices;
|
||||
private readonly ILogger _logger;
|
||||
@ -23,7 +23,7 @@ namespace Artemis.Core.Services
|
||||
private readonly PluginSetting<int> _targetFrameRateSetting;
|
||||
private ListLedGroup _surfaceLedGroup;
|
||||
|
||||
internal RgbService(ILogger logger, ISettingsService settingsService)
|
||||
public RgbService(ILogger logger, ISettingsService settingsService)
|
||||
{
|
||||
_logger = logger;
|
||||
_renderScaleSetting = settingsService.GetSetting("Core.RenderScale", 0.5);
|
||||
|
||||
@ -5,7 +5,7 @@ using Artemis.Storage.Repositories.Interfaces;
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class SettingsService : ISettingsService
|
||||
internal class SettingsService : ISettingsService
|
||||
{
|
||||
private readonly PluginSettings _pluginSettings;
|
||||
|
||||
@ -26,6 +26,13 @@ namespace Artemis.Core.Services
|
||||
/// </summary>
|
||||
public interface ISettingsService : IProtectedArtemisService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the setting with the provided name. If the setting does not exist yet, it is created.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the setting, can be any serializable type</typeparam>
|
||||
/// <param name="name">The name of the setting</param>
|
||||
/// <param name="defaultValue">The default value to use if the setting does not exist yet</param>
|
||||
/// <returns></returns>
|
||||
PluginSetting<T> GetSetting<T>(string name, T defaultValue = default);
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ using Serilog;
|
||||
|
||||
namespace Artemis.Core.Services.Storage
|
||||
{
|
||||
public class ProfileService : IProfileService
|
||||
internal class ProfileService : IProfileService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IPluginService _pluginService;
|
||||
@ -59,7 +59,8 @@ namespace Artemis.Core.Services.Storage
|
||||
public void ActivateLastProfile(ProfileModule profileModule)
|
||||
{
|
||||
var activeProfile = GetLastActiveProfile(profileModule);
|
||||
ActivateProfile(activeProfile);
|
||||
if (activeProfile != null)
|
||||
ActivateProfile(activeProfile);
|
||||
}
|
||||
|
||||
public Profile ActivateProfile(ProfileDescriptor profileDescriptor)
|
||||
|
||||
@ -6,6 +6,7 @@ using Artemis.Core.Extensions;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Newtonsoft.Json;
|
||||
@ -91,7 +92,7 @@ namespace Artemis.Core.Utilities
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override IEnumerable<ModuleViewModel> GetViewModels()
|
||||
public override IEnumerable<ModuleTab> GetModuleTabs()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -29,6 +29,12 @@
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
<Version>2.0.0</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DocumentationFile>bin\AnyCPU\Debug\Artemis.UI.Shared.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile>bin\AnyCPU\Release\Artemis.UI.Shared.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AvalonEdit" Version="6.0.1" />
|
||||
<PackageReference Include="Humanizer.Core" Version="2.8.26" />
|
||||
@ -39,7 +45,7 @@
|
||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.3" />
|
||||
<PackageReference Include="SkiaSharp.Views.WPF" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0">
|
||||
|
||||
@ -19,6 +19,7 @@ namespace Artemis.UI.Shared.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromAssemblyContaining<IVmFactory>()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllInterfaces()
|
||||
.InheritedFrom<IVmFactory>()
|
||||
.BindToFactory();
|
||||
@ -28,6 +29,7 @@ namespace Artemis.UI.Shared.Ninject
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromAssemblyContaining<IArtemisSharedUIService>()
|
||||
.IncludingNonPublicTypes()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IArtemisSharedUIService>()
|
||||
.BindAllInterfaces()
|
||||
|
||||
@ -18,7 +18,7 @@ using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class DataModelVisualizationService : IDataModelVisualizationService
|
||||
internal class DataModelVisualizationService : IDataModelVisualizationService
|
||||
{
|
||||
private readonly IDataModelService _dataModelService;
|
||||
private readonly IKernel _kernel;
|
||||
|
||||
@ -12,7 +12,7 @@ using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.Dialog
|
||||
{
|
||||
public class DialogService : IDialogService
|
||||
internal class DialogService : IDialogService
|
||||
{
|
||||
private readonly IKernel _kernel;
|
||||
private readonly IViewManager _viewManager;
|
||||
|
||||
@ -6,7 +6,7 @@ using Artemis.UI.Shared.Services.Interfaces;
|
||||
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class GradientPickerService : IGradientPickerService
|
||||
internal class GradientPickerService : IGradientPickerService
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ using Serilog;
|
||||
|
||||
namespace Artemis.UI.Shared.Services
|
||||
{
|
||||
public class ProfileEditorService : IProfileEditorService
|
||||
internal class ProfileEditorService : IProfileEditorService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IProfileService _profileService;
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||
<PackageReference Include="Serilog" Version="2.9.0" />
|
||||
<PackageReference Include="SkiaSharp.Views.WPF" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Module
|
||||
@ -9,13 +12,15 @@ namespace Artemis.UI.Screens.Module
|
||||
public class ModuleRootViewModel : Conductor<Screen>.Collection.OneActive
|
||||
{
|
||||
private readonly IProfileEditorVmFactory _profileEditorVmFactory;
|
||||
private readonly IKernel _kernel;
|
||||
|
||||
public ModuleRootViewModel(Core.Plugins.Abstract.Module module, IProfileEditorVmFactory profileEditorVmFactory)
|
||||
public ModuleRootViewModel(Core.Plugins.Abstract.Module module, IProfileEditorVmFactory profileEditorVmFactory, IKernel kernel)
|
||||
{
|
||||
DisplayName = module?.DisplayName;
|
||||
Module = module;
|
||||
|
||||
_profileEditorVmFactory = profileEditorVmFactory;
|
||||
_kernel = kernel;
|
||||
|
||||
Task.Run(AddTabsAsync);
|
||||
}
|
||||
@ -34,8 +39,18 @@ namespace Artemis.UI.Screens.Module
|
||||
Items.Add(profileEditor);
|
||||
}
|
||||
|
||||
var moduleViewModels = Module.GetViewModels();
|
||||
Items.AddRange(moduleViewModels);
|
||||
var moduleTabs = Module.GetModuleTabs();
|
||||
if (moduleTabs != null)
|
||||
{
|
||||
foreach (var moduleTab in moduleTabs.Where(m => m != null))
|
||||
{
|
||||
var module = new ConstructorArgument("module", Module);
|
||||
var displayName = new ConstructorArgument("displayName", DisplayName);
|
||||
|
||||
var viewModel = (ModuleViewModel) _kernel.Get(moduleTab.Type, module, displayName);
|
||||
Items.Add(viewModel);
|
||||
}
|
||||
}
|
||||
|
||||
ActiveItem = Items.FirstOrDefault();
|
||||
}
|
||||
|
||||
@ -233,6 +233,7 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
LoadWorkspaceSettings();
|
||||
Module.IsProfileUpdatingDisabled = true;
|
||||
Module.ActiveProfileChanged += ModuleOnActiveProfileChanged;
|
||||
|
||||
Execute.PostToUIThread(LoadProfiles);
|
||||
base.OnInitialActivate();
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.3" />
|
||||
<PackageReference Include="Stylet" Version="1.3.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.4" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
using Artemis.Plugins.Modules.General.DataModel;
|
||||
using Artemis.Plugins.Modules.General.DataModel.Windows;
|
||||
using Artemis.Plugins.Modules.General.Utilities;
|
||||
@ -18,10 +19,10 @@ namespace Artemis.Plugins.Modules.General
|
||||
DisplayIcon = "AllInclusive";
|
||||
ExpandsDataModel = true;
|
||||
|
||||
DataModel.TestTimeList.Add(new TimeDataModel { CurrentTime = DateTime.Now.AddDays(1), CurrentTimeUTC = DateTime.UtcNow.AddDays(1) });
|
||||
DataModel.TestTimeList.Add(new TimeDataModel { CurrentTime = DateTime.Now.AddDays(2), CurrentTimeUTC = DateTime.UtcNow.AddDays(2) });
|
||||
DataModel.TestTimeList.Add(new TimeDataModel { CurrentTime = DateTime.Now.AddDays(3), CurrentTimeUTC = DateTime.UtcNow.AddDays(3) });
|
||||
DataModel.TestTimeList.Add(new TimeDataModel { CurrentTime = DateTime.Now.AddDays(4), CurrentTimeUTC = DateTime.UtcNow.AddDays(4) });
|
||||
DataModel.TestTimeList.Add(new TimeDataModel {CurrentTime = DateTime.Now.AddDays(1), CurrentTimeUTC = DateTime.UtcNow.AddDays(1)});
|
||||
DataModel.TestTimeList.Add(new TimeDataModel {CurrentTime = DateTime.Now.AddDays(2), CurrentTimeUTC = DateTime.UtcNow.AddDays(2)});
|
||||
DataModel.TestTimeList.Add(new TimeDataModel {CurrentTime = DateTime.Now.AddDays(3), CurrentTimeUTC = DateTime.UtcNow.AddDays(3)});
|
||||
DataModel.TestTimeList.Add(new TimeDataModel {CurrentTime = DateTime.Now.AddDays(4), CurrentTimeUTC = DateTime.UtcNow.AddDays(4)});
|
||||
}
|
||||
|
||||
public override void DisablePlugin()
|
||||
@ -45,9 +46,9 @@ namespace Artemis.Plugins.Modules.General
|
||||
base.Update(deltaTime);
|
||||
}
|
||||
|
||||
public override IEnumerable<ModuleViewModel> GetViewModels()
|
||||
public override IEnumerable<ModuleTab> GetModuleTabs()
|
||||
{
|
||||
return new List<ModuleViewModel> { new GeneralViewModel(this) };
|
||||
return new List<ModuleTab> {new ModuleTab<GeneralViewModel>("General")};
|
||||
}
|
||||
|
||||
#region Open windows
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user