mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 01:42:02 +00:00
commit
13fa0d4c8d
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis", "Artemis\Artemis.
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Razer2Artemis", "Razer2Artemis\Razer2Artemis.vcxproj", "{39711909-C1D5-46CE-A9EA-2D561692EA47}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Razer2Artemis", "Razer2Artemis\Razer2Artemis.vcxproj", "{39711909-C1D5-46CE-A9EA-2D561692EA47}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnrealTournament2Artemis", "UnrealTournament2Artemis\UnrealTournament2Artemis.vcxproj", "{3541864F-1662-4BD6-8328-2C87AE61D152}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
CD_ROM|Any CPU = CD_ROM|Any CPU
|
CD_ROM|Any CPU = CD_ROM|Any CPU
|
||||||
@ -84,6 +86,34 @@ Global
|
|||||||
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x64.Build.0 = Release|x64
|
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x64.Build.0 = Release|x64
|
||||||
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x86.ActiveCfg = Release|Win32
|
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x86.ActiveCfg = Release|Win32
|
||||||
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x86.Build.0 = Release|Win32
|
{39711909-C1D5-46CE-A9EA-2D561692EA47}.SingleImage|x86.Build.0 = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|Any CPU.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|x64.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|x64.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|x86.ActiveCfg = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.CD_ROM|x86.Build.0 = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|Any CPU.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|x64.ActiveCfg = Debug|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|x64.Build.0 = Debug|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|x86.ActiveCfg = Debug|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.DVD-5|x86.Build.0 = Debug|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Release|x64.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|Any CPU.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|x64.ActiveCfg = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|x64.Build.0 = Release|x64
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|x86.ActiveCfg = Release|Win32
|
||||||
|
{3541864F-1662-4BD6-8328-2C87AE61D152}.SingleImage|x86.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="Artemis.Modules.Games.UnrealTournament.UnrealTournament" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Games.WoW.WoW" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Games.WoW.WoW" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Effects.Bubbles.Bubbles" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Effects.Bubbles.Bubbles" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Effects.WindowsProfile.WindowsProfile" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Effects.WindowsProfile.WindowsProfile" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
@ -27,6 +29,17 @@
|
|||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
</startup>
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
|
<Artemis.Modules.Games.UnrealTournament.UnrealTournament>
|
||||||
|
<setting name="Enabled" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="LastProfile" serializeAs="String">
|
||||||
|
<value>Default</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="GameDirectory" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</Artemis.Modules.Games.UnrealTournament.UnrealTournament>
|
||||||
<Artemis.Modules.Games.WoW.WoW>
|
<Artemis.Modules.Games.WoW.WoW>
|
||||||
<setting name="Enabled" serializeAs="String">
|
<setting name="Enabled" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -278,7 +291,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
|
|||||||
@ -13,6 +13,12 @@ namespace Artemis
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
protected override void OnExit(ExitEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnExit(e);
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
if (!IsRunAsAdministrator())
|
if (!IsRunAsAdministrator())
|
||||||
@ -31,11 +37,6 @@ namespace Artemis
|
|||||||
return wp.IsInRole(WindowsBuiltInRole.Administrator);
|
return wp.IsInRole(WindowsBuiltInRole.Administrator);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Application_Startup(object sender, StartupEventArgs e)
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
if (DoHandle)
|
if (DoHandle)
|
||||||
@ -50,12 +51,6 @@ namespace Artemis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
|
||||||
{
|
|
||||||
var ex = e.ExceptionObject as Exception;
|
|
||||||
GetArtemisExceptionViewer(ex).ShowDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ExceptionViewer GetArtemisExceptionViewer(Exception e)
|
private static ExceptionViewer GetArtemisExceptionViewer(Exception e)
|
||||||
{
|
{
|
||||||
var logger = LogManager.GetCurrentClassLogger();
|
var logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
<ProductName>Artemis</ProductName>
|
<ProductName>Artemis</ProductName>
|
||||||
<PublisherName>Artemis</PublisherName>
|
<PublisherName>Artemis</PublisherName>
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
<ApplicationVersion>1.2.2.0</ApplicationVersion>
|
<ApplicationVersion>1.2.3.0</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
@ -141,8 +141,8 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>lib\ColorBox.dll</HintPath>
|
<HintPath>lib\ColorBox.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Corale.Colore, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Corale.Colore, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Colore.4.0.0\lib\net35\Corale.Colore.dll</HintPath>
|
<HintPath>..\packages\Colore.5.0.0\lib\net35\Corale.Colore.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="CUE.NET, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="CUE.NET, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
@ -176,8 +176,8 @@
|
|||||||
<HintPath>..\packages\NAudio.1.7.3\lib\net35\NAudio.dll</HintPath>
|
<HintPath>..\packages\NAudio.1.7.3\lib\net35\NAudio.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
<Reference Include="Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
@ -197,7 +197,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.3.4\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Process.NET, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Process.NET, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
@ -205,7 +205,7 @@
|
|||||||
<HintPath>D:\Downloads\Chome Downloads\Process.NET-master\Process.NET-master\src\Process.NET\bin\Release\Process.NET.dll</HintPath>
|
<HintPath>D:\Downloads\Chome Downloads\Process.NET-master\Process.NET-master\src\Process.NET\bin\Release\Process.NET.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SpotifyAPI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SpotifyAPI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SpotifyAPI-NET.2.9.0\lib\SpotifyAPI.dll</HintPath>
|
<HintPath>..\packages\SpotifyAPI-NET.2.11.0\lib\SpotifyAPI.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
@ -312,6 +312,18 @@
|
|||||||
<Compile Include="Models\OverlaySettings.cs" />
|
<Compile Include="Models\OverlaySettings.cs" />
|
||||||
<Compile Include="Modules\Effects\AudioVisualizer\AudioVisualization.cs" />
|
<Compile Include="Modules\Effects\AudioVisualizer\AudioVisualization.cs" />
|
||||||
<Compile Include="Modules\Effects\Bubbles\Bubbles.cs" />
|
<Compile Include="Modules\Effects\Bubbles\Bubbles.cs" />
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournament.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>UnrealTournament.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournamentDataModel.cs" />
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournamentModel.cs" />
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournamentSettings.cs" />
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournamentView.xaml.cs">
|
||||||
|
<DependentUpon>UnrealTournamentView.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Modules\Games\UnrealTournament\UnrealTournamentViewModel.cs" />
|
||||||
<Compile Include="Modules\Games\WorldofWarcraft\WoW.Designer.cs">
|
<Compile Include="Modules\Games\WorldofWarcraft\WoW.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
@ -617,10 +629,19 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Modules\Games\UnrealTournament\Resources\ut-plugin.zip" />
|
||||||
|
<None Include="Modules\Games\UnrealTournament\UnrealTournament.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>UnrealTournament.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<EmbeddedResource Include="Modules\Games\Witcher3\Resources\witcher3-mod.zip" />
|
||||||
<None Include="Modules\Games\WorldofWarcraft\WoW.settings">
|
<None Include="Modules\Games\WorldofWarcraft\WoW.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>WoW.Designer.cs</LastGenOutput>
|
<LastGenOutput>WoW.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="NLog.xsd">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
<None Include="Resources\generic.png" />
|
<None Include="Resources\generic.png" />
|
||||||
<None Include="Resources\Keyboards\g810.png" />
|
<None Include="Resources\Keyboards\g810.png" />
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
@ -668,9 +689,6 @@
|
|||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>VolumeDisplay.Designer.cs</LastGenOutput>
|
<LastGenOutput>VolumeDisplay.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="NLog.xsd">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="packages.config">
|
<None Include="packages.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
@ -700,7 +718,6 @@
|
|||||||
<Resource Include="Resources\Keyboards\blackwidow.png" />
|
<Resource Include="Resources\Keyboards\blackwidow.png" />
|
||||||
<None Include="Resources\Keyboards\none.png" />
|
<None Include="Resources\Keyboards\none.png" />
|
||||||
<None Include="Resources\Keyboards\demo-gif.gif" />
|
<None Include="Resources\Keyboards\demo-gif.gif" />
|
||||||
<EmbeddedResource Include="Resources\Witcher3\Witcher3Artemis.zip" />
|
|
||||||
<None Include="Settings\Offsets.settings">
|
<None Include="Settings\Offsets.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Offsets.Designer.cs</LastGenOutput>
|
<LastGenOutput>Offsets.Designer.cs</LastGenOutput>
|
||||||
@ -732,6 +749,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Modules\Games\UnrealTournament\UnrealTournamentView.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="Profiles\Layers\Types\Audio\AudioPropertiesView.xaml">
|
<Page Include="Profiles\Layers\Types\Audio\AudioPropertiesView.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -857,6 +878,7 @@
|
|||||||
<Content Include="LogitechLedEnginesWrapper.dll">
|
<Content Include="LogitechLedEnginesWrapper.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<None Include="Modules\Games\UnrealTournament\Resources\redeemer.gif" />
|
||||||
<Content Include="Resources\CounterStrike\csgoGamestateConfiguration.txt" />
|
<Content Include="Resources\CounterStrike\csgoGamestateConfiguration.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -95,6 +95,7 @@ namespace Artemis
|
|||||||
protected override void OnExit(object sender, EventArgs e)
|
protected override void OnExit(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_kernel.Dispose();
|
_kernel.Dispose();
|
||||||
|
// Enviroment.Exit(0);
|
||||||
base.OnExit(sender, e);
|
base.OnExit(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -19,9 +20,10 @@ namespace Artemis.DAL
|
|||||||
{
|
{
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
private static readonly string ProfileFolder = Environment
|
private static readonly string ProfileFolder =
|
||||||
.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis\profiles";
|
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis\profiles";
|
||||||
|
|
||||||
|
private static readonly List<ProfileModel> Profiles = new List<ProfileModel>();
|
||||||
private static bool _installedDefaults;
|
private static bool _installedDefaults;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -30,7 +32,15 @@ namespace Artemis.DAL
|
|||||||
/// <returns>All profiles</returns>
|
/// <returns>All profiles</returns>
|
||||||
public static List<ProfileModel> GetAll()
|
public static List<ProfileModel> GetAll()
|
||||||
{
|
{
|
||||||
return ReadProfiles();
|
lock (Profiles)
|
||||||
|
{
|
||||||
|
if (!Profiles.Any())
|
||||||
|
ReadProfiles();
|
||||||
|
|
||||||
|
// Return a new list, this'll make sure removing/updating the retrieved list doesn't
|
||||||
|
// affect the datastore
|
||||||
|
return Profiles.ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -59,8 +69,15 @@ namespace Artemis.DAL
|
|||||||
if (prof == null)
|
if (prof == null)
|
||||||
throw new ArgumentNullException(nameof(prof));
|
throw new ArgumentNullException(nameof(prof));
|
||||||
|
|
||||||
|
lock (Profiles)
|
||||||
|
{
|
||||||
|
if (!Profiles.Contains(prof))
|
||||||
|
Profiles.Add(prof);
|
||||||
|
}
|
||||||
|
|
||||||
lock (prof)
|
lock (prof)
|
||||||
{
|
{
|
||||||
|
// Store the file
|
||||||
if (!(prof.GameName?.Length > 1) || !(prof.KeyboardSlug?.Length > 1) || !(prof.Name?.Length > 1))
|
if (!(prof.GameName?.Length > 1) || !(prof.KeyboardSlug?.Length > 1) || !(prof.Name?.Length > 1))
|
||||||
throw new ArgumentException("Profile is invalid. Name, GameName and KeyboardSlug are required");
|
throw new ArgumentException("Profile is invalid. Name, GameName and KeyboardSlug are required");
|
||||||
|
|
||||||
@ -86,31 +103,43 @@ namespace Artemis.DAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<ProfileModel> ReadProfiles()
|
private static void ReadProfiles()
|
||||||
{
|
{
|
||||||
CheckProfiles();
|
CheckProfiles();
|
||||||
InstallDefaults();
|
lock (Profiles)
|
||||||
var profiles = new List<ProfileModel>();
|
|
||||||
|
|
||||||
// Create the directory structure
|
|
||||||
var profilePaths = Directory.GetFiles(ProfileFolder, "*.json", SearchOption.AllDirectories);
|
|
||||||
|
|
||||||
// Parse the JSON files into objects and add them if they are valid
|
|
||||||
foreach (var path in profilePaths)
|
|
||||||
{
|
{
|
||||||
try
|
Profiles.Clear();
|
||||||
|
|
||||||
|
// Create the directory structure
|
||||||
|
var profilePaths = Directory.GetFiles(ProfileFolder, "*.json", SearchOption.AllDirectories);
|
||||||
|
|
||||||
|
// Parse the JSON files into objects and add them if they are valid
|
||||||
|
foreach (var path in profilePaths)
|
||||||
{
|
{
|
||||||
var prof = LoadProfileIfValid(path);
|
try
|
||||||
if (prof != null)
|
{
|
||||||
profiles.Add(prof);
|
var prof = LoadProfileIfValid(path);
|
||||||
}
|
if (prof == null)
|
||||||
catch (Exception e)
|
continue;
|
||||||
{
|
|
||||||
Logger.Error("Failed to load profile: {0} - {1}", path, e.InnerException.Message);
|
// Only add unique profiles
|
||||||
|
if (Profiles.Any(p => p.GameName == prof.GameName && p.Name == prof.Name &&
|
||||||
|
p.KeyboardSlug == prof.KeyboardSlug))
|
||||||
|
{
|
||||||
|
Logger.Error("Didn't load duplicate profile: {0}", path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Profiles.Add(prof);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.Error("Failed to load profile: {0} - {1}", path, e.InnerException.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
InstallDefaults();
|
||||||
return profiles;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -133,23 +162,27 @@ namespace Artemis.DAL
|
|||||||
var archive = new ZipArchive(stream);
|
var archive = new ZipArchive(stream);
|
||||||
archive.ExtractToDirectory(ProfileFolder, true);
|
archive.ExtractToDirectory(ProfileFolder, true);
|
||||||
|
|
||||||
// Extract the demo GIF file
|
var demoProfiles = Profiles.Where(d => d.Name == "Demo (duplicate to keep changes)");
|
||||||
var gifPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis\demo-gif.gif";
|
InsertGif(demoProfiles, "GIF", Resources.demo_gif, "demo-gif");
|
||||||
Resources.demo_gif.Save(gifPath);
|
}
|
||||||
|
|
||||||
// Set the GIF path on each demo profile
|
public static void InsertGif(IEnumerable<ProfileModel> profileModels, string layerName, Bitmap gifFile,
|
||||||
var demoProfiles = GetAll().Where(d => d.Name == "Demo (Duplicate to keep changes)");
|
string fileName)
|
||||||
foreach (var demoProfile in demoProfiles)
|
{
|
||||||
|
// Extract the GIF file
|
||||||
|
var gifDir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis\gifs";
|
||||||
|
Directory.CreateDirectory(gifDir);
|
||||||
|
var gifPath = gifDir + $"\\{fileName}.gif";
|
||||||
|
gifFile.Save(gifPath);
|
||||||
|
|
||||||
|
foreach (var profile in profileModels)
|
||||||
{
|
{
|
||||||
var gifLayer = demoProfile
|
var gifLayer = profile.GetLayers().FirstOrDefault(l => l.Name == layerName);
|
||||||
.Layers.FirstOrDefault(l => l.Name == "Demo - GIFs")?
|
|
||||||
.Children.FirstOrDefault(c => c.Name == "GIF");
|
|
||||||
|
|
||||||
if (gifLayer == null)
|
if (gifLayer == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
((KeyboardPropertiesModel) gifLayer.Properties).GifFile = gifPath;
|
((KeyboardPropertiesModel) gifLayer.Properties).GifFile = gifPath;
|
||||||
AddOrUpdate(demoProfile);
|
AddOrUpdate(profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +205,6 @@ namespace Artemis.DAL
|
|||||||
/// <returns>The loaded profile, or null if invalid</returns>
|
/// <returns>The loaded profile, or null if invalid</returns>
|
||||||
public static ProfileModel LoadProfileIfValid(string path)
|
public static ProfileModel LoadProfileIfValid(string path)
|
||||||
{
|
{
|
||||||
// TODO: What exception on load failure?
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var prof = JsonConvert.DeserializeObject<ProfileModel>(File.ReadAllText(path));
|
var prof = JsonConvert.DeserializeObject<ProfileModel>(File.ReadAllText(path));
|
||||||
@ -182,7 +214,7 @@ namespace Artemis.DAL
|
|||||||
return null;
|
return null;
|
||||||
return prof;
|
return prof;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (JsonSerializationException)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -209,20 +241,29 @@ namespace Artemis.DAL
|
|||||||
if (string.IsNullOrEmpty(name))
|
if (string.IsNullOrEmpty(name))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Remove the old file
|
// Remove the old profile
|
||||||
var path = ProfileFolder + $@"\{profile.KeyboardSlug}\{profile.GameName}\{profile.Name}.json";
|
DeleteProfile(profile);
|
||||||
if (File.Exists(path))
|
|
||||||
File.Delete(path);
|
|
||||||
|
|
||||||
// Update the profile, creating a new file
|
// Update the profile, creating a new file
|
||||||
profile.Name = name;
|
profile.Name = name;
|
||||||
AddOrUpdate(profile);
|
AddOrUpdate(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DeleteProfile(ProfileModel profile)
|
public static void DeleteProfile(ProfileModel prof)
|
||||||
{
|
{
|
||||||
|
// Remove from datastore
|
||||||
|
lock (Profiles)
|
||||||
|
{
|
||||||
|
// Get the profile from the datastore instead of just the provided value, to be certain it is removed
|
||||||
|
var dsProfile = Profiles.FirstOrDefault(p => p.GameName == prof.GameName &&
|
||||||
|
p.Name == prof.Name &&
|
||||||
|
p.KeyboardSlug == prof.KeyboardSlug);
|
||||||
|
if (dsProfile != null)
|
||||||
|
Profiles.Remove(dsProfile);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the file
|
// Remove the file
|
||||||
var path = ProfileFolder + $@"\{profile.KeyboardSlug}\{profile.GameName}\{profile.Name}.json";
|
var path = ProfileFolder + $@"\{prof.KeyboardSlug}\{prof.GameName}\{prof.Name}.json";
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ using CUE.NET;
|
|||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
using CUE.NET.Devices.Keyboard;
|
using CUE.NET.Devices.Keyboard;
|
||||||
using CUE.NET.Devices.Keyboard.Enums;
|
|
||||||
using CUE.NET.Devices.Keyboard.Keys;
|
using CUE.NET.Devices.Keyboard.Keys;
|
||||||
using Ninject.Extensions.Logging;
|
using Ninject.Extensions.Logging;
|
||||||
using Point = System.Drawing.Point;
|
using Point = System.Drawing.Point;
|
||||||
@ -78,6 +77,11 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height = 7;
|
||||||
|
// Width = 18;
|
||||||
|
// Slug = "corsair-k65-rgb";
|
||||||
|
// PreviewSettings = new PreviewSettings(610, 240, new Thickness(0, -30, 0, 0), Resources.k65);
|
||||||
|
|
||||||
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
|
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
|
||||||
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
|
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CUE.NET.Devices.Keyboard.Enums;
|
using CUE.NET.Devices.Keyboard.Enums;
|
||||||
using CUE.NET.Devices.Keyboard.Keys;
|
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair.Utilities
|
namespace Artemis.DeviceProviders.Corsair.Utilities
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,6 @@ using Artemis.DeviceProviders.Razer.Utilities;
|
|||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Corale.Colore.Core;
|
using Corale.Colore.Core;
|
||||||
using Corale.Colore.Razer;
|
using Corale.Colore.Razer;
|
||||||
using Corale.Colore.Razer.Keyboard;
|
|
||||||
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Razer
|
namespace Artemis.DeviceProviders.Razer
|
||||||
@ -29,7 +28,7 @@ namespace Artemis.DeviceProviders.Razer
|
|||||||
|
|
||||||
public override bool CanEnable()
|
public override bool CanEnable()
|
||||||
{
|
{
|
||||||
if (!Chroma.IsSdkAvailable())
|
if (!Chroma.SdkAvailable)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
|
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using Corale.Colore.Razer.Keyboard.Effects;
|
using Corale.Colore.Razer.Keyboard.Effects;
|
||||||
|
using Color = Corale.Colore.Core.Color;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Razer.Utilities
|
namespace Artemis.DeviceProviders.Razer.Utilities
|
||||||
{
|
{
|
||||||
@ -13,8 +14,13 @@ namespace Artemis.DeviceProviders.Razer.Utilities
|
|||||||
b = ImageUtilities.ResizeImage(b, width, height);
|
b = ImageUtilities.ResizeImage(b, width, height);
|
||||||
|
|
||||||
for (var y = 0; y < b.Height; y++)
|
for (var y = 0; y < b.Height; y++)
|
||||||
|
{
|
||||||
for (var x = 0; x < b.Width; x++)
|
for (var x = 0; x < b.Width; x++)
|
||||||
keyboardGrid[y, x] = b.GetPixel(x, y);
|
{
|
||||||
|
var pixel = b.GetPixel(x, y);
|
||||||
|
keyboardGrid[y, x] = new Color(pixel.R, pixel.G, pixel.B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return keyboardGrid;
|
return keyboardGrid;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ using Artemis.Modules.Games.Dota2;
|
|||||||
using Artemis.Modules.Games.Overwatch;
|
using Artemis.Modules.Games.Overwatch;
|
||||||
using Artemis.Modules.Games.RocketLeague;
|
using Artemis.Modules.Games.RocketLeague;
|
||||||
using Artemis.Modules.Games.TheDivision;
|
using Artemis.Modules.Games.TheDivision;
|
||||||
|
using Artemis.Modules.Games.UnrealTournament;
|
||||||
using Artemis.Modules.Games.Witcher3;
|
using Artemis.Modules.Games.Witcher3;
|
||||||
using Artemis.Modules.Overlays.VolumeDisplay;
|
using Artemis.Modules.Overlays.VolumeDisplay;
|
||||||
using Artemis.Profiles.Layers.Animations;
|
using Artemis.Profiles.Layers.Animations;
|
||||||
@ -46,6 +47,7 @@ namespace Artemis.InjectionModules
|
|||||||
Bind<GameViewModel>().To<TheDivisionViewModel>().InSingletonScope();
|
Bind<GameViewModel>().To<TheDivisionViewModel>().InSingletonScope();
|
||||||
Bind<GameViewModel>().To<Witcher3ViewModel>().InSingletonScope();
|
Bind<GameViewModel>().To<Witcher3ViewModel>().InSingletonScope();
|
||||||
Bind<GameViewModel>().To<OverwatchViewModel>().InSingletonScope();
|
Bind<GameViewModel>().To<OverwatchViewModel>().InSingletonScope();
|
||||||
|
Bind<GameViewModel>().To<UnrealTournamentViewModel>().InSingletonScope();
|
||||||
|
|
||||||
// Overlays
|
// Overlays
|
||||||
Bind<OverlayViewModel>().To<VolumeDisplayViewModel>().InSingletonScope();
|
Bind<OverlayViewModel>().To<VolumeDisplayViewModel>().InSingletonScope();
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Artemis.Events;
|
using Artemis.Events;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
using Artemis.Modules.Effects.ProfilePreview;
|
|
||||||
using Artemis.Utilities.DataReaders;
|
using Artemis.Utilities.DataReaders;
|
||||||
using Artemis.Utilities.GameState;
|
using Artemis.Utilities.GameState;
|
||||||
using Artemis.Utilities.Keyboard;
|
|
||||||
using Artemis.ViewModels;
|
using Artemis.ViewModels;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
@ -25,8 +22,8 @@ namespace Artemis.Managers
|
|||||||
private readonly IEventAggregator _events;
|
private readonly IEventAggregator _events;
|
||||||
private readonly Timer _processTimer;
|
private readonly Timer _processTimer;
|
||||||
|
|
||||||
public MainManager(IEventAggregator events, ILogger logger, LoopManager loopManager,
|
public MainManager(IEventAggregator events, ILogger logger, LoopManager loopManager, DeviceManager deviceManager,
|
||||||
DeviceManager deviceManager, EffectManager effectManager, ProfileManager profileManager)
|
EffectManager effectManager, ProfileManager profileManager, PipeServer pipeServer)
|
||||||
{
|
{
|
||||||
_events = events;
|
_events = events;
|
||||||
|
|
||||||
@ -35,6 +32,7 @@ namespace Artemis.Managers
|
|||||||
DeviceManager = deviceManager;
|
DeviceManager = deviceManager;
|
||||||
EffectManager = effectManager;
|
EffectManager = effectManager;
|
||||||
ProfileManager = profileManager;
|
ProfileManager = profileManager;
|
||||||
|
PipeServer = pipeServer;
|
||||||
|
|
||||||
_processTimer = new Timer(1000);
|
_processTimer = new Timer(1000);
|
||||||
_processTimer.Elapsed += ScanProcesses;
|
_processTimer.Elapsed += ScanProcesses;
|
||||||
@ -48,7 +46,6 @@ namespace Artemis.Managers
|
|||||||
GameStateWebServer.Start();
|
GameStateWebServer.Start();
|
||||||
|
|
||||||
// Start the named pipe
|
// Start the named pipe
|
||||||
PipeServer = new PipeServer();
|
|
||||||
PipeServer.Start("artemis");
|
PipeServer.Start("artemis");
|
||||||
|
|
||||||
Logger.Info("Intialized MainManager");
|
Logger.Info("Intialized MainManager");
|
||||||
|
|||||||
@ -73,6 +73,7 @@ namespace Artemis.Managers
|
|||||||
// LoopManager might be running, this method won't do any harm in that case.
|
// LoopManager might be running, this method won't do any harm in that case.
|
||||||
_loopManager.StartAsync();
|
_loopManager.StartAsync();
|
||||||
|
|
||||||
|
ProfilePreviewModel.ProfileViewModel = activePreview.ProfileEditor.ProfileViewModel;
|
||||||
if (!ReferenceEquals(ProfilePreviewModel.Profile, activePreview.ProfileEditor.SelectedProfile))
|
if (!ReferenceEquals(ProfilePreviewModel.Profile, activePreview.ProfileEditor.SelectedProfile))
|
||||||
ProfilePreviewModel.Profile = activePreview.ProfileEditor.SelectedProfile;
|
ProfilePreviewModel.Profile = activePreview.ProfileEditor.SelectedProfile;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ using Artemis.Models;
|
|||||||
using Artemis.Models.Interfaces;
|
using Artemis.Models.Interfaces;
|
||||||
using Artemis.Profiles.Layers.Interfaces;
|
using Artemis.Profiles.Layers.Interfaces;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
|
using Artemis.ViewModels.Profiles;
|
||||||
|
using Castle.Components.DictionaryAdapter;
|
||||||
|
|
||||||
namespace Artemis.Modules.Effects.ProfilePreview
|
namespace Artemis.Modules.Effects.ProfilePreview
|
||||||
{
|
{
|
||||||
@ -17,6 +19,8 @@ namespace Artemis.Modules.Effects.ProfilePreview
|
|||||||
Name = "Profile Preview";
|
Name = "Profile Preview";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ProfileViewModel ProfileViewModel { get; set; }
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
Initialized = false;
|
Initialized = false;
|
||||||
@ -33,7 +37,7 @@ namespace Artemis.Modules.Effects.ProfilePreview
|
|||||||
|
|
||||||
public override List<LayerModel> GetRenderLayers(bool keyboardOnly)
|
public override List<LayerModel> GetRenderLayers(bool keyboardOnly)
|
||||||
{
|
{
|
||||||
return Profile.GetRenderLayers(DataModel, keyboardOnly, true);
|
return ProfileViewModel != null ? ProfileViewModel.GetRenderLayers() : new EditableList<LayerModel>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Render(RenderFrame frame, bool keyboardOnly)
|
public override void Render(RenderFrame frame, bool keyboardOnly)
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Shows verious game states and events on the keyboard." />
|
Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset" />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Shows verious game states and events on the keyboard." />
|
Text="By default shows mana, HP, character state on the keyboard and colors headset and mouse according to HP" />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Artemis.Events;
|
using Artemis.Events;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
@ -98,9 +97,7 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
|
|
||||||
private void PipeServerOnPipeMessage(string message)
|
private void PipeServerOnPipeMessage(string message)
|
||||||
{
|
{
|
||||||
|
_lastMessage = message;
|
||||||
_lastMessage = message;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
|
|||||||
@ -17,13 +17,13 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Allows you to create layers based on ingame cooldown and your hero." />
|
Text="By default colors the keyboard according to the chosen hero and shows ability cooldowns." />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
@ -35,6 +35,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Game directory -->
|
||||||
<StackPanel Grid.Row="1"
|
<StackPanel Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Shows your boost amount on the keyboard." />
|
Text="By default fills up the keyboard according to the amount of boost. Also colors mouse and headset according to boost." />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
62
Artemis/Artemis/Modules/Games/UnrealTournament/UnrealTournament.Designer.cs
generated
Normal file
62
Artemis/Artemis/Modules/Games/UnrealTournament/UnrealTournament.Designer.cs
generated
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||||
|
internal sealed partial class UnrealTournament : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static UnrealTournament defaultInstance = ((UnrealTournament)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new UnrealTournament())));
|
||||||
|
|
||||||
|
public static UnrealTournament Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
|
public bool Enabled {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["Enabled"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["Enabled"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Default")]
|
||||||
|
public string LastProfile {
|
||||||
|
get {
|
||||||
|
return ((string)(this["LastProfile"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["LastProfile"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
|
public string GameDirectory {
|
||||||
|
get {
|
||||||
|
return ((string)(this["GameDirectory"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["GameDirectory"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
||||||
|
GeneratedClassNamespace="Artemis.Modules.Games.UnrealTournament" GeneratedClassName="UnrealTournament">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">True</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="LastProfile" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)">Default</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="GameDirectory" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
using Artemis.Models.Interfaces;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament
|
||||||
|
{
|
||||||
|
public class UnrealTournamentDataModel : IDataModel
|
||||||
|
{
|
||||||
|
public State State { get; set; }
|
||||||
|
public Environment Environment { get; set; }
|
||||||
|
public Player Player { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum State
|
||||||
|
{
|
||||||
|
MainMenu,
|
||||||
|
Spectating,
|
||||||
|
Alive,
|
||||||
|
Dead
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Player
|
||||||
|
{
|
||||||
|
public int Health { get; set; }
|
||||||
|
public int Armor { get; set; }
|
||||||
|
public PlayerState State { get; set; }
|
||||||
|
public Inventory Inventory { get; set; }
|
||||||
|
public Weapon Weapon { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PlayerState
|
||||||
|
{
|
||||||
|
public string PlayerName { get; set; }
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public int Score { get; set; }
|
||||||
|
[JsonProperty("Team Num")]
|
||||||
|
public int TeamNum { get; set; }
|
||||||
|
public int RankCheck { get; set; }
|
||||||
|
[JsonProperty("Duel Rank")]
|
||||||
|
public int DuelRank { get; set; }
|
||||||
|
public int No_of_Duel_Played { get; set; }
|
||||||
|
[JsonProperty("CTF Rank")]
|
||||||
|
public int CTFRank { get; set; }
|
||||||
|
public int No_CTF_MatchesPlayed { get; set; }
|
||||||
|
[JsonProperty("TDM Rank")]
|
||||||
|
public int TDMRank { get; set; }
|
||||||
|
public int No_TDM_MatchesPlayed { get; set; }
|
||||||
|
public int DMRank { get; set; }
|
||||||
|
public int No_DM_Matches_Played { get; set; }
|
||||||
|
public int ShowdownRank { get; set; }
|
||||||
|
public int No_Showdowns { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Inventory
|
||||||
|
{
|
||||||
|
public bool HasJumpBoots { get; set; }
|
||||||
|
public bool HasInvisibility { get; set; }
|
||||||
|
public bool HasBerserk { get; set; }
|
||||||
|
public bool HasUDamage { get; set; }
|
||||||
|
public bool HasThighPads { get; set; }
|
||||||
|
public bool HasShieldBelt { get; set; }
|
||||||
|
public bool HasChestArmor { get; set; }
|
||||||
|
public bool HasHelmet { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Weapon
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int Ammo { get; set; }
|
||||||
|
public int MaxAmmo { get; set; }
|
||||||
|
public bool IsFiring { get; set; }
|
||||||
|
public int FireMode { get; set; }
|
||||||
|
public ZoomState ZoomState { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ZoomState
|
||||||
|
{
|
||||||
|
Unzoomed = 0,
|
||||||
|
Zoomed = 3,
|
||||||
|
ZoomingIn = 1,
|
||||||
|
ZoomingOut = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Environment
|
||||||
|
{
|
||||||
|
public string GameMode { get; set; }
|
||||||
|
public bool MatchStarted { get; set; }
|
||||||
|
public int GoalScore { get; set; }
|
||||||
|
public string ServerName { get; set; }
|
||||||
|
public bool bWeaponStay { get; set; }
|
||||||
|
public bool bTeamGame { get; set; }
|
||||||
|
public bool bAllowTeamSwitches { get; set; }
|
||||||
|
public bool bStopGameClock { get; set; }
|
||||||
|
public bool bCasterControl { get; set; }
|
||||||
|
public bool bForcedBalance { get; set; }
|
||||||
|
public bool bPlayPlayerIntro { get; set; }
|
||||||
|
public int TimeLimit { get; set; }
|
||||||
|
public int SpawnProtectionTime { get; set; }
|
||||||
|
public int RemainingTime { get; set; }
|
||||||
|
public int ElapsedTime { get; set; }
|
||||||
|
public int RespawnWaitTime { get; set; }
|
||||||
|
public int ForceRespawnTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Artemis.Managers;
|
||||||
|
using Artemis.Models;
|
||||||
|
using Artemis.Profiles.Layers.Models;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament
|
||||||
|
{
|
||||||
|
public class UnrealTournamentModel : GameModel
|
||||||
|
{
|
||||||
|
public UnrealTournamentModel(MainManager mainManager, UnrealTournamentSettings settings)
|
||||||
|
: base(mainManager, settings, new UnrealTournamentDataModel())
|
||||||
|
{
|
||||||
|
Name = "UnrealTournament";
|
||||||
|
ProcessName = "UE4-Win64-Shipping";
|
||||||
|
Scale = 4;
|
||||||
|
Enabled = Settings.Enabled;
|
||||||
|
Initialized = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Scale { get; set; }
|
||||||
|
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
Initialized = false;
|
||||||
|
MainManager.PipeServer.PipeMessage -= PipeServerOnPipeMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Enable()
|
||||||
|
{
|
||||||
|
MainManager.PipeServer.PipeMessage += PipeServerOnPipeMessage;
|
||||||
|
Initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PipeServerOnPipeMessage(string message)
|
||||||
|
{
|
||||||
|
if (!message.Contains("\"Environment\":"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Parse the JSON
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DataModel = JsonConvert.DeserializeObject<UnrealTournamentDataModel>(message);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
//ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<LayerModel> GetRenderLayers(bool keyboardOnly)
|
||||||
|
{
|
||||||
|
return Profile.GetRenderLayers(DataModel, keyboardOnly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
using Artemis.Models;
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament
|
||||||
|
{
|
||||||
|
public class UnrealTournamentSettings : GameSettings
|
||||||
|
{
|
||||||
|
public UnrealTournamentSettings()
|
||||||
|
{
|
||||||
|
Load();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GameDirectory { get; set; }
|
||||||
|
|
||||||
|
public sealed override void Load()
|
||||||
|
{
|
||||||
|
Enabled = UnrealTournament.Default.Enabled;
|
||||||
|
LastProfile = UnrealTournament.Default.LastProfile;
|
||||||
|
GameDirectory = UnrealTournament.Default.GameDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed override void Save()
|
||||||
|
{
|
||||||
|
UnrealTournament.Default.Enabled = Enabled;
|
||||||
|
UnrealTournament.Default.LastProfile = LastProfile;
|
||||||
|
UnrealTournament.Default.GameDirectory = GameDirectory;
|
||||||
|
|
||||||
|
UnrealTournament.Default.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed override void ToDefault()
|
||||||
|
{
|
||||||
|
Enabled = true;
|
||||||
|
GameDirectory = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<UserControl x:Class="Artemis.Modules.Games.UnrealTournament.UnrealTournamentView"
|
||||||
|
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||||
|
<Grid Margin="15, 5, 15, 5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
|
<Label.Content>
|
||||||
|
<AccessText TextWrapping="Wrap"
|
||||||
|
Text="By default shows team, HP armor and ammo on the keyboard and shows team colors on mouse and headset." />
|
||||||
|
</Label.Content>
|
||||||
|
</Label>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
<Label Content="Enable effect" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||||
|
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
|
||||||
|
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
||||||
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||||
|
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Game directory -->
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
|
|
||||||
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Unreal Tournament Directory" />
|
||||||
|
<Grid>
|
||||||
|
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||||
|
Text="{Binding Path=GameSettings.GameDirectory, Mode=TwoWay}"
|
||||||
|
cal:Message.Attach="[Event LostFocus] = [Action PlaceFiles]" />
|
||||||
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||||
|
HorizontalAlignment="Right" Width="25"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" Height="26" Margin="0,-2,0,0" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Profile editor -->
|
||||||
|
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</UserControl>
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for UnrealTournamentView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class UnrealTournamentView : UserControl
|
||||||
|
{
|
||||||
|
public UnrealTournamentView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,126 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Artemis.DAL;
|
||||||
|
using Artemis.InjectionFactories;
|
||||||
|
using Artemis.Managers;
|
||||||
|
using Artemis.Properties;
|
||||||
|
using Artemis.Utilities;
|
||||||
|
using Artemis.ViewModels.Abstract;
|
||||||
|
using Caliburn.Micro;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
namespace Artemis.Modules.Games.UnrealTournament
|
||||||
|
{
|
||||||
|
public sealed class UnrealTournamentViewModel : GameViewModel
|
||||||
|
{
|
||||||
|
public UnrealTournamentViewModel(MainManager main, IEventAggregator events, IProfileEditorVmFactory pFactory)
|
||||||
|
: base(main, new UnrealTournamentModel(main, new UnrealTournamentSettings()), events, pFactory)
|
||||||
|
{
|
||||||
|
DisplayName = "Unreal Tournament";
|
||||||
|
MainManager.EffectManager.EffectModels.Add(GameModel);
|
||||||
|
FindGame();
|
||||||
|
InstallGif();
|
||||||
|
}
|
||||||
|
|
||||||
|
public UnrealTournamentModel UnrealTournamentModel { get; set; }
|
||||||
|
|
||||||
|
public void FindGame()
|
||||||
|
{
|
||||||
|
var gameSettings = (UnrealTournamentSettings) GameSettings;
|
||||||
|
// If already propertly set up, don't do anything
|
||||||
|
if (gameSettings.GameDirectory != null && File.Exists(gameSettings.GameDirectory + "UE4-Win64-Shipping.exe"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Attempt to read the file
|
||||||
|
if (!File.Exists(@"C:\ProgramData\Epic\UnrealEngineLauncher\LauncherInstalled.dat"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var json =
|
||||||
|
JsonConvert.DeserializeObject<JObject>(
|
||||||
|
File.ReadAllText(@"C:\ProgramData\Epic\UnrealEngineLauncher\LauncherInstalled.dat"));
|
||||||
|
var utEntry =
|
||||||
|
json["InstallationList"].Children()
|
||||||
|
.FirstOrDefault(c => c["AppName"].Value<string>() == "UnrealTournamentDev");
|
||||||
|
if (utEntry == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var utDir = utEntry["InstallLocation"].Value<string>();
|
||||||
|
// Use backslash in path for consistency
|
||||||
|
utDir = utDir.Replace('/', '\\');
|
||||||
|
|
||||||
|
if (!File.Exists(utDir + @"\UE4-Win64-Shipping.exe"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
gameSettings.GameDirectory = utDir;
|
||||||
|
gameSettings.Save();
|
||||||
|
PlaceFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BrowseDirectory()
|
||||||
|
{
|
||||||
|
var dialog = new FolderBrowserDialog
|
||||||
|
{
|
||||||
|
SelectedPath = ((UnrealTournamentSettings) GameSettings).GameDirectory
|
||||||
|
};
|
||||||
|
var result = dialog.ShowDialog();
|
||||||
|
if (result != DialogResult.OK)
|
||||||
|
return;
|
||||||
|
|
||||||
|
((UnrealTournamentSettings) GameSettings).GameDirectory = dialog.SelectedPath;
|
||||||
|
NotifyOfPropertyChange(() => GameSettings);
|
||||||
|
GameSettings.Save();
|
||||||
|
|
||||||
|
PlaceFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlaceFiles()
|
||||||
|
{
|
||||||
|
var path = ((UnrealTournamentSettings) GameSettings).GameDirectory;
|
||||||
|
|
||||||
|
if (!File.Exists(path + @"\UE4-Win64-Shipping.exe"))
|
||||||
|
{
|
||||||
|
DialogService.ShowErrorMessageBox("Please select a valid Unreal Tournament directory\n\n" +
|
||||||
|
@"By default Unreal Tournament is in C:\Program Files\Epic Games\UnrealTournament");
|
||||||
|
|
||||||
|
((UnrealTournamentSettings) GameSettings).GameDirectory = string.Empty;
|
||||||
|
NotifyOfPropertyChange(() => GameSettings);
|
||||||
|
GameSettings.Save();
|
||||||
|
|
||||||
|
MainManager.Logger.Warn("Failed to install Unreal Tournament plugin in '{0}' (path not found)", path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load the ZIP from resources
|
||||||
|
var stream = Assembly.GetExecutingAssembly()
|
||||||
|
.GetManifestResourceStream("Artemis.Modules.Games.UnrealTournament.Resources.ut-plugin.zip");
|
||||||
|
if (stream == null)
|
||||||
|
throw new FileNotFoundException("Couldn't load the UT plugin files from resources.");
|
||||||
|
|
||||||
|
var archive = new ZipArchive(stream);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(path + @"\UnrealTournament\Plugins\Artemis");
|
||||||
|
archive.ExtractToDirectory(path + @"\UnrealTournament\Plugins\Artemis", true);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
MainManager.Logger.Error(e, "Failed to install Unreal Tournament plugin in '{0}'", path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MainManager.Logger.Info("Installed Unreal Tournament plugin in '{0}'", path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InstallGif()
|
||||||
|
{
|
||||||
|
var gif = Resources.redeemer;
|
||||||
|
ProfileProvider.InsertGif(ProfileProvider.GetAll()
|
||||||
|
.Where(p => p.GameName == "UnrealTournament" && p.Name == "Default"), "Redeemer GIF", gif, "redeemer");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Colors the keyboard according to the sign Gerald is using." />
|
Text="By default colors the keyboard according to the sign Gerald is using." />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
|
|
||||||
// Load the ZIP from resources
|
// Load the ZIP from resources
|
||||||
var stream = Assembly.GetExecutingAssembly()
|
var stream = Assembly.GetExecutingAssembly()
|
||||||
.GetManifestResourceStream("Artemis.Resources.Witcher3.Witcher3Artemis.zip");
|
.GetManifestResourceStream("Artemis.Modules.Games.Witcher3.Resources.witcher3-mod.zip");
|
||||||
if (stream == null)
|
if (stream == null)
|
||||||
throw new FileNotFoundException("Couldn't load the Witcher 3 mod files from resources.");
|
throw new FileNotFoundException("Couldn't load the Witcher 3 mod files from resources.");
|
||||||
var archive = new ZipArchive(stream);
|
var archive = new ZipArchive(stream);
|
||||||
@ -80,7 +80,8 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
|
|
||||||
archive.ExtractToDirectory(folder + @"witcher3-mod", true);
|
archive.ExtractToDirectory(folder + @"witcher3-mod", true);
|
||||||
|
|
||||||
System.Diagnostics.Process.Start(new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
|
System.Diagnostics.Process.Start(
|
||||||
|
new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Games.WoW" GeneratedClassName="WoW">
|
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
||||||
|
GeneratedClassNamespace="Artemis.Modules.Games.WoW" GeneratedClassName="WoW">
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
||||||
|
|||||||
@ -142,12 +142,6 @@ namespace Artemis.Modules.Games.WorldofWarcraft
|
|||||||
objectTYPE = 0x10
|
objectTYPE = 0x10
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ObjectManagerClass
|
|
||||||
{
|
|
||||||
public static uint clientConnection;
|
|
||||||
public static uint sCurMgr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum Party
|
public enum Party
|
||||||
{
|
{
|
||||||
NumOfPlayers = 200,
|
NumOfPlayers = 200,
|
||||||
@ -252,5 +246,11 @@ namespace Artemis.Modules.Games.WorldofWarcraft
|
|||||||
{
|
{
|
||||||
CGUnit_C__GetFacing = 0x35
|
CGUnit_C__GetFacing = 0x35
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ObjectManagerClass
|
||||||
|
{
|
||||||
|
public static uint clientConnection;
|
||||||
|
public static uint sCurMgr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,6 @@
|
|||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
using Artemis.Utilities;
|
|
||||||
using Artemis.Utilities.Memory;
|
using Artemis.Utilities.Memory;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.WorldofWarcraft
|
namespace Artemis.Modules.Games.WorldofWarcraft
|
||||||
@ -51,7 +50,5 @@ namespace Artemis.Modules.Games.WorldofWarcraft
|
|||||||
{
|
{
|
||||||
return Profile.GetRenderLayers(DataModel, keyboardOnly);
|
return Profile.GetRenderLayers(DataModel, keyboardOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,7 +232,6 @@
|
|||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="Layout"></xs:complexType>
|
|
||||||
<xs:complexType name="Filter" abstract="true"></xs:complexType>
|
<xs:complexType name="Filter" abstract="true"></xs:complexType>
|
||||||
<xs:complexType name="TimeSource" abstract="true"></xs:complexType>
|
<xs:complexType name="TimeSource" abstract="true"></xs:complexType>
|
||||||
<xs:simpleType name="SimpleLayoutAttribute">
|
<xs:simpleType name="SimpleLayoutAttribute">
|
||||||
@ -1020,8 +1019,8 @@
|
|||||||
<xs:element name="archiveFileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="archiveFileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="archiveEvery" minOccurs="0" maxOccurs="1" type="NLog.Targets.FileArchivePeriod" />
|
<xs:element name="archiveEvery" minOccurs="0" maxOccurs="1" type="NLog.Targets.FileArchivePeriod" />
|
||||||
<xs:element name="archiveAboveSize" minOccurs="0" maxOccurs="1" type="xs:long" />
|
<xs:element name="archiveAboveSize" minOccurs="0" maxOccurs="1" type="xs:long" />
|
||||||
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="enableArchiveFileCompression" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="enableArchiveFileCompression" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="cleanupFileName" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="cleanupFileName" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="fileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="fileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
@ -1093,16 +1092,16 @@
|
|||||||
<xs:documentation>Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: </xs:documentation>
|
<xs:documentation>Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: </xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="enableArchiveFileCompression" type="xs:boolean">
|
<xs:attribute name="enableArchiveFileCompression" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Indicates whether to compress archive files into the zip archive format.</xs:documentation>
|
<xs:documentation>Indicates whether to compress archive files into the zip archive format.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="forceManaged" type="xs:boolean">
|
<xs:attribute name="forceManaged" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation.</xs:documentation>
|
<xs:documentation>Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation.</xs:documentation>
|
||||||
@ -2238,6 +2237,18 @@
|
|||||||
<xs:enumeration value="HttpGet" />
|
<xs:enumeration value="HttpGet" />
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CompoundLayout">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="Layout">
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:element name="layout" minOccurs="0" maxOccurs="unbounded" type="Layout" />
|
||||||
|
</xs:choice>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Layout">
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:complexType>
|
||||||
<xs:complexType name="CsvLayout">
|
<xs:complexType name="CsvLayout">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Layout">
|
<xs:extension base="Layout">
|
||||||
@ -2334,8 +2345,14 @@
|
|||||||
<xs:extension base="Layout">
|
<xs:extension base="Layout">
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="NLog.Layouts.JsonAttribute" />
|
<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="NLog.Layouts.JsonAttribute" />
|
||||||
|
<xs:element name="renderEmptyObject" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="suppressSpaces" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="suppressSpaces" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
|
<xs:attribute name="renderEmptyObject" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Option to render the empty object value {}</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="suppressSpaces" type="xs:boolean">
|
<xs:attribute name="suppressSpaces" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Option to suppress the extra spaces in the output json</xs:documentation>
|
<xs:documentation>Option to suppress the extra spaces in the output json</xs:documentation>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Artemis.Profiles.Layers.Interfaces;
|
using Artemis.Profiles.Layers.Interfaces;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
@ -7,10 +8,16 @@ namespace Artemis.Profiles.Layers.Animations
|
|||||||
{
|
{
|
||||||
public class GrowAnimation : ILayerAnimation
|
public class GrowAnimation : ILayerAnimation
|
||||||
{
|
{
|
||||||
|
private DateTime _lastUpdate;
|
||||||
public string Name { get; } = "Grow";
|
public string Name { get; } = "Grow";
|
||||||
|
|
||||||
public void Update(LayerModel layerModel, bool updateAnimations)
|
public void Update(LayerModel layerModel, bool updateAnimations)
|
||||||
{
|
{
|
||||||
|
// Reset animation progress if layer wasn't drawn for 100ms
|
||||||
|
if (new TimeSpan(0, 0, 0, 0, 100) < DateTime.Now - _lastUpdate)
|
||||||
|
layerModel.Properties.AnimationProgress = 0;
|
||||||
|
_lastUpdate = DateTime.Now;
|
||||||
|
|
||||||
var progress = layerModel.Properties.AnimationProgress;
|
var progress = layerModel.Properties.AnimationProgress;
|
||||||
|
|
||||||
if (MustExpire(layerModel))
|
if (MustExpire(layerModel))
|
||||||
@ -24,7 +31,7 @@ namespace Artemis.Profiles.Layers.Animations
|
|||||||
|
|
||||||
public void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c)
|
public void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c)
|
||||||
{
|
{
|
||||||
if (applied.Brush == null)
|
if (applied?.Brush == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int scale = 4;
|
const int scale = 4;
|
||||||
|
|||||||
@ -8,11 +8,18 @@ namespace Artemis.Profiles.Layers.Animations
|
|||||||
{
|
{
|
||||||
public class PulseAnimation : ILayerAnimation
|
public class PulseAnimation : ILayerAnimation
|
||||||
{
|
{
|
||||||
|
private DateTime _lastUpdate;
|
||||||
public string Name { get; } = "Pulse";
|
public string Name { get; } = "Pulse";
|
||||||
|
|
||||||
public void Update(LayerModel layerModel, bool updateAnimations)
|
public void Update(LayerModel layerModel, bool updateAnimations)
|
||||||
{
|
{
|
||||||
|
// Reset animation progress if layer wasn't drawn for 100ms
|
||||||
|
if (new TimeSpan(0, 0, 0, 0, 100) < DateTime.Now - _lastUpdate)
|
||||||
|
layerModel.Properties.AnimationProgress = 0;
|
||||||
|
_lastUpdate = DateTime.Now;
|
||||||
|
|
||||||
var progress = layerModel.Properties.AnimationProgress;
|
var progress = layerModel.Properties.AnimationProgress;
|
||||||
|
|
||||||
if (MustExpire(layerModel))
|
if (MustExpire(layerModel))
|
||||||
progress = 0;
|
progress = 0;
|
||||||
progress = progress + layerModel.Properties.AnimationSpeed/2;
|
progress = progress + layerModel.Properties.AnimationSpeed/2;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ namespace Artemis.Profiles.Layers.Interfaces
|
|||||||
{
|
{
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
|
|
||||||
void Update(LayerModel layerModel, bool updateAnimations);
|
void Update(LayerModel layerModel, bool updateAnimations);
|
||||||
void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c);
|
void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c);
|
||||||
bool MustExpire(LayerModel layer);
|
bool MustExpire(LayerModel layer);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Artemis.Profiles.Layers.Models
|
|||||||
// Put the subject in a list, allowing Dynamic Linq to be used.
|
// Put the subject in a list, allowing Dynamic Linq to be used.
|
||||||
if (Type == "String")
|
if (Type == "String")
|
||||||
{
|
{
|
||||||
return _interpreter.Eval<bool>($"subject.{Field}.ToLower() {Operator} value",
|
return _interpreter.Eval<bool>($"subject.{Field}.ToLower(){Operator}(value)",
|
||||||
new Parameter("subject", subject.GetType(), subject),
|
new Parameter("subject", subject.GetType(), subject),
|
||||||
new Parameter("value", Value.ToLower()));
|
new Parameter("value", Value.ToLower()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ namespace Artemis.Profiles.Layers.Models
|
|||||||
public IEnumerable<LayerModel> GetLayers()
|
public IEnumerable<LayerModel> GetLayers()
|
||||||
{
|
{
|
||||||
var layers = new List<LayerModel>();
|
var layers = new List<LayerModel>();
|
||||||
foreach (var layerModel in Children)
|
foreach (var layerModel in Children.OrderBy(c => c.Order))
|
||||||
{
|
{
|
||||||
layers.Add(layerModel);
|
layers.Add(layerModel);
|
||||||
layers.AddRange(layerModel.GetLayers());
|
layers.AddRange(layerModel.GetLayers());
|
||||||
|
|||||||
@ -68,7 +68,7 @@ namespace Artemis.Profiles.Layers.Models
|
|||||||
|
|
||||||
public Rect GetRect(int scale = 4)
|
public Rect GetRect(int scale = 4)
|
||||||
{
|
{
|
||||||
return new Rect(X * scale, Y * scale, Width * scale, Height * scale);
|
return new Rect(X*scale, Y*scale, Width*scale, Height*scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,7 +44,8 @@
|
|||||||
VerticalAlignment="Top" Height="18" Width="130" />
|
VerticalAlignment="Top" Height="18" Width="130" />
|
||||||
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
|
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
|
||||||
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
|
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
|
||||||
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134" VerticalAlignment="Top" />
|
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134"
|
||||||
|
VerticalAlignment="Top" />
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@ -20,18 +20,15 @@ namespace Artemis.Profiles.Layers.Types.Audio
|
|||||||
{
|
{
|
||||||
internal class AudioType : ILayerType
|
internal class AudioType : ILayerType
|
||||||
{
|
{
|
||||||
|
private readonly List<LayerModel> _audioLayers = new List<LayerModel>();
|
||||||
private readonly MMDevice _device;
|
private readonly MMDevice _device;
|
||||||
private readonly MainManager _mainManager;
|
|
||||||
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(2048);
|
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(2048);
|
||||||
private readonly WasapiLoopbackCapture _waveIn;
|
private readonly WasapiLoopbackCapture _waveIn;
|
||||||
private readonly List<LayerModel> _audioLayers = new List<LayerModel>();
|
|
||||||
private int _lines;
|
private int _lines;
|
||||||
private AudioPropertiesModel _properties;
|
|
||||||
private AudioPropertiesModel _previousSettings;
|
private AudioPropertiesModel _previousSettings;
|
||||||
|
|
||||||
public AudioType(MainManager mainManager)
|
public AudioType(MainManager mainManager)
|
||||||
{
|
{
|
||||||
_mainManager = mainManager;
|
|
||||||
_device =
|
_device =
|
||||||
new MMDeviceEnumerator().EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active).FirstOrDefault();
|
new MMDeviceEnumerator().EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active).FirstOrDefault();
|
||||||
|
|
||||||
@ -107,6 +104,26 @@ namespace Artemis.Profiles.Layers.Types.Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetupProperties(LayerModel layerModel)
|
||||||
|
{
|
||||||
|
if (layerModel.Properties is AudioPropertiesModel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
layerModel.Properties = new AudioPropertiesModel(layerModel.Properties)
|
||||||
|
{
|
||||||
|
FadeSpeed = 0.2,
|
||||||
|
Sensitivity = 2
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public LayerPropertiesViewModel SetupViewModel(LayerPropertiesViewModel layerPropertiesViewModel,
|
||||||
|
List<ILayerAnimation> layerAnimations, IDataModel dataModel, LayerModel proposedLayer)
|
||||||
|
{
|
||||||
|
if (layerPropertiesViewModel is AudioPropertiesViewModel)
|
||||||
|
return layerPropertiesViewModel;
|
||||||
|
return new AudioPropertiesViewModel(proposedLayer, dataModel);
|
||||||
|
}
|
||||||
|
|
||||||
private void CompareSettings(LayerModel layerModel)
|
private void CompareSettings(LayerModel layerModel)
|
||||||
{
|
{
|
||||||
var settings = (AudioPropertiesModel) layerModel.Properties;
|
var settings = (AudioPropertiesModel) layerModel.Properties;
|
||||||
@ -133,26 +150,6 @@ namespace Artemis.Profiles.Layers.Types.Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupProperties(LayerModel layerModel)
|
|
||||||
{
|
|
||||||
if (layerModel.Properties is AudioPropertiesModel)
|
|
||||||
return;
|
|
||||||
|
|
||||||
layerModel.Properties = new AudioPropertiesModel(layerModel.Properties)
|
|
||||||
{
|
|
||||||
FadeSpeed = 0.2,
|
|
||||||
Sensitivity = 2
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public LayerPropertiesViewModel SetupViewModel(LayerPropertiesViewModel layerPropertiesViewModel,
|
|
||||||
List<ILayerAnimation> layerAnimations, IDataModel dataModel, LayerModel proposedLayer)
|
|
||||||
{
|
|
||||||
if (layerPropertiesViewModel is AudioPropertiesViewModel)
|
|
||||||
return layerPropertiesViewModel;
|
|
||||||
return new AudioPropertiesViewModel(proposedLayer, dataModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FftCalculated(object sender, FftEventArgs e)
|
private void FftCalculated(object sender, FftEventArgs e)
|
||||||
{
|
{
|
||||||
lock (SpectrumData)
|
lock (SpectrumData)
|
||||||
|
|||||||
@ -44,7 +44,8 @@
|
|||||||
VerticalAlignment="Top" Height="18" Width="130" />
|
VerticalAlignment="Top" Height="18" Width="130" />
|
||||||
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
|
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
|
||||||
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
|
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
|
||||||
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134" VerticalAlignment="Top" />
|
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134"
|
||||||
|
VerticalAlignment="Top" />
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ namespace Artemis.Profiles
|
|||||||
public List<LayerModel> GetLayers()
|
public List<LayerModel> GetLayers()
|
||||||
{
|
{
|
||||||
var layers = new List<LayerModel>();
|
var layers = new List<LayerModel>();
|
||||||
foreach (var layerModel in Layers)
|
foreach (var layerModel in Layers.OrderBy(l => l.Order))
|
||||||
{
|
{
|
||||||
layers.Add(layerModel);
|
layers.Add(layerModel);
|
||||||
layers.AddRange(layerModel.GetLayers());
|
layers.AddRange(layerModel.GetLayers());
|
||||||
|
|||||||
24
Artemis/Artemis/Properties/Resources.Designer.cs
generated
24
Artemis/Artemis/Properties/Resources.Designer.cs
generated
@ -288,6 +288,16 @@ namespace Artemis.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap redeemer {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("redeemer", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
/// Looks up a localized resource of type System.Byte[].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -311,9 +321,19 @@ namespace Artemis.Properties {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
/// Looks up a localized resource of type System.Byte[].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static byte[] Witcher3Artemis {
|
internal static byte[] ut_plugin {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Witcher3Artemis", resourceCulture);
|
object obj = ResourceManager.GetObject("ut_plugin", resourceCulture);
|
||||||
|
return ((byte[])(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Byte[].
|
||||||
|
/// </summary>
|
||||||
|
internal static byte[] witcher3_mod {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("witcher3_mod", resourceCulture);
|
||||||
return ((byte[])(obj));
|
return ((byte[])(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -178,13 +178,19 @@
|
|||||||
<data name="demo_gif" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="demo_gif" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Keyboards\demo-gif.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Keyboards\demo-gif.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Witcher3Artemis" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\Witcher3\Witcher3Artemis.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="g810" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="g810" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Keyboards\g810.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Keyboards\g810.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="generic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="generic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\generic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\generic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ut_plugin" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Modules\Games\UnrealTournament\Resources\ut-plugin.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="witcher3_mod" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Modules\Games\Witcher3\Resources\witcher3-mod.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="redeemer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Modules\Games\UnrealTournament\Resources\redeemer.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Binary file not shown.
@ -118,7 +118,7 @@ namespace Artemis.Utilities
|
|||||||
|
|
||||||
if (brush is RadialGradientBrush)
|
if (brush is RadialGradientBrush)
|
||||||
{
|
{
|
||||||
var randomBrush = (RadialGradientBrush)brush.CloneCurrentValue();
|
var randomBrush = (RadialGradientBrush) brush.CloneCurrentValue();
|
||||||
var rand = GetRandomRainbowMediaColor();
|
var rand = GetRandomRainbowMediaColor();
|
||||||
foreach (var stop in randomBrush.GradientStops)
|
foreach (var stop in randomBrush.GradientStops)
|
||||||
stop.Color = System.Windows.Media.Color.FromArgb(stop.Color.A, rand.R, rand.G, rand.B);
|
stop.Color = System.Windows.Media.Color.FromArgb(stop.Color.A, rand.R, rand.G, rand.B);
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Artemis.Modules.Games.Overwatch;
|
|
||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using NLog;
|
using NLog;
|
||||||
@ -11,6 +10,23 @@ namespace Artemis.Utilities.DataReaders
|
|||||||
{
|
{
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
#region Razer
|
||||||
|
|
||||||
|
public static void PlaceRazerDll(string path)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.WriteAllBytes(path + @"\RzChromaSDK64.dll", Resources.RzChromaSDK64);
|
||||||
|
Logger.Debug("Successfully placed Razer DLL in {0}", path);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.Error(e, "Couldn't place Razer DLL in {0}", path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Logitech
|
#region Logitech
|
||||||
|
|
||||||
private const string LogitechPath = @"C:\Program Files\Logitech Gaming Software\SDK\LED\x64\";
|
private const string LogitechPath = @"C:\Program Files\Logitech Gaming Software\SDK\LED\x64\";
|
||||||
@ -95,22 +111,5 @@ namespace Artemis.Utilities.DataReaders
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Razer
|
|
||||||
|
|
||||||
public static void PlaceRazerDll(string path)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File.WriteAllBytes(path + @"\RzChromaSDK64.dll", Resources.RzChromaSDK64);
|
|
||||||
Logger.Debug("Successfully placed Razer DLL in {0}", path);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Logger.Error(e, "Couldn't place Razer DLL in {0}", path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO.Pipes;
|
using System.IO.Pipes;
|
||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
namespace Artemis.Utilities.DataReaders
|
namespace Artemis.Utilities.DataReaders
|
||||||
{
|
{
|
||||||
@ -13,80 +12,35 @@ namespace Artemis.Utilities.DataReaders
|
|||||||
|
|
||||||
public class PipeServer
|
public class PipeServer
|
||||||
{
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
private string _pipeName;
|
private string _pipeName;
|
||||||
|
private NamedPipeServerStream _pipeServer;
|
||||||
|
|
||||||
|
public PipeServer(ILogger logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
public bool Running { get; set; }
|
|
||||||
public event DelegateMessage PipeMessage;
|
public event DelegateMessage PipeMessage;
|
||||||
|
|
||||||
public void Start(string pipeName)
|
public void Start(string pipeName)
|
||||||
{
|
{
|
||||||
Running = true;
|
|
||||||
_pipeName = pipeName;
|
_pipeName = pipeName;
|
||||||
var task = new Task(PipeLoop);
|
|
||||||
task.Start();
|
var security = new PipeSecurity();
|
||||||
|
var sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
|
||||||
|
security.AddAccessRule(new PipeAccessRule(sid, PipeAccessRights.FullControl, AccessControlType.Allow));
|
||||||
|
_pipeServer = new NamedPipeServerStream(_pipeName, PipeDirection.In, 254,
|
||||||
|
PipeTransmissionMode.Byte, PipeOptions.Asynchronous, 4096, 4096, security);
|
||||||
|
_pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, _pipeServer);
|
||||||
|
_logger.Info("Opened named pipe '{0}'", _pipeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
Running = false;
|
_pipeServer.Close();
|
||||||
}
|
_pipeServer.Dispose();
|
||||||
|
_logger.Info("Closed named pipe '{0}'", _pipeName);
|
||||||
private void PipeLoop()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var security = new PipeSecurity();
|
|
||||||
var sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
|
|
||||||
security.AddAccessRule(new PipeAccessRule(sid, PipeAccessRights.FullControl,
|
|
||||||
AccessControlType.Allow));
|
|
||||||
|
|
||||||
while (Running)
|
|
||||||
{
|
|
||||||
var namedPipeServerStream = new NamedPipeServerStream(_pipeName, PipeDirection.In, 254,
|
|
||||||
PipeTransmissionMode.Byte, PipeOptions.None, 4096, 4096, security);
|
|
||||||
|
|
||||||
namedPipeServerStream.WaitForConnection();
|
|
||||||
var buffer = new byte[4096];
|
|
||||||
namedPipeServerStream.Read(buffer, 0, 4096);
|
|
||||||
namedPipeServerStream.Close();
|
|
||||||
|
|
||||||
var task = new Task(() => HandleMessage(buffer));
|
|
||||||
task.Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleMessage(byte[] buffer)
|
|
||||||
{
|
|
||||||
var request = Encoding.ASCII.GetString(buffer);
|
|
||||||
PipeMessage?.Invoke(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Listen(string pipeName)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var security = new PipeSecurity();
|
|
||||||
var sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
|
|
||||||
security.AddAccessRule(new PipeAccessRule(sid, PipeAccessRights.FullControl, AccessControlType.Allow));
|
|
||||||
|
|
||||||
// Set to class level var so we can re-use in the async callback method
|
|
||||||
_pipeName = pipeName;
|
|
||||||
// Create the new async pipe
|
|
||||||
var pipeServer = new NamedPipeServerStream(pipeName, PipeDirection.In, 254, PipeTransmissionMode.Byte,
|
|
||||||
PipeOptions.Asynchronous, 254, 254, security);
|
|
||||||
|
|
||||||
// Wait for a connection
|
|
||||||
pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, pipeServer);
|
|
||||||
}
|
|
||||||
catch (Exception oEx)
|
|
||||||
{
|
|
||||||
Debug.WriteLine(oEx.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WaitForConnectionCallBack(IAsyncResult iar)
|
private void WaitForConnectionCallBack(IAsyncResult iar)
|
||||||
@ -98,34 +52,39 @@ namespace Artemis.Utilities.DataReaders
|
|||||||
// End waiting for the connection
|
// End waiting for the connection
|
||||||
pipeServer.EndWaitForConnection(iar);
|
pipeServer.EndWaitForConnection(iar);
|
||||||
|
|
||||||
var buffer = new byte[255];
|
var buffer = new byte[4096];
|
||||||
|
|
||||||
// Read the incoming message
|
// Read the incoming message
|
||||||
pipeServer.Read(buffer, 0, 255);
|
pipeServer.Read(buffer, 0, 4096);
|
||||||
|
|
||||||
// Convert byte buffer to string
|
// Convert byte buffer to string
|
||||||
var stringData = Encoding.UTF8.GetString(buffer, 0, buffer.Length);
|
var stringData = Encoding.ASCII.GetString(buffer, 0, buffer.Length);
|
||||||
|
|
||||||
// Pass message back to calling form
|
// Pass message back to calling form
|
||||||
PipeMessage?.Invoke(stringData);
|
PipeMessage?.Invoke(stringData);
|
||||||
|
|
||||||
// Kill original sever and create new wait server
|
// Kill original sever and create new wait server
|
||||||
pipeServer.Close();
|
pipeServer.Close();
|
||||||
|
pipeServer = GetPipeServer(_pipeName);
|
||||||
var security = new PipeSecurity();
|
|
||||||
var sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
|
|
||||||
security.AddAccessRule(new PipeAccessRule(sid, PipeAccessRights.FullControl, AccessControlType.Allow));
|
|
||||||
|
|
||||||
pipeServer = new NamedPipeServerStream(_pipeName, PipeDirection.In, 254, PipeTransmissionMode.Byte,
|
|
||||||
PipeOptions.Asynchronous, 254, 254, security);
|
|
||||||
|
|
||||||
// Recursively wait for the connection again and again....
|
// Recursively wait for the connection again and again....
|
||||||
|
_pipeServer = pipeServer;
|
||||||
pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, pipeServer);
|
pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, pipeServer);
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
_logger.Error(e, "Exception in named pipe '{0}'", _pipeName);
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static NamedPipeServerStream GetPipeServer(string name)
|
||||||
|
{
|
||||||
|
var security = new PipeSecurity();
|
||||||
|
var sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
|
||||||
|
security.AddAccessRule(new PipeAccessRule(sid, PipeAccessRights.FullControl, AccessControlType.Allow));
|
||||||
|
return new NamedPipeServerStream(name, PipeDirection.In, 254, PipeTransmissionMode.Byte,
|
||||||
|
PipeOptions.Asynchronous, 4096, 4096, security);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,12 +33,11 @@ namespace Artemis.Utilities
|
|||||||
foreach (var file in archive.Entries)
|
foreach (var file in archive.Entries)
|
||||||
{
|
{
|
||||||
var completeFileName = Path.Combine(destinationDirectoryName, file.FullName);
|
var completeFileName = Path.Combine(destinationDirectoryName, file.FullName);
|
||||||
|
Directory.CreateDirectory(Path.GetDirectoryName(completeFileName));
|
||||||
|
|
||||||
if (file.Name == "")
|
if (file.Name == "")
|
||||||
{
|
|
||||||
// Assuming Empty for Directory
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(completeFileName));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
file.ExtractToFile(completeFileName, true);
|
file.ExtractToFile(completeFileName, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,13 +50,15 @@ namespace Artemis.Utilities
|
|||||||
if (ReferenceEquals(source, null))
|
if (ReferenceEquals(source, null))
|
||||||
return default(T);
|
return default(T);
|
||||||
|
|
||||||
return (T)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(source), source.GetType());
|
return (T) JsonConvert.DeserializeObject(JsonConvert.SerializeObject(source), source.GetType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object GetPropertyValue(object o, string path)
|
public static object GetPropertyValue(object o, string path)
|
||||||
{
|
{
|
||||||
var propertyNames = path.Split('.');
|
var propertyNames = path.Split('.');
|
||||||
var prop = o.GetType().GetProperty(propertyNames[0]);
|
var prop = o.GetType().GetProperty(propertyNames[0]);
|
||||||
|
if (prop == null)
|
||||||
|
return null;
|
||||||
var value = prop.GetValue(o, null);
|
var value = prop.GetValue(o, null);
|
||||||
|
|
||||||
if (propertyNames.Length == 1 || value == null)
|
if (propertyNames.Length == 1 || value == null)
|
||||||
|
|||||||
@ -38,7 +38,8 @@ namespace Artemis.Utilities.Memory
|
|||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T ReadMultilevelPointer<T>(this IMemory memory, IntPtr address, params int[] offsets) where T : struct
|
public static T ReadMultilevelPointer<T>(this IMemory memory, IntPtr address, params int[] offsets)
|
||||||
|
where T : struct
|
||||||
{
|
{
|
||||||
for (var i = 0; i < offsets.Length - 1; i++)
|
for (var i = 0; i < offsets.Length - 1; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,12 +15,12 @@ namespace Artemis.Utilities
|
|||||||
{
|
{
|
||||||
public static class Updater
|
public static class Updater
|
||||||
{
|
{
|
||||||
public static int CurrentVersion = 1220;
|
public static int CurrentVersion = 1230;
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
||||||
{
|
{
|
||||||
Logger.Info("Checking for updates - Current version: 1.2.2.0");
|
Logger.Info("Checking for updates - Current version: 1.2.3.0");
|
||||||
if (!General.Default.CheckForUpdates)
|
if (!General.Default.CheckForUpdates)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,15 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
new NamedOperator("Not equal to", "!=")
|
new NamedOperator("Not equal to", "!=")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private readonly NamedOperator[] _stringOperators =
|
||||||
|
{
|
||||||
|
new NamedOperator("Equal to", "=="),
|
||||||
|
new NamedOperator("Not equal to", "!="),
|
||||||
|
new NamedOperator("Contains", ".Contains"),
|
||||||
|
new NamedOperator("Starts with", ".StartsWith"),
|
||||||
|
new NamedOperator("Ends with", ".EndsWith")
|
||||||
|
};
|
||||||
|
|
||||||
private bool _enumValueIsVisible;
|
private bool _enumValueIsVisible;
|
||||||
private bool _preselecting;
|
private bool _preselecting;
|
||||||
private GeneralHelpers.PropertyCollection _selectedDataModelProp;
|
private GeneralHelpers.PropertyCollection _selectedDataModelProp;
|
||||||
@ -156,6 +165,10 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
Enums.Add("False");
|
Enums.Add("False");
|
||||||
EnumValueIsVisible = true;
|
EnumValueIsVisible = true;
|
||||||
break;
|
break;
|
||||||
|
case "String":
|
||||||
|
Operators.AddRange(_stringOperators);
|
||||||
|
UserValueIsVisible = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Operators.AddRange(_operators);
|
Operators.AddRange(_operators);
|
||||||
UserValueIsVisible = true;
|
UserValueIsVisible = true;
|
||||||
|
|||||||
@ -422,6 +422,8 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
{
|
{
|
||||||
// Update the UI
|
// Update the UI
|
||||||
Layers.Clear();
|
Layers.Clear();
|
||||||
|
ProfileViewModel.SelectedLayer = null;
|
||||||
|
|
||||||
if (SelectedProfile != null)
|
if (SelectedProfile != null)
|
||||||
Layers.AddRange(SelectedProfile.Layers);
|
Layers.AddRange(SelectedProfile.Layers);
|
||||||
|
|
||||||
@ -431,7 +433,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
// A small delay to allow the profile list to rebuild
|
// A small delay to allow the profile list to rebuild
|
||||||
Task.Factory.StartNew(() =>
|
Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
Thread.Sleep(20);
|
Thread.Sleep(100);
|
||||||
ProfileViewModel.SelectedLayer = selectModel;
|
ProfileViewModel.SelectedLayer = selectModel;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -517,37 +519,29 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
if (SelectedProfile == null)
|
if (SelectedProfile == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var oldName = SelectedProfile.Name;
|
var name = await DialogService.ShowInputDialog("Rename profile", "Please enter a unique new profile name");
|
||||||
SelectedProfile.Name = await DialogService
|
|
||||||
.ShowInputDialog("Rename profile", "Please enter a unique new profile name");
|
|
||||||
|
|
||||||
// Null when the user cancelled
|
// Null when the user cancelled
|
||||||
if (string.IsNullOrEmpty(SelectedProfile.Name) || SelectedProfile.Name.Length < 2)
|
if (string.IsNullOrEmpty(name) || name.Length < 2)
|
||||||
{
|
|
||||||
SelectedProfile.Name = oldName;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Verify the name
|
// Verify the name
|
||||||
while (ProfileProvider.GetAll().Contains(SelectedProfile))
|
while (ProfileProvider.GetAll().Any(p => p.Name == name && p.GameName == SelectedProfile.GameName &&
|
||||||
|
p.KeyboardSlug == SelectedProfile.KeyboardSlug))
|
||||||
{
|
{
|
||||||
SelectedProfile.Name = await DialogService.
|
name = await DialogService.ShowInputDialog("Name already in use", "Please enter a unique new profile name");
|
||||||
ShowInputDialog("Name already in use", "Please enter a unique new profile name");
|
|
||||||
|
|
||||||
// Null when the user cancelled
|
// Null when the user cancelled
|
||||||
if (string.IsNullOrEmpty(SelectedProfile.Name) || SelectedProfile.Name.Length < 2)
|
if (string.IsNullOrEmpty(name) || name.Length < 2)
|
||||||
{
|
|
||||||
SelectedProfile.Name = oldName;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var newName = SelectedProfile.Name;
|
var profile = SelectedProfile;
|
||||||
SelectedProfile.Name = oldName;
|
SelectedProfile = null;
|
||||||
ProfileProvider.RenameProfile(SelectedProfile, newName);
|
ProfileProvider.RenameProfile(profile, name);
|
||||||
|
|
||||||
|
LastProfile = name;
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
SelectedProfile = Profiles.FirstOrDefault(p => p.Name == newName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void DuplicateProfile()
|
public async void DuplicateProfile()
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@ -10,10 +11,11 @@ using Artemis.Managers;
|
|||||||
using Artemis.Modules.Effects.ProfilePreview;
|
using Artemis.Modules.Effects.ProfilePreview;
|
||||||
using Artemis.Profiles;
|
using Artemis.Profiles;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
using Artemis.Profiles.Layers.Types.Keyboard;
|
using Artemis.Profiles.Layers.Types.Folder;
|
||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
using Castle.Components.DictionaryAdapter;
|
||||||
using MahApps.Metro;
|
using MahApps.Metro;
|
||||||
|
|
||||||
namespace Artemis.ViewModels.Profiles
|
namespace Artemis.ViewModels.Profiles
|
||||||
@ -30,6 +32,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
private Cursor _keyboardPreviewCursor;
|
private Cursor _keyboardPreviewCursor;
|
||||||
private bool _resizing;
|
private bool _resizing;
|
||||||
private LayerModel _selectedLayer;
|
private LayerModel _selectedLayer;
|
||||||
|
private bool _showAll;
|
||||||
|
|
||||||
public ProfileViewModel(IEventAggregator events, DeviceManager deviceManager)
|
public ProfileViewModel(IEventAggregator events, DeviceManager deviceManager)
|
||||||
{
|
{
|
||||||
@ -37,6 +40,8 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
_deviceManager = deviceManager;
|
_deviceManager = deviceManager;
|
||||||
|
|
||||||
PreviewTimer = new Timer(40);
|
PreviewTimer = new Timer(40);
|
||||||
|
ShowAll = false;
|
||||||
|
|
||||||
PreviewTimer.Elapsed += InvokeUpdateKeyboardPreview;
|
PreviewTimer.Elapsed += InvokeUpdateKeyboardPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,6 +81,17 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ShowAll
|
||||||
|
{
|
||||||
|
get { return _showAll; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == _showAll) return;
|
||||||
|
_showAll = value;
|
||||||
|
NotifyOfPropertyChange(() => ShowAll);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ImageSource KeyboardImage => ImageUtilities
|
public ImageSource KeyboardImage => ImageUtilities
|
||||||
.BitmapToBitmapImage(_deviceManager.ActiveKeyboard?.PreviewSettings.Image ?? Resources.none);
|
.BitmapToBitmapImage(_deviceManager.ActiveKeyboard?.PreviewSettings.Image ?? Resources.none);
|
||||||
|
|
||||||
@ -93,7 +109,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
_blurProgress = _blurProgress + 0.025;
|
_blurProgress = _blurProgress + 0.025;
|
||||||
BlurRadius = (Math.Sin(_blurProgress*Math.PI) + 1)*10 + 10;
|
BlurRadius = (Math.Sin(_blurProgress*Math.PI) + 1)*10 + 10;
|
||||||
|
|
||||||
if (SelectedProfile == null || _deviceManager.ActiveKeyboard == null)
|
if (SelectedProfile == null || _deviceManager.ActiveKeyboard == null || (!ShowAll && SelectedLayer == null))
|
||||||
{
|
{
|
||||||
var preview = new DrawingImage();
|
var preview = new DrawingImage();
|
||||||
preview.Freeze();
|
preview.Freeze();
|
||||||
@ -101,6 +117,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var keyboardRect = _deviceManager.ActiveKeyboard.KeyboardRectangle(4);
|
var keyboardRect = _deviceManager.ActiveKeyboard.KeyboardRectangle(4);
|
||||||
var visual = new DrawingVisual();
|
var visual = new DrawingVisual();
|
||||||
using (var drawingContext = visual.RenderOpen())
|
using (var drawingContext = visual.RenderOpen())
|
||||||
@ -109,8 +126,10 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
drawingContext.PushClip(new RectangleGeometry(keyboardRect));
|
drawingContext.PushClip(new RectangleGeometry(keyboardRect));
|
||||||
drawingContext.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, keyboardRect);
|
drawingContext.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, keyboardRect);
|
||||||
|
|
||||||
|
// Get the layers that must be drawn
|
||||||
|
var drawLayers = GetRenderLayers();
|
||||||
|
|
||||||
// Draw the layers
|
// Draw the layers
|
||||||
var drawLayers = SelectedProfile.GetRenderLayers(new ProfilePreviewDataModel(), false, true);
|
|
||||||
foreach (var layer in drawLayers)
|
foreach (var layer in drawLayers)
|
||||||
{
|
{
|
||||||
layer.Update(null, true, false);
|
layer.Update(null, true, false);
|
||||||
@ -121,7 +140,12 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
// Get the selection color
|
// Get the selection color
|
||||||
var accentColor = ThemeManager.DetectAppStyle(Application.Current)?.Item2?.Resources["AccentColor"];
|
var accentColor = ThemeManager.DetectAppStyle(Application.Current)?.Item2?.Resources["AccentColor"];
|
||||||
if (accentColor == null)
|
if (accentColor == null)
|
||||||
|
{
|
||||||
|
var preview = new DrawingImage();
|
||||||
|
preview.Freeze();
|
||||||
|
KeyboardPreview = preview;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pen = new Pen(new SolidColorBrush((Color) accentColor), 0.4);
|
var pen = new Pen(new SolidColorBrush((Color) accentColor), 0.4);
|
||||||
|
|
||||||
@ -199,8 +223,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
var x = pos.X/((double) keyboard.PreviewSettings.Width/keyboard.Width);
|
var x = pos.X/((double) keyboard.PreviewSettings.Width/keyboard.Width);
|
||||||
var y = pos.Y/((double) keyboard.PreviewSettings.Height/keyboard.Height);
|
var y = pos.Y/((double) keyboard.PreviewSettings.Height/keyboard.Height);
|
||||||
|
|
||||||
var hoverLayer = SelectedProfile.GetLayers()
|
var hoverLayer = GetLayers().Where(l => l.MustDraw())
|
||||||
.Where(l => l.MustDraw())
|
|
||||||
.FirstOrDefault(l => l.Properties.GetRect(1).Contains(x, y));
|
.FirstOrDefault(l => l.Properties.GetRect(1).Contains(x, y));
|
||||||
|
|
||||||
SelectedLayer = hoverLayer;
|
SelectedLayer = hoverLayer;
|
||||||
@ -219,8 +242,7 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
var keyboard = _deviceManager.ActiveKeyboard;
|
var keyboard = _deviceManager.ActiveKeyboard;
|
||||||
var x = pos.X/((double) keyboard.PreviewSettings.Width/keyboard.Width);
|
var x = pos.X/((double) keyboard.PreviewSettings.Width/keyboard.Width);
|
||||||
var y = pos.Y/((double) keyboard.PreviewSettings.Height/keyboard.Height);
|
var y = pos.Y/((double) keyboard.PreviewSettings.Height/keyboard.Height);
|
||||||
var hoverLayer = SelectedProfile.GetLayers()
|
var hoverLayer = GetLayers().Where(l => l.MustDraw())
|
||||||
.Where(l => l.MustDraw())
|
|
||||||
.FirstOrDefault(l => l.Properties.GetRect(1).Contains(x, y));
|
.FirstOrDefault(l => l.Properties.GetRect(1).Contains(x, y));
|
||||||
|
|
||||||
HandleDragging(e, x, y, hoverLayer);
|
HandleDragging(e, x, y, hoverLayer);
|
||||||
@ -309,6 +331,39 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<LayerModel> GetRenderLayers()
|
||||||
|
{
|
||||||
|
// Get the layers that must be drawn
|
||||||
|
List<LayerModel> drawLayers;
|
||||||
|
if (ShowAll)
|
||||||
|
return SelectedProfile.GetRenderLayers(new ProfilePreviewDataModel(), false, true);
|
||||||
|
|
||||||
|
if (SelectedLayer == null)
|
||||||
|
return new EditableList<LayerModel>();
|
||||||
|
|
||||||
|
if (SelectedLayer.LayerType is FolderType)
|
||||||
|
drawLayers = SelectedLayer.GetRenderLayers(new ProfilePreviewDataModel(), false, true);
|
||||||
|
else
|
||||||
|
drawLayers = new List<LayerModel> {SelectedLayer};
|
||||||
|
|
||||||
|
return drawLayers;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<LayerModel> GetLayers()
|
||||||
|
{
|
||||||
|
// Get the layers that must be drawn
|
||||||
|
List<LayerModel> drawLayers;
|
||||||
|
if (ShowAll)
|
||||||
|
drawLayers = SelectedProfile.GetLayers();
|
||||||
|
else if (SelectedLayer.LayerType is FolderType)
|
||||||
|
drawLayers = SelectedLayer.GetLayers().ToList();
|
||||||
|
else
|
||||||
|
drawLayers = new List<LayerModel> { SelectedLayer };
|
||||||
|
|
||||||
|
return drawLayers;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
|
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.2.2.0" VerticalAlignment="Center"
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.2.3.0" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
<Button Grid.Row="1" Grid.Column="1" Focusable="False"
|
<Button Grid.Row="1" Grid.Column="1" Focusable="False"
|
||||||
Style="{StaticResource AccentedSquareButtonStyle}"
|
Style="{StaticResource AccentedSquareButtonStyle}"
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
xmlns:utilities="clr-namespace:Artemis.Utilities"
|
xmlns:utilities="clr-namespace:Artemis.Utilities"
|
||||||
xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
|
xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
|
||||||
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
|
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="510" Width="1055">
|
d:DesignHeight="510" Width="1055">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@ -23,6 +24,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Preview Background="#FF232323" -->
|
<!-- Preview Background="#FF232323" -->
|
||||||
@ -147,7 +149,16 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Layer list -->
|
<!-- Layer list -->
|
||||||
<Label Grid.Column="1" Grid.Row="0" FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" />
|
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" />
|
||||||
|
<Label HorizontalAlignment="Right" ToolTip="Show all layers instead of just the one you have selected"
|
||||||
|
Content="Show all" Margin="88,0,0,0" VerticalAlignment="Center" />
|
||||||
|
<ToggleButton x:Name="ShowAll" ToolTip="Show all layers instead of just the one you have selected"
|
||||||
|
Margin="0 3 0 0" Width="25" Height="25"
|
||||||
|
IsChecked="{Binding Path=ProfileViewModel.ShowAll, Mode=TwoWay}"
|
||||||
|
Style="{DynamicResource MetroCircleToggleButtonStyle}" HorizontalAlignment="Right" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}"
|
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}"
|
||||||
BorderThickness="3" Margin="10,0,0,0" Height="400" Width="233">
|
BorderThickness="3" Margin="10,0,0,0" Height="400" Width="233">
|
||||||
<TreeView x:Name="ProfileTree"
|
<TreeView x:Name="ProfileTree"
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Diagnostics;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
namespace Artemis.Views
|
namespace Artemis.Views
|
||||||
@ -16,7 +15,8 @@ namespace Artemis.Views
|
|||||||
|
|
||||||
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start("https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)");
|
System.Diagnostics.Process.Start(
|
||||||
|
"https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
<package id="Caliburn.Micro" version="3.0.1" targetFramework="net452" />
|
<package id="Caliburn.Micro" version="3.0.1" targetFramework="net452" />
|
||||||
<package id="Caliburn.Micro.Core" version="3.0.1" targetFramework="net452" />
|
<package id="Caliburn.Micro.Core" version="3.0.1" targetFramework="net452" />
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net452" />
|
<package id="Castle.Core" version="3.3.3" targetFramework="net452" />
|
||||||
<package id="Colore" version="4.0.0" targetFramework="net452" />
|
<package id="Colore" version="5.0.0" targetFramework="net461" />
|
||||||
<package id="CUE.NET" version="1.0.3" targetFramework="net452" />
|
<package id="CUE.NET" version="1.0.3" targetFramework="net452" />
|
||||||
<package id="DynamicExpresso.Core" version="1.3.1.0" targetFramework="net452" />
|
<package id="DynamicExpresso.Core" version="1.3.1.0" targetFramework="net452" />
|
||||||
<package id="Extended.Wpf.Toolkit" version="2.7" targetFramework="net452" />
|
<package id="Extended.Wpf.Toolkit" version="2.7" targetFramework="net452" />
|
||||||
@ -13,14 +13,14 @@
|
|||||||
<package id="MahApps.Metro" version="1.2.4.0" targetFramework="net452" />
|
<package id="MahApps.Metro" version="1.2.4.0" targetFramework="net452" />
|
||||||
<package id="MahApps.Metro.Resources" version="0.6.1.0" targetFramework="net452" />
|
<package id="MahApps.Metro.Resources" version="0.6.1.0" targetFramework="net452" />
|
||||||
<package id="NAudio" version="1.7.3" targetFramework="net452" />
|
<package id="NAudio" version="1.7.3" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
|
||||||
<package id="Ninject" version="3.2.2.0" targetFramework="net452" />
|
<package id="Ninject" version="3.2.2.0" targetFramework="net452" />
|
||||||
<package id="Ninject.Extensions.Factory" version="3.2.1.0" targetFramework="net452" />
|
<package id="Ninject.Extensions.Factory" version="3.2.1.0" targetFramework="net452" />
|
||||||
<package id="Ninject.Extensions.Logging" version="3.2.3.0" targetFramework="net452" />
|
<package id="Ninject.Extensions.Logging" version="3.2.3.0" targetFramework="net452" />
|
||||||
<package id="Ninject.Extensions.Logging.nlog4" version="3.2.3.0" targetFramework="net452" />
|
<package id="Ninject.Extensions.Logging.nlog4" version="3.2.3.0" targetFramework="net452" />
|
||||||
<package id="NLog" version="4.3.4" targetFramework="net452" />
|
<package id="NLog" version="4.3.7" targetFramework="net461" />
|
||||||
<package id="NLog.Schema" version="4.3.4" targetFramework="net452" />
|
<package id="NLog.Schema" version="4.3.7" targetFramework="net461" />
|
||||||
<package id="SpotifyAPI-NET" version="2.9.0" targetFramework="net452" />
|
<package id="SpotifyAPI-NET" version="2.11.0" targetFramework="net461" />
|
||||||
<package id="VirtualInput" version="1.0.1" targetFramework="net452" />
|
<package id="VirtualInput" version="1.0.1" targetFramework="net452" />
|
||||||
<package id="WpfExceptionViewer" version="1.0.0.0" targetFramework="net452" />
|
<package id="WpfExceptionViewer" version="1.0.0.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
153
Artemis/UT2Artemis/UT2Artemis.vcxproj
Normal file
153
Artemis/UT2Artemis/UT2Artemis.vcxproj
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{CF766633-768F-4A74-AA27-FF7D81191D76}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>UT2Artemis</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;UT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;UT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
17
Artemis/UT2Artemis/UT2Artemis.vcxproj.filters
Normal file
17
Artemis/UT2Artemis/UT2Artemis.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
21
Artemis/UnrealTournament2Artemis/Artemis.uplugin
Normal file
21
Artemis/UnrealTournament2Artemis/Artemis.uplugin
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"Version" : 1,
|
||||||
|
"FileVersion": 3,
|
||||||
|
"FriendlyName": "Artemis Plugin",
|
||||||
|
"VersionName": "1.0",
|
||||||
|
"CreatedBy": "Robert Beekman",
|
||||||
|
"CreatedByURL": "https://github.com/SpoinkyNL/Artemis",
|
||||||
|
"EngineVersion": "4.4.0",
|
||||||
|
"Description": "Communicates with Artemis to let the main program know what's happening ingame",
|
||||||
|
"Category": "UnrealTournament.Mod",
|
||||||
|
"EnabledByDefault": true,
|
||||||
|
"CanContainContent": false,
|
||||||
|
|
||||||
|
"Modules": [
|
||||||
|
{
|
||||||
|
"Name": "Artemis",
|
||||||
|
"Type": "Runtime",
|
||||||
|
"WhitelistPlatforms": [ "Win32", "Win64" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Changelist" : 2897679,
|
||||||
|
"BuildId" : "5a8ef5b7-c9bb-42bd-ab7c-fb8e33f704ec",
|
||||||
|
"Modules" :
|
||||||
|
{
|
||||||
|
"Artemis" : "UE4-Artemis-Win64-Shipping.dll"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
Artemis/UnrealTournament2Artemis/Source/Artemis.Build.cs
Normal file
23
Artemis/UnrealTournament2Artemis/Source/Artemis.Build.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace UnrealBuildTool.Rules
|
||||||
|
{
|
||||||
|
public class Artemis : ModuleRules
|
||||||
|
{
|
||||||
|
public Artemis(TargetInfo Target)
|
||||||
|
{
|
||||||
|
PublicDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"Core",
|
||||||
|
"CoreUObject",
|
||||||
|
"Engine",
|
||||||
|
"UnrealTournament",
|
||||||
|
"InputCore",
|
||||||
|
"SlateCore",
|
||||||
|
"Json"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
225
Artemis/UnrealTournament2Artemis/Source/Private/Artemis.cpp
Normal file
225
Artemis/UnrealTournament2Artemis/Source/Private/Artemis.cpp
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
#include "Artemis.h"
|
||||||
|
|
||||||
|
#include "UnrealTournament.h"
|
||||||
|
#include "UTPlayerController.h"
|
||||||
|
#include "UTGameState.h"
|
||||||
|
#include "UTArmor.h"
|
||||||
|
#include "UTTimedPowerup.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY_STATIC(LogUTKBLightShow, Log, All);
|
||||||
|
|
||||||
|
AArtemis::AArtemis(const FObjectInitializer& ObjectInitializer)
|
||||||
|
: Super(ObjectInitializer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
FArtemis::FArtemis()
|
||||||
|
{
|
||||||
|
FrameTimeMinimum = 0.03f;
|
||||||
|
DeltaTimeAccumulator = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_MODULE(FArtemis, Artemis)
|
||||||
|
|
||||||
|
void FArtemis::StartupModule()
|
||||||
|
{
|
||||||
|
WritePipe(FString(TEXT("Unreal Tournament plugin loaded")));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FArtemis::ShutdownModule()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FArtemis::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
if (GIsEditor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Avoid double ticking
|
||||||
|
if (LastFrameCounter > 0 && LastFrameCounter == GFrameCounter)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LastFrameCounter = GFrameCounter;
|
||||||
|
|
||||||
|
// We may be going 120hz, don't spam the device
|
||||||
|
DeltaTimeAccumulator += DeltaTime;
|
||||||
|
if (DeltaTimeAccumulator < FrameTimeMinimum)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DeltaTimeAccumulator = 0;
|
||||||
|
|
||||||
|
// Setup JSON object
|
||||||
|
TSharedRef<FJsonObject> RootJson(new FJsonObject());
|
||||||
|
TSharedRef<FJsonObject> PlayerJson(new FJsonObject());
|
||||||
|
TSharedRef<FJsonObject> EnvironmentJson(new FJsonObject());
|
||||||
|
RootJson->SetObjectField("Player", PlayerJson);
|
||||||
|
RootJson->SetObjectField("Environment", EnvironmentJson);
|
||||||
|
// Setup JSON writer to be used before returning
|
||||||
|
FString Buffer;
|
||||||
|
TSharedRef<TJsonWriter<> > Writer = TJsonWriterFactory<>::Create(&Buffer);
|
||||||
|
|
||||||
|
AUTPlayerController* UTPC = nullptr;
|
||||||
|
AUTGameState* GS = nullptr;
|
||||||
|
const TIndirectArray<FWorldContext>& AllWorlds = GEngine->GetWorldContexts();
|
||||||
|
for (const FWorldContext& Context : AllWorlds)
|
||||||
|
{
|
||||||
|
UWorld* World = Context.World();
|
||||||
|
if (World && World->WorldType == EWorldType::Game)
|
||||||
|
{
|
||||||
|
UTPC = Cast<AUTPlayerController>(GEngine->GetFirstLocalPlayerController(World));
|
||||||
|
if (UTPC)
|
||||||
|
{
|
||||||
|
UUTLocalPlayer* UTLP = Cast<UUTLocalPlayer>(UTPC->GetLocalPlayer());
|
||||||
|
if (UTLP == nullptr || UTLP->IsMenuGame())
|
||||||
|
{
|
||||||
|
UTPC = nullptr;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
GS = World->GetGameState<AUTGameState>();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UTPC || !GS)
|
||||||
|
{
|
||||||
|
RootJson->SetStringField("State", "MainMenu");
|
||||||
|
FJsonSerializer::Serialize(RootJson, Writer);
|
||||||
|
WritePipe(Buffer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update environment data
|
||||||
|
if (GS->GetGameModeClass())
|
||||||
|
{
|
||||||
|
EnvironmentJson->SetStringField("GameMode", GS->GetGameModeClass()->GetName());
|
||||||
|
}
|
||||||
|
EnvironmentJson->SetBoolField("MatchStarted", GS->HasMatchStarted());
|
||||||
|
EnvironmentJson->SetNumberField("GoalScore", GS->GoalScore);
|
||||||
|
// Insert GameState JsonReport
|
||||||
|
GS->MakeJsonReport(EnvironmentJson);
|
||||||
|
// The JsonReport may contain all players, which is a bit too much
|
||||||
|
if (EnvironmentJson->HasField("Players"))
|
||||||
|
{
|
||||||
|
EnvironmentJson->RemoveField("Players");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update player data
|
||||||
|
// If character not found player must be spectating(?)
|
||||||
|
if (!UTPC->GetUTCharacter())
|
||||||
|
{
|
||||||
|
RootJson->SetStringField("State", "Spectating");
|
||||||
|
}
|
||||||
|
// If dead, don't try reading HP/Armor
|
||||||
|
else if (UTPC->GetUTCharacter()->IsDead())
|
||||||
|
{
|
||||||
|
RootJson->SetStringField("State", "Dead");
|
||||||
|
PlayerJson->SetNumberField("Health", 0);
|
||||||
|
PlayerJson->SetNumberField("Armor", 0);
|
||||||
|
}
|
||||||
|
// Player is found and alive
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Update HP and armor
|
||||||
|
RootJson->SetStringField("State", "Alive");
|
||||||
|
PlayerJson->SetNumberField("Health", UTPC->GetUTCharacter()->Health);
|
||||||
|
PlayerJson->SetNumberField("Armor", UTPC->GetUTCharacter()->ArmorAmount);
|
||||||
|
|
||||||
|
// Update player powerups data
|
||||||
|
TSharedRef<FJsonObject> InventoryJson(new FJsonObject());
|
||||||
|
PlayerJson->SetObjectField("Inventory", InventoryJson);
|
||||||
|
InventoryJson->SetBoolField("HasJumpBoots", false);
|
||||||
|
InventoryJson->SetBoolField("HasInvisibility", false);
|
||||||
|
InventoryJson->SetBoolField("HasBerserk", false);
|
||||||
|
InventoryJson->SetBoolField("HasUDamage", false);
|
||||||
|
InventoryJson->SetBoolField("HasThighPads", false);
|
||||||
|
InventoryJson->SetBoolField("HasShieldBelt", false);
|
||||||
|
InventoryJson->SetBoolField("HasChestArmor", false);
|
||||||
|
InventoryJson->SetBoolField("HasHelmet", false);
|
||||||
|
|
||||||
|
for (TInventoryIterator<> It(UTPC->GetUTCharacter()); It; ++It)
|
||||||
|
{
|
||||||
|
AUTInventory* InventoryItem = (*It);
|
||||||
|
// Using Contains here because pickups might have slighty different names in different contexts
|
||||||
|
if (InventoryItem->GetClass()->GetName().Contains("Armor_ThighPads"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasThighPads", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("Armor_ShieldBelt"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasShieldBelt", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("Armor_Chest"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasChestArmor", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("Armor_Helmet"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasHelmet", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("JumpBoots"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasJumpBoots", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("Invis"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasInvisibility", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("Berserk"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasBerserk", true);
|
||||||
|
}
|
||||||
|
else if (InventoryItem->GetClass()->GetName().Contains("UDamage"))
|
||||||
|
{
|
||||||
|
InventoryJson->SetBoolField("HasUDamage", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update player weapon data
|
||||||
|
TSharedRef<FJsonObject> WeaponJson(new FJsonObject());
|
||||||
|
PlayerJson->SetObjectField("Weapon", WeaponJson);
|
||||||
|
if (UTPC->GetUTCharacter()->GetWeapon())
|
||||||
|
{
|
||||||
|
WeaponJson->SetStringField("Name", UTPC->GetUTCharacter()->GetWeapon()->GetClass()->GetName());
|
||||||
|
WeaponJson->SetNumberField("Ammo", UTPC->GetUTCharacter()->GetWeapon()->Ammo);
|
||||||
|
WeaponJson->SetNumberField("MaxAmmo", UTPC->GetUTCharacter()->GetWeapon()->MaxAmmo);
|
||||||
|
WeaponJson->SetBoolField("IsFiring", UTPC->GetUTCharacter()->GetWeapon()->IsFiring());
|
||||||
|
WeaponJson->SetNumberField("FireMode", UTPC->GetUTCharacter()->GetWeapon()->GetCurrentFireMode());
|
||||||
|
WeaponJson->SetNumberField("ZoomState", UTPC->GetUTCharacter()->GetWeapon()->ZoomState);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
WeaponJson->SetStringField("Name", "None");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Insert PlayerState JsonReport
|
||||||
|
TSharedRef<FJsonObject> PlayerStateJson(new FJsonObject());
|
||||||
|
PlayerJson->SetObjectField("State", PlayerStateJson);
|
||||||
|
if (UTPC->UTPlayerState)
|
||||||
|
{
|
||||||
|
UTPC->UTPlayerState->MakeJsonReport(PlayerStateJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
FJsonSerializer::Serialize(RootJson, Writer);
|
||||||
|
WritePipe(Buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FArtemis::WritePipe(FString msg)
|
||||||
|
{
|
||||||
|
pipe = CreateFile(TEXT("\\\\.\\pipe\\artemis"), GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, nullptr);
|
||||||
|
if (pipe == nullptr || pipe == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 BytesWritten = 0;
|
||||||
|
WriteFile(pipe, TCHAR_TO_ANSI(*msg), msg.Len(), (::DWORD*)&BytesWritten, nullptr);
|
||||||
|
}
|
||||||
41
Artemis/UnrealTournament2Artemis/Source/Private/Artemis.h
Normal file
41
Artemis/UnrealTournament2Artemis/Source/Private/Artemis.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Core.h"
|
||||||
|
#include "UnrealTournament.h"
|
||||||
|
#include "JsonSerializer.h"
|
||||||
|
#include "JsonObject.h"
|
||||||
|
#include "JsonReader.h"
|
||||||
|
|
||||||
|
#include "Artemis.generated.h"
|
||||||
|
|
||||||
|
UCLASS(Blueprintable, Meta = (ChildCanTick))
|
||||||
|
class AArtemis : public AActor
|
||||||
|
{
|
||||||
|
GENERATED_UCLASS_BODY()
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FArtemis : FTickableGameObject, IModuleInterface
|
||||||
|
{
|
||||||
|
FArtemis();
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
virtual bool IsTickable() const override { return true; }
|
||||||
|
virtual bool IsTickableInEditor() const override { return true; }
|
||||||
|
virtual bool IsTickableWhenPaused() const override { return true; }
|
||||||
|
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
|
|
||||||
|
// Put a real stat id here
|
||||||
|
virtual TStatId GetStatId() const
|
||||||
|
{
|
||||||
|
return TStatId();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WritePipe(FString msg);
|
||||||
|
HANDLE pipe;
|
||||||
|
float DeltaTimeAccumulator;
|
||||||
|
float FrameTimeMinimum;
|
||||||
|
uint64 LastFrameCounter;
|
||||||
|
};
|
||||||
@ -0,0 +1,165 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{3541864F-1662-4BD6-8328-2C87AE61D152}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>UnrealTournament2Artemis</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UNREALTOURNAMENT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;UNREALTOURNAMENT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNREALTOURNAMENT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;UNREALTOURNAMENT2ARTEMIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.cpp" />
|
||||||
|
<ClCompile Include="Intermediate\Build\Win64\UE4\Shipping\Artemis\Module.Artemis.cpp" />
|
||||||
|
<ClCompile Include="Source\Private\Artemis.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.dep.h" />
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.h" />
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\ArtemisClasses.h" />
|
||||||
|
<ClInclude Include="Source\Private\Artemis.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Artemis.uplugin" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Source\Private\Artemis.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Intermediate\Build\Win64\UE4\Shipping\Artemis\Module.Artemis.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Source\Private\Artemis.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.dep.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\Artemis.generated.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Intermediate\Build\Win64\UE4\Inc\Artemis\ArtemisClasses.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Artemis.uplugin" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
BIN
Artemis/UnrealTournament2Artemis/ut-plugin.zip
Normal file
BIN
Artemis/UnrealTournament2Artemis/ut-plugin.zip
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user