Added some views, I really just need this code on adifferent machine

This commit is contained in:
SpoinkyNL committed 2019-04-09 19:38:07 +02:00
1 parent 2330644062
commit 1ae5a18c8e
20 files changed
+267 -117

No files matched your search

+11 -3
View File
@@ -48,15 +48,15 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.10.0.0" newVersion="2.10.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.10.0.0" newVersion="2.10.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.10.0.0" newVersion="2.10.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -98,6 +98,14 @@
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+33 -17
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\PropertyChanged.Fody.2.6.0\build\PropertyChanged.Fody.props" Condition="Exists('..\packages\PropertyChanged.Fody.2.6.0\build\PropertyChanged.Fody.props')" />
<Import Project="..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props" Condition="Exists('..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -59,13 +59,16 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
</Reference>
<Reference Include="HidSharp, Version=2.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.2.0.5\lib\net35\HidSharp.dll</HintPath>
<Reference Include="HidSharp, Version=2.0.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.2.0.8\lib\net35\HidSharp.dll</HintPath>
</Reference>
<Reference Include="Humanizer, Version=2.6.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
<HintPath>..\packages\Humanizer.Core.2.6.2\lib\netstandard2.0\Humanizer.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll</HintPath>
@@ -76,8 +79,8 @@
<Reference Include="MaterialDesignThemes.MahApps, Version=0.0.10.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.MahApps.0.0.12\lib\net45\MaterialDesignThemes.MahApps.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignThemes.Wpf, Version=2.5.0.1205, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.2.5.0.1205\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
<Reference Include="MaterialDesignThemes.Wpf, Version=2.5.1.1345, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.2.5.1\lib\net45\MaterialDesignThemes.Wpf.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>
@@ -88,14 +91,20 @@
<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="PropertyChanged, Version=2.6.0.0, Culture=neutral, PublicKeyToken=ee3ee20bcf148ddd, processorArchitecture=MSIL">
<HintPath>..\packages\PropertyChanged.Fody.2.6.0\lib\net452\PropertyChanged.dll</HintPath>
<Reference Include="PropertyChanged, Version=2.6.1.0, Culture=neutral, PublicKeyToken=ee3ee20bcf148ddd, processorArchitecture=MSIL">
<HintPath>..\packages\PropertyChanged.Fody.2.6.1\lib\net452\PropertyChanged.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Core, Version=0.1.14.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Core.0.1.14\lib\net45\RGB.NET.Core.dll</HintPath>
<Reference Include="RGB.NET.Brushes, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Brushes.0.1.22\lib\net45\RGB.NET.Brushes.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Groups, Version=0.1.14.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Groups.0.1.14\lib\net45\RGB.NET.Groups.dll</HintPath>
<Reference Include="RGB.NET.Core, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Core.0.1.22\lib\net45\RGB.NET.Core.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Decorators, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Decorators.0.1.22\lib\net45\RGB.NET.Decorators.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Groups, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Groups.0.1.22\lib\net45\RGB.NET.Groups.dll</HintPath>
</Reference>
<Reference Include="Sanford.Multimedia.Midi, Version=6.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sanford.Multimedia.Midi.Standard.6.6.0\lib\net35\Sanford.Multimedia.Midi.dll</HintPath>
@@ -141,6 +150,7 @@
<Compile Include="Services\Interfaces\IArtemisUIService.cs" />
<Compile Include="Stylet\ArtemisViewManager.cs" />
<Compile Include="Stylet\NinjectBootstrapper.cs" />
<Compile Include="ViewModels\Settings\DeviceSettingsViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IHomeViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IArtemisViewModel.cs" />
<Compile Include="ViewModels\HomeViewModel.cs" />
@@ -150,7 +160,7 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="ViewModels\SettingsViewModel.cs" />
<Compile Include="ViewModels\Settings\SettingsViewModel.cs" />
<Page Include="Styles\Visualizers\LedVisualizer.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -171,7 +181,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\SettingsView.xaml">
<Page Include="Views\Settings\DeviceSettingsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Settings\SettingsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -238,12 +252,14 @@
mkdir %25ProgramData%25\Artemis\plugins
xcopy /s /y /q $(SolutionDir)Artemis.Plugins.BuiltIn\Modules %25ProgramData%25\Artemis\plugins</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Fody.3.3.5\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.5\build\Fody.targets')" />
<Import Project="..\packages\Fody.4.2.1\build\Fody.targets" Condition="Exists('..\packages\Fody.4.2.1\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<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>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.3.3.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.5\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\PropertyChanged.Fody.2.6.0\build\PropertyChanged.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PropertyChanged.Fody.2.6.0\build\PropertyChanged.Fody.props'))" />
<Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props'))" />
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets'))" />
</Target>
<Import Project="..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" />
</Project>
@@ -18,7 +18,7 @@ namespace Artemis.UI.Converters
{
return new SolidColorBrush(!(value is Color color)
? System.Windows.Media.Color.FromArgb(0, 0, 0, 0)
: System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B));
: System.Windows.Media.Color.FromArgb((byte) color.A, (byte) color.R, (byte) color.G, (byte) color.B));
}
/// <inheritdoc />
@@ -8,6 +8,7 @@ using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
using Artemis.UI.ViewModels.Interfaces;
using Artemis.UI.ViewModels.Settings;
using Stylet;
namespace Artemis.UI.ViewModels
@@ -0,0 +1,25 @@
using Humanizer;
using RGB.NET.Core;
namespace Artemis.UI.ViewModels.Settings
{
public class DeviceSettingsViewModel
{
private readonly IRGBDevice _device;
public DeviceSettingsViewModel(IRGBDevice device)
{
_device = device;
Type = _device.DeviceInfo.DeviceType.ToString().Humanize();
Name = _device.DeviceInfo.Model;
Manufacturer = _device.DeviceInfo.Manufacturer;
Enabled = true;
}
public string Type { get; set; }
public string Name { get; set; }
public string Manufacturer { get; set; }
public bool Enabled { get; set; }
}
}
@@ -0,0 +1,29 @@
using System.Collections.Generic;
using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces;
using Artemis.UI.ViewModels.Interfaces;
using Stylet;
namespace Artemis.UI.ViewModels.Settings
{
public class SettingsViewModel : Screen, ISettingsViewModel
{
public string Title => "Settings";
public SettingsViewModel(IRgbService rgbService)
{
DeviceSettingsViewModels = new List<DeviceSettingsViewModel>();
foreach (var device in rgbService.Surface.Devices)
DeviceSettingsViewModels.Add(new DeviceSettingsViewModel(device));
rgbService.DeviceLoaded += UpdateDevices;
}
public List<DeviceSettingsViewModel> DeviceSettingsViewModels { get; set; }
private void UpdateDevices(object sender, DeviceEventArgs deviceEventArgs)
{
DeviceSettingsViewModels.Add(new DeviceSettingsViewModel(deviceEventArgs.Device));
}
}
}
@@ -1,10 +0,0 @@
using Artemis.UI.ViewModels.Interfaces;
using Stylet;
namespace Artemis.UI.ViewModels
{
public class SettingsViewModel : Screen, ISettingsViewModel
{
public string Title => "Settings";
}
}
@@ -0,0 +1,23 @@
<UserControl x:Class="Artemis.UI.Views.Settings.DeviceSettingsView"
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:vms="clr-namespace:Artemis.UI.ViewModels.Settings"
d:DataContext="{d:DesignInstance vms:DeviceSettingsViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding Name}" />
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Manufacturer}" />
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Type}" />
</Grid>
</UserControl>
@@ -1,9 +1,11 @@
<UserControl x:Class="Artemis.UI.Views.SettingsView"
<UserControl x:Class="Artemis.UI.Views.Settings.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"
mc:Ignorable="d"
xmlns:vms="clr-namespace:Artemis.UI.ViewModels.Settings"
d:DataContext="{d:DesignInstance vms:SettingsViewModel}"
d:DesignHeight="600" d:DesignWidth="600">
<UserControl.Resources>
<ResourceDictionary>
@@ -14,12 +16,17 @@
</ResourceDictionary>
</UserControl.Resources>
<StackPanel Margin="16">
<TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}">General</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}">General</TextBlock>
<Grid>
<TextBlock>General settings like start up with Windows etc.</TextBlock>
</Grid>
<TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}">Plugins</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}">Devices</TextBlock>
<Grid>
<TextBlock>A list of plugins and options to disable them</TextBlock>
</Grid>
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}">Plugins</TextBlock>
<Grid>
<TextBlock>A list of plugins and options to disable them</TextBlock>
</Grid>
+11 -7
View File
@@ -1,19 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Core" version="4.4.0" targetFramework="net461" />
<package id="ControlzEx" version="3.0.2.4" targetFramework="net461" />
<package id="Fody" version="3.3.5" targetFramework="net461" developmentDependency="true" />
<package id="HidSharp" version="2.0.5" targetFramework="net461" />
<package id="Fody" version="4.2.1" targetFramework="net461" developmentDependency="true" />
<package id="HidSharp" version="2.0.8" targetFramework="net461" />
<package id="Humanizer.Core" version="2.6.2" targetFramework="net461" />
<package id="MahApps.Metro" version="1.6.5" targetFramework="net461" />
<package id="MaterialDesignColors" version="1.1.3" targetFramework="net461" />
<package id="MaterialDesignThemes" version="2.5.0.1205" targetFramework="net461" />
<package id="MaterialDesignThemes" version="2.5.1" targetFramework="net461" />
<package id="MaterialDesignThemes.MahApps" version="0.0.12" targetFramework="net461" />
<package id="Ninject" version="3.3.4" targetFramework="net461" />
<package id="Ninject.Extensions.Conventions" version="3.3.0" targetFramework="net461" />
<package id="Ninject.Extensions.Factory" version="3.3.2" targetFramework="net461" />
<package id="PropertyChanged.Fody" version="2.6.0" targetFramework="net461" developmentDependency="true" />
<package id="RGB.NET.Core" version="0.1.14" targetFramework="net461" />
<package id="RGB.NET.Groups" version="0.1.14" targetFramework="net461" />
<package id="PropertyChanged.Fody" version="2.6.1" targetFramework="net461" developmentDependency="true" />
<package id="RGB.NET.Brushes" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Decorators" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Groups" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Resources.Corsair" version="0.3.0.234" targetFramework="net461" />
<package id="Sanford.Multimedia.Midi" version="6.6.0" targetFramework="net461" />
<package id="Sanford.Multimedia.Midi.Standard" version="6.6.0" targetFramework="net461" />
<package id="Stylet" version="1.1.22" targetFramework="net461" />