mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Project cleanup
This commit is contained in:
parent
529e52b35d
commit
ab3f2b1fd8
@ -32,43 +32,62 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Castle.Core.4.2.0\lib\net45\Castle.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HidSharp, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\HidSharp.1.5\lib\net35\HidSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Ninject.Extensions.Conventions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ninject.Extensions.Conventions.3.3.0\lib\net45\Ninject.Extensions.Conventions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Ninject.Extensions.Factory, Version=3.3.2.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ninject.Extensions.Factory.3.3.2\lib\net45\Ninject.Extensions.Factory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Brushes, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Brushes, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Brushes.0.0.1.10\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Brushes.0.0.1.18\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Core, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Core, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Core.0.0.1.10\lib\net45\RGB.NET.Core.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Core.0.0.1.18\lib\net45\RGB.NET.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Decorators, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Decorators, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Decorators.0.0.1.10\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Decorators.0.0.1.18\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Asus, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Asus, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Asus.0.0.1.10\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Asus.0.0.1.18\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.10\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.18\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Corsair, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Corsair, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.0.1.10\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.0.1.18\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Logitech, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Logitech, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.0.1.10\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.0.1.18\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Msi, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Msi, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Msi.0.0.1.10\lib\net45\RGB.NET.Devices.Msi.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Msi.0.0.1.18\lib\net45\RGB.NET.Devices.Msi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Novation, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Novation, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Novation.0.0.1.10\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Novation.0.0.1.18\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="RGB.NET.Devices.Razer, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\RGB.NET.Devices.Razer.0.0.1.18\lib\net45\RGB.NET.Devices.Razer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Groups, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Groups, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Groups.0.0.1.10\lib\net45\RGB.NET.Groups.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Groups.0.0.1.18\lib\net45\RGB.NET.Groups.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Sanford.Multimedia.Midi, Version=6.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Sanford.Multimedia.Midi, Version=6.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Sanford.Multimedia.Midi.6.4.1\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
<HintPath>..\packages\Sanford.Multimedia.Midi.6.4.1\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@ -78,25 +97,34 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Ninject\CoreModule.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Services\CoreService.cs" />
|
||||||
|
<Compile Include="Services\Interfaces\IArtemisService.cs" />
|
||||||
|
<Compile Include="Services\Interfaces\ICoreService.cs" />
|
||||||
|
<Compile Include="Services\Interfaces\IModuleService.cs" />
|
||||||
|
<Compile Include="Services\ModuleService.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Asus.0.0.1.10\build\net45\RGB.NET.Devices.Asus.targets" Condition="Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.10\build\net45\RGB.NET.Devices.Asus.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Asus.0.0.1.18\build\net45\RGB.NET.Devices.Asus.targets" Condition="Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.18\build\net45\RGB.NET.Devices.Asus.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.10\build\net45\RGB.NET.Devices.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Asus.0.0.1.10\build\net45\RGB.NET.Devices.Asus.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.18\build\net45\RGB.NET.Devices.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Asus.0.0.1.18\build\net45\RGB.NET.Devices.Asus.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.10\build\net45\RGB.NET.Devices.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.10\build\net45\RGB.NET.Devices.CoolerMaster.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.18\build\net45\RGB.NET.Devices.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.18\build\net45\RGB.NET.Devices.CoolerMaster.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.10\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.0.0.1.10\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.18\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.0.0.1.18\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.10\build\net45\RGB.NET.Devices.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Logitech.0.0.1.10\build\net45\RGB.NET.Devices.Logitech.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.18\build\net45\RGB.NET.Devices.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Logitech.0.0.1.18\build\net45\RGB.NET.Devices.Logitech.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.10\build\net45\RGB.NET.Devices.Msi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Msi.0.0.1.10\build\net45\RGB.NET.Devices.Msi.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.18\build\net45\RGB.NET.Devices.Msi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Msi.0.0.1.18\build\net45\RGB.NET.Devices.Msi.targets'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.18\build\net45\RGB.NET.Devices.Razer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Razer.0.0.1.18\build\net45\RGB.NET.Devices.Razer.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.10\build\net45\RGB.NET.Devices.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.10\build\net45\RGB.NET.Devices.CoolerMaster.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.18\build\net45\RGB.NET.Devices.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.18\build\net45\RGB.NET.Devices.CoolerMaster.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Corsair.0.0.1.10\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.10\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Corsair.0.0.1.18\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.18\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.10\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.10\build\net45\RGB.NET.Devices.Logitech.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.18\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.18\build\net45\RGB.NET.Devices.Logitech.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.10\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.10\build\net45\RGB.NET.Devices.Msi.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.18\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.18\build\net45\RGB.NET.Devices.Msi.targets')" />
|
||||||
|
<Import Project="..\packages\RGB.NET.Devices.Razer.0.0.1.18\build\net45\RGB.NET.Devices.Razer.targets" Condition="Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.18\build\net45\RGB.NET.Devices.Razer.targets')" />
|
||||||
</Project>
|
</Project>
|
||||||
22
src/Artemis.Core/Ninject/CoreModule.cs
Normal file
22
src/Artemis.Core/Ninject/CoreModule.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using Artemis.Core.Services.Interfaces;
|
||||||
|
using Ninject.Extensions.Conventions;
|
||||||
|
using Ninject.Modules;
|
||||||
|
|
||||||
|
namespace Artemis.Core.Ninject
|
||||||
|
{
|
||||||
|
public class CoreModule : NinjectModule
|
||||||
|
{
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
// Bind all services as singletons
|
||||||
|
Kernel.Bind(x =>
|
||||||
|
{
|
||||||
|
x.FromThisAssembly()
|
||||||
|
.SelectAllClasses()
|
||||||
|
.InheritedFrom<IArtemisService>()
|
||||||
|
.BindAllInterfaces()
|
||||||
|
.Configure(c => c.InSingletonScope());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
8
src/Artemis.Core/Services/CoreService.cs
Normal file
8
src/Artemis.Core/Services/CoreService.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using Artemis.Core.Services.Interfaces;
|
||||||
|
|
||||||
|
namespace Artemis.Core.Services
|
||||||
|
{
|
||||||
|
public class CoreService : ICoreService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/Artemis.Core/Services/Interfaces/IArtemisService.cs
Normal file
6
src/Artemis.Core/Services/Interfaces/IArtemisService.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace Artemis.Core.Services.Interfaces
|
||||||
|
{
|
||||||
|
public interface IArtemisService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/Artemis.Core/Services/Interfaces/ICoreService.cs
Normal file
6
src/Artemis.Core/Services/Interfaces/ICoreService.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace Artemis.Core.Services.Interfaces
|
||||||
|
{
|
||||||
|
public interface ICoreService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/Artemis.Core/Services/Interfaces/IModuleService.cs
Normal file
6
src/Artemis.Core/Services/Interfaces/IModuleService.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace Artemis.Core.Services.Interfaces
|
||||||
|
{
|
||||||
|
public interface IModuleService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
8
src/Artemis.Core/Services/ModuleService.cs
Normal file
8
src/Artemis.Core/Services/ModuleService.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using Artemis.Core.Services.Interfaces;
|
||||||
|
|
||||||
|
namespace Artemis.Core.Services
|
||||||
|
{
|
||||||
|
public class ModuleService : IModuleService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
16
src/Artemis.Core/app.config
Normal file
16
src/Artemis.Core/app.config
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@ -1,18 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<packages>
|
<packages>
|
||||||
<package id="RGB.NET" version="0.0.1.10" targetFramework="net46" />
|
<package id="Castle.Core" version="4.2.0" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Brushes" version="0.0.1.10" targetFramework="net46" />
|
<package id="HidSharp" version="1.5" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Core" version="0.0.1.10" targetFramework="net46" />
|
<package id="Ninject" version="3.3.4" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Decorators" version="0.0.1.10" targetFramework="net46" />
|
<package id="Ninject.Extensions.Conventions" version="3.3.0" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices" version="0.0.1.10" targetFramework="net46" />
|
<package id="Ninject.Extensions.Factory" version="3.3.2" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.Asus" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.CoolerMaster" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Brushes" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.Corsair" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Core" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.Logitech" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Decorators" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.Msi" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Devices" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Devices.Novation" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Devices.Asus" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Groups" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Devices.CoolerMaster" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="RGB.NET.Presets" version="0.0.1.10" targetFramework="net46" />
|
<package id="RGB.NET.Devices.Corsair" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Devices.Logitech" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Devices.Msi" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Devices.Novation" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Devices.Razer" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Groups" version="0.0.1.18" targetFramework="net46" />
|
||||||
|
<package id="RGB.NET.Presets" version="0.0.1.18" targetFramework="net46" />
|
||||||
<package id="Sanford.Multimedia.Midi" version="6.4.1" targetFramework="net46" />
|
<package id="Sanford.Multimedia.Midi" version="6.4.1" targetFramework="net46" />
|
||||||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net46" />
|
<package id="System.ValueTuple" version="4.4.0" targetFramework="net46" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -7,6 +7,7 @@ namespace Artemis.Storage.Entities
|
|||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public virtual ICollection<Layer> Layers { get; set; }
|
public virtual ICollection<Layer> Layers { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ namespace Artemis.Storage.Entities
|
|||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,4 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Artemis.Storage.Migrations
|
namespace Artemis.Storage.Migrations
|
||||||
{
|
{
|
||||||
@ -9,33 +7,27 @@ namespace Artemis.Storage.Migrations
|
|||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Profiles",
|
"Profiles",
|
||||||
columns: table => new
|
table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
Name = table.Column<string>(nullable: true)
|
Name = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table => { table.PrimaryKey("PK_Profiles", x => x.Id); });
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Profiles", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Settings",
|
"Settings",
|
||||||
columns: table => new
|
table => new
|
||||||
{
|
{
|
||||||
Name = table.Column<string>(nullable: false),
|
Name = table.Column<string>(nullable: false),
|
||||||
Value = table.Column<string>(nullable: true)
|
Value = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table => { table.PrimaryKey("PK_Settings", x => x.Name); });
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Settings", x => x.Name);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Layer",
|
"Layer",
|
||||||
columns: table => new
|
table => new
|
||||||
{
|
{
|
||||||
ProfileId = table.Column<int>(nullable: false),
|
ProfileId = table.Column<int>(nullable: false),
|
||||||
Name = table.Column<string>(nullable: false)
|
Name = table.Column<string>(nullable: false)
|
||||||
@ -44,10 +36,10 @@ namespace Artemis.Storage.Migrations
|
|||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Layer", x => new {x.ProfileId, x.Name});
|
table.PrimaryKey("PK_Layer", x => new {x.ProfileId, x.Name});
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_Layer_Profiles_ProfileId",
|
"FK_Layer_Profiles_ProfileId",
|
||||||
column: x => x.ProfileId,
|
x => x.ProfileId,
|
||||||
principalTable: "Profiles",
|
"Profiles",
|
||||||
principalColumn: "Id",
|
"Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -55,13 +47,13 @@ namespace Artemis.Storage.Migrations
|
|||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Layer");
|
"Layer");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Settings");
|
"Settings");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Profiles");
|
"Profiles");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,16 +1,12 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using Artemis.Storage;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Artemis.Storage.Migrations
|
namespace Artemis.Storage.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(StorageContext))]
|
[DbContext(typeof(StorageContext))]
|
||||||
partial class StorageContextModelSnapshot : ModelSnapshot
|
internal class StorageContextModelSnapshot : ModelSnapshot
|
||||||
{
|
{
|
||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
|||||||
@ -17,17 +17,24 @@
|
|||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
|
||||||
|
|
||||||
<!-- Material Design -->
|
<!-- Material Design -->
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
<ResourceDictionary
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Teal.xaml" />
|
<ResourceDictionary
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Teal.xaml" />
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />
|
||||||
|
|
||||||
<!-- Material Design: MahApps Compatibility -->
|
<!-- Material Design: MahApps Compatibility -->
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Fonts.xaml" />
|
<ResourceDictionary
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Flyout.xaml" />
|
Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Fonts.xaml" />
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Flyout.xaml" />
|
||||||
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
@ -48,9 +55,12 @@
|
|||||||
<SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}" />
|
<SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}" />
|
||||||
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" />
|
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" />
|
||||||
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" />
|
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" />
|
||||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchBrush.Win10" Color="{DynamicResource Primary500}" />
|
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchBrush.Win10"
|
||||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchMouseOverBrush.Win10" Color="{DynamicResource Primary400}" />
|
Color="{DynamicResource Primary500}" />
|
||||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.ThumbIndicatorCheckedBrush.Win10" Color="{DynamicResource Primary500Foreground}" />
|
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchMouseOverBrush.Win10"
|
||||||
|
Color="{DynamicResource Primary400}" />
|
||||||
|
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.ThumbIndicatorCheckedBrush.Win10"
|
||||||
|
Color="{DynamicResource Primary500Foreground}" />
|
||||||
|
|
||||||
<!-- Some general convertes etc. -->
|
<!-- Some general convertes etc. -->
|
||||||
<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||||
|
|||||||
@ -94,13 +94,16 @@
|
|||||||
<Compile Include="Bootstrapper.cs" />
|
<Compile Include="Bootstrapper.cs" />
|
||||||
<Compile Include="Ninject\UIModule.cs" />
|
<Compile Include="Ninject\UIModule.cs" />
|
||||||
<Compile Include="Stylet\NinjectBootstrapper.cs" />
|
<Compile Include="Stylet\NinjectBootstrapper.cs" />
|
||||||
|
<Compile Include="ViewModels\Interfaces\IHomeViewModel.cs" />
|
||||||
<Compile Include="ViewModels\Interfaces\IArtemisViewModel.cs" />
|
<Compile Include="ViewModels\Interfaces\IArtemisViewModel.cs" />
|
||||||
<Compile Include="ViewModels\HomeViewModel.cs" />
|
<Compile Include="ViewModels\HomeViewModel.cs" />
|
||||||
|
<Compile Include="ViewModels\Interfaces\ISettingsViewModel.cs" />
|
||||||
<Compile Include="ViewModels\RootViewModel.cs" />
|
<Compile Include="ViewModels\RootViewModel.cs" />
|
||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ViewModels\SettingsViewModel.cs" />
|
||||||
<Page Include="Views\HomeView.xaml">
|
<Page Include="Views\HomeView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -109,6 +112,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Views\SettingsView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
|
|||||||
@ -4,14 +4,18 @@ using Ninject.Modules;
|
|||||||
|
|
||||||
namespace Artemis.UI.Ninject
|
namespace Artemis.UI.Ninject
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once InconsistentNaming
|
||||||
public class UIModule : NinjectModule
|
public class UIModule : NinjectModule
|
||||||
{
|
{
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
// Bind all viewmodels
|
// Bind all built-in viewmodels
|
||||||
Kernel.Bind(x =>
|
Kernel.Bind(x =>
|
||||||
{
|
{
|
||||||
x.FromThisAssembly().SelectAllClasses().InheritedFrom<IArtemisViewModel>().BindAllInterfaces();
|
x.FromThisAssembly()
|
||||||
|
.SelectAllClasses()
|
||||||
|
.InheritedFrom<IArtemisViewModel>()
|
||||||
|
.BindAllInterfaces();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ using Stylet;
|
|||||||
|
|
||||||
namespace Artemis.UI.ViewModels
|
namespace Artemis.UI.ViewModels
|
||||||
{
|
{
|
||||||
public class HomeViewModel : Screen, IMainViewModel
|
public class HomeViewModel : Screen, IHomeViewModel
|
||||||
{
|
{
|
||||||
public string Title => "Home";
|
public string Title => "Home";
|
||||||
|
|
||||||
@ -16,8 +16,4 @@ namespace Artemis.UI.ViewModels
|
|||||||
Process.Start(url);
|
Process.Start(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IMainViewModel : IArtemisViewModel
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
7
src/Artemis.UI/ViewModels/Interfaces/IHomeViewModel.cs
Normal file
7
src/Artemis.UI/ViewModels/Interfaces/IHomeViewModel.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace Artemis.UI.ViewModels.Interfaces
|
||||||
|
{
|
||||||
|
public interface IHomeViewModel : IArtemisViewModel
|
||||||
|
{
|
||||||
|
void OpenUrl(string url);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
namespace Artemis.UI.ViewModels.Interfaces
|
||||||
|
{
|
||||||
|
public interface ISettingsViewModel : IArtemisViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,12 +7,37 @@ namespace Artemis.UI.ViewModels
|
|||||||
{
|
{
|
||||||
public class RootViewModel : Conductor<IArtemisViewModel>.Collection.OneActive
|
public class RootViewModel : Conductor<IArtemisViewModel>.Collection.OneActive
|
||||||
{
|
{
|
||||||
|
private readonly ICollection<IArtemisViewModel> _artemisViewModels;
|
||||||
|
|
||||||
public RootViewModel(ICollection<IArtemisViewModel> artemisViewModels)
|
public RootViewModel(ICollection<IArtemisViewModel> artemisViewModels)
|
||||||
{
|
{
|
||||||
|
_artemisViewModels = artemisViewModels;
|
||||||
// Add the built-in items
|
// Add the built-in items
|
||||||
Items.AddRange(artemisViewModels);
|
Items.AddRange(artemisViewModels);
|
||||||
// Activate the home item
|
// Activate the home item
|
||||||
ActiveItem = artemisViewModels.First(v => v.GetType() == typeof(HomeViewModel));
|
ActiveItem = _artemisViewModels.First(v => v.GetType() == typeof(HomeViewModel));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool MenuOpen { get; set; }
|
||||||
|
|
||||||
|
public void NavigateToHome()
|
||||||
|
{
|
||||||
|
ActivateItem(_artemisViewModels.First(v => v.GetType() == typeof(HomeViewModel)));
|
||||||
|
MenuOpen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NavigateToNews()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NavigateToWorkshop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NavigateToSettings()
|
||||||
|
{
|
||||||
|
ActivateItem(_artemisViewModels.First(v => v.GetType() == typeof(SettingsViewModel)));
|
||||||
|
MenuOpen = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
10
src/Artemis.UI/ViewModels/SettingsViewModel.cs
Normal file
10
src/Artemis.UI/ViewModels/SettingsViewModel.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Artemis.UI.ViewModels.Interfaces;
|
||||||
|
using Stylet;
|
||||||
|
|
||||||
|
namespace Artemis.UI.ViewModels
|
||||||
|
{
|
||||||
|
public class SettingsViewModel : Screen, ISettingsViewModel
|
||||||
|
{
|
||||||
|
public string Title => "Settings";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,7 +13,8 @@
|
|||||||
Title="Artemis"
|
Title="Artemis"
|
||||||
d:DesignHeight="639.411"
|
d:DesignHeight="639.411"
|
||||||
d:DesignWidth="1113.251"
|
d:DesignWidth="1113.251"
|
||||||
d:DataContext="{d:DesignInstance vms:RootViewModel}">
|
d:DataContext="{d:DesignInstance vms:RootViewModel}"
|
||||||
|
Icon="/Artemis.UI;component/Resources/logo-512.png">
|
||||||
<metro:MetroWindow.Resources>
|
<metro:MetroWindow.Resources>
|
||||||
<DrawingImage x:Key="BowIcon">
|
<DrawingImage x:Key="BowIcon">
|
||||||
<DrawingImage.Drawing>
|
<DrawingImage.Drawing>
|
||||||
@ -75,9 +76,82 @@
|
|||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Margin="16"
|
Margin="16"
|
||||||
IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />
|
IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />
|
||||||
<ListBox Margin="0 16 0 16" SelectedIndex="0">
|
|
||||||
|
|
||||||
|
<!-- Built-in pages -->
|
||||||
|
<ListBox Margin="0 16 0 16"
|
||||||
|
SelectedIndex="0"
|
||||||
|
DockPanel.Dock="Top">
|
||||||
|
<ListBoxItem PreviewMouseLeftButtonUp="{s:Action NavigateToHome}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Home"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Home</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem PreviewMouseLeftButtonUp="{s:Action NavigateToNews}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Newspaper"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>News</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem PreviewMouseLeftButtonUp="{s:Action NavigateToWorkshop}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="TestTube"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Workshop</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem PreviewMouseLeftButtonUp="{s:Action NavigateToSettings}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Settings"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Settings</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
<!-- Modules -->
|
||||||
|
<TextBlock Margin="8,8,0,8"
|
||||||
|
DockPanel.Dock="Top">
|
||||||
|
Modules
|
||||||
|
</TextBlock>
|
||||||
|
<Border BorderThickness="0 1 0 0"
|
||||||
|
BorderBrush="{DynamicResource MaterialDesignDivider}">
|
||||||
|
<ScrollViewer DockPanel.Dock="Top">
|
||||||
|
<ListBox Margin="0 0 0 16"
|
||||||
|
SelectedIndex="0">
|
||||||
|
<ListBoxItem>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Home"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Home</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Newspaper"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>News</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="TestTube"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Workshop</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
<ListBoxItem>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<materialDesign:PackIcon Kind="Settings"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<TextBlock>Settings</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</ListBoxItem>
|
||||||
|
</ListBox>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</materialDesign:DrawerHost.LeftDrawerContent>
|
</materialDesign:DrawerHost.LeftDrawerContent>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
@ -87,7 +161,7 @@
|
|||||||
DockPanel.Dock="Top">
|
DockPanel.Dock="Top">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
|
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
|
||||||
IsChecked="False"
|
IsChecked="{Binding MenuOpen}"
|
||||||
x:Name="MenuToggleButton" />
|
x:Name="MenuToggleButton" />
|
||||||
<materialDesign:PopupBox DockPanel.Dock="Right"
|
<materialDesign:PopupBox DockPanel.Dock="Right"
|
||||||
PlacementMode="BottomAndAlignRightEdges"
|
PlacementMode="BottomAndAlignRightEdges"
|
||||||
|
|||||||
10
src/Artemis.UI/Views/SettingsView.xaml
Normal file
10
src/Artemis.UI/Views/SettingsView.xaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<UserControl x:Class="Artemis.UI.Views.SettingsView"
|
||||||
|
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"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
|
<Grid />
|
||||||
|
</UserControl>
|
||||||
Loading…
x
Reference in New Issue
Block a user