1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00
This commit is contained in:
Logan Saso 2016-02-20 02:48:43 -08:00
commit c1c6c2420e
76 changed files with 7151 additions and 474 deletions

View File

@ -1,20 +1,91 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis", "Artemis\Artemis.csproj", "{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}"
EndProject
Project("{6141683F-8A12-4E36-9623-2EB02B2C2303}") = "ArtemisSetup", "ArtemisSetup\ArtemisSetup.isproj", "{9E76B2E0-12AE-431D-8FA5-2233D6853F29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CD_ROM|Any CPU = CD_ROM|Any CPU
CD_ROM|x64 = CD_ROM|x64
CD_ROM|x86 = CD_ROM|x86
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
DVD-5|Any CPU = DVD-5|Any CPU
DVD-5|x64 = DVD-5|x64
DVD-5|x86 = DVD-5|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
SingleImage|Any CPU = SingleImage|Any CPU
SingleImage|x64 = SingleImage|x64
SingleImage|x86 = SingleImage|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|x64.ActiveCfg = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|x64.Build.0 = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|x86.ActiveCfg = Release|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.CD_ROM|x86.Build.0 = Release|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|x64.ActiveCfg = Debug|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|x64.Build.0 = Debug|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|x86.ActiveCfg = Debug|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Debug|x86.Build.0 = Debug|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|x64.ActiveCfg = Debug|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|x64.Build.0 = Debug|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|x86.ActiveCfg = Debug|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.DVD-5|x86.Build.0 = Debug|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|Any CPU.Build.0 = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|x64.ActiveCfg = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|x64.Build.0 = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|x86.ActiveCfg = Release|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.Release|x86.Build.0 = Release|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|Any CPU.Build.0 = Release|Any CPU
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|x64.ActiveCfg = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|x64.Build.0 = Release|x64
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|x86.ActiveCfg = Release|x86
{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}.SingleImage|x86.Build.0 = Release|x86
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|Any CPU.ActiveCfg = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|Any CPU.Build.0 = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|x64.ActiveCfg = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|x64.Build.0 = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|x86.ActiveCfg = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.CD_ROM|x86.Build.0 = CD_ROM
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|Any CPU.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|Any CPU.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|x64.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|x64.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|x86.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Debug|x86.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|Any CPU.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|Any CPU.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|x64.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|x64.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|x86.ActiveCfg = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.DVD-5|x86.Build.0 = DVD-5
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|Any CPU.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|Any CPU.Build.0 = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|x64.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|x64.Build.0 = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|x86.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.Release|x86.Build.0 = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|Any CPU.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|Any CPU.Build.0 = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|x64.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|x64.Build.0 = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|x86.ActiveCfg = SingleImage
{9E76B2E0-12AE-431D-8FA5-2233D6853F29}.SingleImage|x86.Build.0 = SingleImage
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -2,19 +2,44 @@
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Artemis.Modules.Games.RocketLeague.RocketLeague" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.Offsets" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.Witcher3.Witcher3" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.CounterStrike.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.VolumeDisplay" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.RocketLeague" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.TypeWave" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.General" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Artemis.Modules.Games.RocketLeague.RocketLeague"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.Offsets"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.Witcher3.Witcher3"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.CounterStrike.CounterStrike"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.CounterStrike"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.VolumeDisplay"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.AudioVisualization"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.RocketLeague"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.TypeWave"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.General"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings />
@ -210,12 +235,20 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.15.0" newVersion="1.2.15.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Caliburn.Micro" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Caliburn.Micro.Platform" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@ -3,12 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Artemis"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
Startup="Application_Startup">
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<local:ArtemisBootstrapper x:Key="bootstrapper" />
<local:ArtemisBootstrapper x:Key="ArtemisBootstrapper" />
</ResourceDictionary>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />

View File

@ -23,6 +23,8 @@
<SccProvider>
</SccProvider>
<IsWebBootstrapper>false</IsWebBootstrapper>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>C:\Users\spoin\Desktop\Artemis builds\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -38,8 +40,6 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
@ -76,11 +76,57 @@
<PropertyGroup>
<ApplicationIcon>logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Caliburn.Micro, Version=2.0.2.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
<HintPath>..\packages\Caliburn.Micro.Core.2.0.2\lib\net45\Caliburn.Micro.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Caliburn.Micro.Autofac, Version=2.0.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Caliburn.Micro.AutofacBootstrap.2.0.8\lib\net40\Caliburn.Micro.Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Caliburn.Micro.Platform, Version=2.0.2.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
<HintPath>..\packages\Caliburn.Micro.2.0.2\lib\net45\Caliburn.Micro.Platform.dll</HintPath>
<Private>True</Private>
@ -93,6 +139,14 @@
<HintPath>..\packages\CUE.NET.1.0.0\lib\net45\CUE.NET.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Gma.System.MouseKeyHook, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MouseKeyHook.5.4.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.5\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
@ -101,14 +155,12 @@
<HintPath>..\packages\MahApps.Metro.1.3.0-ALPHA017\lib\net45\MahApps.Metro.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MemorySharp">
<HintPath>E:\Downloads\Chome Downloads\MemorySharp-master\MemorySharp-master\MemorySharp\bin\Release\MemorySharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="MyMemory-x64, Version=1.0.5741.3998, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\MyMemory-x64.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="NAudio, Version=1.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NAudio.1.7.3\lib\net35\NAudio.dll</HintPath>
<Private>True</Private>
@ -117,10 +169,6 @@
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Open.WinKeyboardHook, Version=1.0.10.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Open.WinKeyboardHook.1.0.10.0\lib\net45\Open.WinKeyboardHook.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
@ -222,6 +270,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Modules\Games\RocketLeague\RocketLeagueModel.cs" />
<Compile Include="Modules\Games\Witcher3\RocketLeagueSettings.cs" />
<Compile Include="Modules\Games\Witcher3\Witcher3.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
@ -244,6 +293,11 @@
<Compile Include="Modules\Games\RocketLeague\RocketLeagueSettings.cs" />
<Compile Include="Modules\Effects\TypeWave\TypeWaveSettings.cs" />
<Compile Include="Properties\Annotations.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Settings\General.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
@ -260,6 +314,7 @@
<Compile Include="Utilities\GameState\GameDataReceivedEventArgs.cs" />
<Compile Include="Utilities\GameState\GameStateWebServer.cs" />
<Compile Include="Utilities\ImageUtilities.cs" />
<Compile Include="Utilities\Keyboard\KeyboardHook.cs" />
<Compile Include="Utilities\Memory\Memory.cs" />
<Compile Include="Utilities\Memory\MemoryHelpers.cs" />
<Compile Include="Utilities\Memory\Win32.cs" />
@ -280,6 +335,7 @@
<Compile Include="ViewModels\OverlaysViewModel.cs" />
<Compile Include="Modules\Overlays\VolumeDisplay\VolumeDisplayViewModel.cs" />
<Compile Include="ViewModels\ShellViewModel.cs" />
<Compile Include="ViewModels\SystemTrayViewModel.cs" />
<Compile Include="Views\EffectsView.xaml.cs">
<DependentUpon>EffectsView.xaml</DependentUpon>
</Compile>
@ -322,16 +378,14 @@
<Compile Include="Views\ShellView.xaml.cs">
<DependentUpon>ShellView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\SystemTrayView.xaml.cs">
<DependentUpon>SystemTrayView.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -360,9 +414,12 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VolumeDisplay.Designer.cs</LastGenOutput>
</None>
<None Include="MyMemory-x64.dll" />
<None Include="packages.config" />
<AppDesigner Include="Properties\" />
<Resource Include="Resources\bow.png" />
<Content Include="Resources\Witcher3\playerWitcher.txt" />
<Content Include="Resources\Witcher3\artemis.txt" />
<Resource Include="logo-disabled.ico" />
<None Include="Settings\Offsets.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Offsets.Designer.cs</LastGenOutput>
@ -437,6 +494,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\SystemTrayView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup />
<ItemGroup>
@ -446,8 +507,10 @@
<Content Include="RzChromaSDK64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Resource Include="logo.ico" />
<Content Include="Resources\gamestateConfigFileCsGo.txt" />
<Resource Include="logo.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Content Include="Resources\CounterStrike\gamestateConfiguration.txt" />
<Resource Include="Resources\Entypo-license.txt" />
<Resource Include="Resources\WindowsIcons-license.txt" />
</ItemGroup>

View File

@ -1,19 +1,31 @@
using System.Windows;
using Artemis.ViewModels;
using Autofac;
using Caliburn.Micro;
using Caliburn.Micro.Autofac;
namespace Artemis
{
public class ArtemisBootstrapper : BootstrapperBase
public class ArtemisBootstrapper : AutofacBootstrapper<SystemTrayViewModel>
{
public ArtemisBootstrapper()
{
Initialize();
}
protected override void ConfigureContainer(ContainerBuilder builder)
{
base.ConfigureContainer(builder);
// create a window manager instance to be used by everyone asking for one (including Caliburn.Micro)
builder.RegisterInstance<IWindowManager>(new WindowManager());
builder.RegisterType<SystemTrayViewModel>();
builder.RegisterType<ShellViewModel>();
}
protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRootViewFor<ShellViewModel>();
DisplayRootViewFor<SystemTrayViewModel>();
}
}
}

View File

@ -1,9 +1,11 @@
using System.Drawing;
using System;
using System.Drawing;
using System.Windows.Forms;
using Artemis.Utilities;
using CUE.NET;
using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Devices.Keyboard;
using CUE.NET.Brushes;
using CUE.NET.Devices.Keyboard.Keys;
using CUE.NET.Exceptions;
namespace Artemis.KeyboardProviders.Corsair
{
@ -15,8 +17,26 @@ namespace Artemis.KeyboardProviders.Corsair
{
Name = "Corsair Gaming K70 RGB";
}
public override bool CanEnable()
{
try
{
CueSDK.Initialize();
}
catch (CUEException e)
{
if (e.Error == CorsairError.ServerNotFound)
return false;
throw;
}
return true;
}
/// <summary>
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
/// </summary>
public override void Enable()
{
@ -24,13 +44,15 @@ namespace Artemis.KeyboardProviders.Corsair
{
CueSDK.Initialize();
}
catch (CUE.NET.Exceptions.WrapperException) {/*CUE is already initialized*/}
catch (WrapperException)
{
/*CUE is already initialized*/
}
_keyboard = CueSDK.KeyboardSDK;
Height = (int)_keyboard.KeyboardRectangle.Height;
Width = (int)_keyboard.KeyboardRectangle.Width;
_keyboard.UpdateMode = UpdateMode.Manual;
_keyboard.Brush = new SolidColorBrush(Color.Black);
// _keyboard.UpdateMode = UpdateMode.Manual;
_keyboard.Update(true);
}
@ -39,31 +61,28 @@ namespace Artemis.KeyboardProviders.Corsair
}
/// <summary>
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap size.
/// Does not reset the color each time. Uncomment line 48 for collor reset.
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap
/// size.
/// Does not reset the color each time. Uncomment line 48 for collor reset.
/// </summary>
/// <param name="bitmap"></param>
/// <param name="bitmap//"></param>
public override void DrawBitmap(Bitmap bitmap)
{
RectangleF[,] ledRectangles = new RectangleF[bitmap.Width, bitmap.Height];
RectangleKeyGroup[,] ledGroups = new RectangleKeyGroup[bitmap.Width, bitmap.Height];
//_keyboard.Brush = new SolidColorBrush(Color.Black);
for (var x = 0; x < bitmap.Width; x++)
using (
var resized = ImageUtilities.ResizeImage(bitmap,
(int)_keyboard.KeyboardRectangle.Width,
(int)_keyboard.KeyboardRectangle.Height)
)
{
for (var y = 0; y < bitmap.Height; y++)
foreach (var item in _keyboard.Keys)
{
ledRectangles[x, y] = new RectangleF(_keyboard.KeyboardRectangle.X * (x * (_keyboard.KeyboardRectangle.Width / bitmap.Width / _keyboard.KeyboardRectangle.X)), _keyboard.KeyboardRectangle.Y * (y * (_keyboard.KeyboardRectangle.Height / bitmap.Height / _keyboard.KeyboardRectangle.Y)), _keyboard.KeyboardRectangle.Width / bitmap.Width, _keyboard.KeyboardRectangle.Height / bitmap.Height);
ledGroups[x, y] = new RectangleKeyGroup(_keyboard, ledRectangles[x, y], 0.01f) { Brush = new SolidColorBrush(bitmap.GetPixel(x, y)) };
}
}
_keyboard.Update();
for (var x = 0; x < bitmap.Width; x++)
{
for (var y = 0; y < bitmap.Height; y++)
{
_keyboard.DetachKeyGroup(ledGroups[x, y]);
var ledColor = resized.GetPixel((int)item.KeyRectangle.X, (int)item.KeyRectangle.Y);
if (ledColor == Color.FromArgb(0, 0, 0, 0))
ledColor = Color.Black;
item.Led.Color = ledColor;
}
}
_keyboard.Update(true);
}
}
}

View File

@ -1,9 +1,11 @@
using System;
using System.Drawing;
using CUE.NET;
using CUE.NET.Devices.Keyboard;
using System.Windows.Forms;
using Artemis.Utilities;
using CUE.NET.Brushes;
using CUE.NET;
using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Devices.Keyboard;
using CUE.NET.Exceptions;
namespace Artemis.KeyboardProviders.Corsair
{
@ -16,8 +18,25 @@ namespace Artemis.KeyboardProviders.Corsair
Name = "Corsair Gaming K95 RGB";
}
public override bool CanEnable()
{
try
{
CueSDK.Initialize();
}
catch (CUEException e)
{
if (e.Error == CorsairError.ServerNotFound)
return false;
throw;
}
return true;
}
/// <summary>
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
/// </summary>
public override void Enable()
{
@ -25,12 +44,15 @@ namespace Artemis.KeyboardProviders.Corsair
{
CueSDK.Initialize();
}
catch (CUE.NET.Exceptions.WrapperException){/*CUE is already initialized*/}
catch (WrapperException)
{
/*CUE is already initialized*/
}
_keyboard = CueSDK.KeyboardSDK;
Height = (int)_keyboard.KeyboardRectangle.Height;
Width = (int)_keyboard.KeyboardRectangle.Width;
Height = (int) _keyboard.KeyboardRectangle.Height;
Width = (int) _keyboard.KeyboardRectangle.Width;
// _keyboard.UpdateMode = UpdateMode.Manual;
// _keyboard.UpdateMode = UpdateMode.Manual;
_keyboard.Update(true);
}
@ -39,50 +61,28 @@ namespace Artemis.KeyboardProviders.Corsair
}
/// <summary>
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap size.
/// Does not reset the color each time. Uncomment line 48 for collor reset.
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap
/// size.
/// Does not reset the color each time. Uncomment line 48 for collor reset.
/// </summary>
/// <param name="bitmap"></param>
public override void DrawBitmap(Bitmap bitmap)
{
using (
var resized = ImageUtilities.ResizeImage(bitmap,
(int)_keyboard.KeyboardRectangle.Width,
(int)_keyboard.KeyboardRectangle.Height)
)
(int) _keyboard.KeyboardRectangle.Width,
(int) _keyboard.KeyboardRectangle.Height)
)
{
foreach (var item in _keyboard.Keys)
{
Color ledColor = resized.GetPixel((int)item.KeyRectangle.X, (int)item.KeyRectangle.Y);
var ledColor = resized.GetPixel((int) item.KeyRectangle.X, (int) item.KeyRectangle.Y);
if (ledColor == Color.FromArgb(0, 0, 0, 0))
ledColor = Color.Black;
item.Led.Color = ledColor;
}
}
_keyboard.Update(true);
}
/*
RectangleF[,] ledRectangles = new RectangleF[bitmap.Width, bitmap.Height];
RectangleKeyGroup[,] ledGroups = new RectangleKeyGroup[bitmap.Width, bitmap.Height];
//_keyboard.Brush = new SolidColorBrush(Color.Black);
for (var x = 0 ; x < bitmap.Width; x++)
{
for (var y = 0; y < bitmap.Height; y++)
{
ledRectangles[x, y] = new RectangleF(_keyboard.KeyboardRectangle.X * (x*(_keyboard.KeyboardRectangle.Width / bitmap.Width / _keyboard.KeyboardRectangle.X)), _keyboard.KeyboardRectangle.Y*(y*(_keyboard.KeyboardRectangle.Height / bitmap.Height / _keyboard.KeyboardRectangle.Y)), _keyboard.KeyboardRectangle.Width / bitmap.Width, _keyboard.KeyboardRectangle.Height / bitmap.Height);
ledGroups[x, y] = new RectangleKeyGroup(_keyboard, ledRectangles[x, y], 0.01f) { Brush = new SolidColorBrush(bitmap.GetPixel(x, y)) };
}
}
_keyboard.Update();
for (var x = 0; x < bitmap.Width; x++)
{
for (var y = 0; y < bitmap.Height; y++)
{
_keyboard.DetachKeyGroup(ledGroups[x, y]);
}
}
*/
}
}

View File

@ -8,18 +8,19 @@ namespace Artemis.KeyboardProviders
public int Height { get; set; }
public int Width { get; set; }
public abstract bool CanEnable();
public abstract void Enable();
public abstract void Disable();
public abstract void DrawBitmap(Bitmap bitmap);
/// <summary>
/// Returns a bitmap matching the keyboard's dimensions
/// Returns a bitmap matching the keyboard's dimensions
/// </summary>
/// <returns></returns>
public Bitmap KeyboardBitmap() => new Bitmap(Width, Height);
/// <summary>
/// Returns a bitmap matching the keyboard's dimensions using the provided scale
/// Returns a bitmap matching the keyboard's dimensions using the provided scale
/// </summary>
/// <returns></returns>
public Bitmap KeyboardBitmap(int scale) => new Bitmap(Width*scale, Height*scale);

View File

@ -13,6 +13,12 @@ namespace Artemis.KeyboardProviders.Logitech
Width = 21;
}
public override bool CanEnable()
{
// TODO
return true;
}
public override void Enable()
{
// Initialize the SDK

View File

@ -107,5 +107,5 @@ namespace Artemis.KeyboardProviders.Logitech.Utilities
NUM_ZERO = 0x52,
NUM_PERIOD = 0x53,
TEST = 0x1
};
}
}

View File

@ -11,9 +11,9 @@ namespace Artemis.KeyboardProviders.Logitech.Utilities
private const int LOGI_DEVICETYPE_RGB_ORD = 1;
private const int LOGI_DEVICETYPE_PERKEY_RGB_ORD = 2;
public const int LOGI_DEVICETYPE_MONOCHROME = (1 << LOGI_DEVICETYPE_MONOCHROME_ORD);
public const int LOGI_DEVICETYPE_RGB = (1 << LOGI_DEVICETYPE_RGB_ORD);
public const int LOGI_DEVICETYPE_PERKEY_RGB = (1 << LOGI_DEVICETYPE_PERKEY_RGB_ORD);
public const int LOGI_DEVICETYPE_MONOCHROME = 1 << LOGI_DEVICETYPE_MONOCHROME_ORD;
public const int LOGI_DEVICETYPE_RGB = 1 << LOGI_DEVICETYPE_RGB_ORD;
public const int LOGI_DEVICETYPE_PERKEY_RGB = 1 << LOGI_DEVICETYPE_PERKEY_RGB_ORD;
public const int LOGI_LED_BITMAP_WIDTH = 21;
public const int LOGI_LED_BITMAP_HEIGHT = 6;
public const int LOGI_LED_BITMAP_BYTES_PER_KEY = 4;

View File

@ -17,7 +17,7 @@ namespace Artemis.KeyboardProviders.Logitech.Utilities
var depth = Image.GetPixelFormatSize(b.PixelFormat);
var step = depth/8;
var pixels = new byte[(21*6)*step];
var pixels = new byte[21*6*step];
var iptr = bitmapData.Scan0;
// Copy data from pointer to array

View File

@ -1,7 +1,9 @@
using System.Drawing;
using System;
using System.Drawing;
using Artemis.KeyboardProviders.Razer.Utilities;
using Corale.Colore.Core;
using Corale.Colore.Razer.Keyboard;
using Color = Corale.Colore.Core.Color;
namespace Artemis.KeyboardProviders.Razer
{
@ -12,11 +14,32 @@ namespace Artemis.KeyboardProviders.Razer
Name = "Razer BlackWidow Chroma";
}
public override bool CanEnable()
{
if (!Chroma.IsSdkAvailable())
return false;
// Some people have Synapse installed, but not a Chroma keyboard, deal with this
try
{
// Create a bitmap to send as a test
var b = new Bitmap(22, 6);
var razerArray = RazerUtilities.BitmapColorArray(b, 6, 22);
Chroma.Instance.Keyboard.SetGrid(razerArray);
Chroma.Instance.Keyboard.Clear();
}
catch (NullReferenceException)
{
return false;
}
return true;
}
public override void Enable()
{
Chroma.Instance.Initialize();
Height = (int)Constants.MaxRows;
Width = (int)Constants.MaxColumns;
Height = (int) Constants.MaxRows;
Width = (int) Constants.MaxColumns;
}
public override void Disable()

View File

@ -5,6 +5,8 @@ namespace Artemis.Models
{
public abstract class EffectModel : IDisposable
{
public delegate void SettingsUpdateHandler(EffectSettings settings);
public MainModel MainModel;
public string Name;
@ -15,6 +17,8 @@ namespace Artemis.Models
public abstract void Dispose();
public event SettingsUpdateHandler SettingsUpdateEvent;
// Called on creation
public abstract void Enable();

View File

@ -2,7 +2,7 @@
{
public abstract class GameModel : EffectModel
{
public abstract bool Enabled();
public bool Enabled;
public string ProcessName;
protected GameModel(MainModel mainModel) : base(mainModel)

View File

@ -4,10 +4,12 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Artemis.Events;
using Artemis.KeyboardProviders;
using Artemis.Settings;
using Artemis.Utilities.GameState;
using Artemis.Utilities.Keyboard;
using Artemis.Utilities.Memory;
using Caliburn.Micro;
@ -23,6 +25,7 @@ namespace Artemis.Models
EffectModels = new List<EffectModel>();
KeyboardProviders = ProviderHelper.GetKeyboardProviders();
GameStateWebServer = new GameStateWebServer();
KeyboardHook = new KeyboardHook();
Events = events;
Fps = 25;
@ -33,6 +36,8 @@ namespace Artemis.Models
_processWorker.DoWork += ProcessWorker_DoWork;
}
public KeyboardHook KeyboardHook { get; set; }
public EffectModel ActiveEffect { get; set; }
public KeyboardProvider ActiveKeyboard { get; set; }
public List<EffectModel> EffectModels { get; set; }
@ -48,6 +53,9 @@ namespace Artemis.Models
public void StartEffects()
{
LoadLastKeyboard();
// If no keyboard was loaded, don't enable effects.
if (ActiveKeyboard == null)
return;
// Start the webserver
GameStateWebServer.Start();
@ -80,12 +88,28 @@ namespace Artemis.Models
ChangeKeyboard(keyboard ?? KeyboardProviders.First(k => k.Name == "Logitech G910 Orion Spark RGB"));
}
private void ChangeKeyboard(KeyboardProvider keyboardProvider)
public void ChangeKeyboard(KeyboardProvider keyboardProvider)
{
if (ActiveKeyboard != null && keyboardProvider.Name == ActiveKeyboard.Name)
return;
ActiveKeyboard?.Disable();
// Disable everything if there's no active keyboard found
if (!keyboardProvider.CanEnable())
{
ActiveKeyboard = null;
MessageBox.Show(
"Couldn't connect to the " + keyboardProvider.Name + ".\n " +
"Please check your cables and/or drivers (could be outdated).\n\n " +
"If needed, you can select a different keyboard in Artemis under settings",
"Artemis (╯°□°)╯︵ ┻━┻",
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
ShutdownEffects();
return;
}
ActiveKeyboard = keyboardProvider;
ActiveKeyboard.Enable();
@ -107,7 +131,7 @@ namespace Artemis.Models
// Game models are only used if they are enabled
var gameModel = effectModel as GameModel;
if (gameModel != null)
if (!gameModel.Enabled())
if (!gameModel.Enabled)
return;
if (ActiveEffect != null && effectModel.Name == ActiveEffect.Name)
@ -178,7 +202,7 @@ namespace Artemis.Models
}
// Sleep according to time left this frame
var sleep = (int) ((1000/Fps) - sw.ElapsedMilliseconds);
var sleep = (int) (1000/Fps - sw.ElapsedMilliseconds);
if (sleep > 0)
Thread.Sleep(sleep);
sw.Reset();
@ -197,9 +221,18 @@ namespace Artemis.Models
var process = MemoryHelpers.GetProcessIfRunning(effectModel.ProcessName);
if (process == null)
continue;
if (process.HasExited)
continue;
ChangeEffect(effectModel);
foundProcess = true;
// If the active effect is a disabled game model, disable it
var model = ActiveEffect as GameModel;
if (model != null && !model.Enabled)
LoadLastEffect();
else
{
ChangeEffect(effectModel);
foundProcess = true;
}
}
// If no game process is found, but the active effect still belongs to a game,

View File

@ -11,6 +11,7 @@ namespace Artemis.Models
{
}
// Overlay Enabled() and Dispose() is called when changing the Enabled value
public bool Enabled
{
get { return _enabled; }

View File

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Effects.AudioVisualizer" GeneratedClassName="AudioVisualization">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
GeneratedClassNamespace="Artemis.Modules.Effects.AudioVisualizer" GeneratedClassName="AudioVisualization">
<Profiles />
<Settings>
<Setting Name="Sensitivity" Type="System.Int32" Scope="User">

View File

@ -70,7 +70,6 @@ namespace Artemis.Modules.Effects.AudioVisualizer
ColorHelpers.ToDrawingColor(Settings.BottomColor)
},
LinearGradientMode.Vertical) {ContainedBrush = false});
}
_sampleAggregator.FftCalculated += FftCalculated;
@ -83,6 +82,9 @@ namespace Artemis.Modules.Effects.AudioVisualizer
public override void Update()
{
// Start filling the model
_generating = true;
if (SelectedDeviceId == null)
return;
@ -92,9 +94,8 @@ namespace Artemis.Modules.Effects.AudioVisualizer
if (device == null || SpectrumData == null)
return;
// Start filling the model
_generating = true;
if (!SpectrumData.Any())
return;
// Parse spectrum data
for (var i = 0; i < Lines; i++)
@ -107,7 +108,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
// Apply Sensitivity setting
height = height*Settings.Sensitivity;
var keyboardHeight = (int) Math.Round(((MainModel.ActiveKeyboard.Height/100.00)*height)*Scale);
var keyboardHeight = (int) Math.Round(MainModel.ActiveKeyboard.Height/100.00*height*Scale);
if (keyboardHeight > SoundRectangles[i].Height)
SoundRectangles[i].Height = keyboardHeight;
else
@ -117,14 +118,14 @@ namespace Artemis.Modules.Effects.AudioVisualizer
SoundRectangles[i].Width = Scale;
if (Settings.FromBottom)
SoundRectangles[i].Y = (MainModel.ActiveKeyboard.Height*Scale) - SoundRectangles[i].Height;
SoundRectangles[i].Y = MainModel.ActiveKeyboard.Height*Scale - SoundRectangles[i].Height;
}
_generating = false;
}
public override Bitmap GenerateBitmap()
{
if (SpectrumData == null)
if (SpectrumData == null || SoundRectangles == null)
return null;
// Lock the _spectrumData array while busy with it

View File

@ -18,7 +18,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
public Color MiddleColor { get; set; }
public Color BottomColor { get; set; }
public override sealed void Load()
public sealed override void Load()
{
Sensitivity = AudioVisualization.Default.Sensitivity;
Bars = AudioVisualization.Default.Bars;
@ -29,7 +29,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
BottomColor = AudioVisualization.Default.BottomColor;
}
public override sealed void Save()
public sealed override void Save()
{
AudioVisualization.Default.Sensitivity = Sensitivity;
AudioVisualization.Default.Bars = Bars;
@ -42,7 +42,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
AudioVisualization.Default.Save();
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
Sensitivity = 4;
Bars = 21;

View File

@ -90,7 +90,7 @@
HorizontalAlignment="Right" Width="110" TickPlacement="BottomRight" TickFrequency="1"
Value="{Binding Path=AudioVisualizerSettings.Bars, Mode=TwoWay}" Minimum="2" Maximum="21"
SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Sensitivity -->
<TextBlock Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,8">

View File

@ -28,15 +28,15 @@ namespace Artemis.Modules.Effects.Debug
public override void Enable()
{
KeyboardRectangle = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
{
Color.Red,
Color.OrangeRed,
Color.Yellow,
Color.Green,
Color.Blue,
Color.Purple,
Color.DeepPink
}, LinearGradientMode.Horizontal);
{
Color.Red,
Color.OrangeRed,
Color.Yellow,
Color.Green,
Color.Blue,
Color.Purple,
Color.DeepPink
}, LinearGradientMode.Horizontal);
}
public override void Update()

View File

@ -16,16 +16,16 @@ namespace Artemis.Modules.Effects.Debug
public int Scale { get; set; }
public LinearGradientMode Type { get; set; }
public override sealed void Load()
public sealed override void Load()
{
ToDefault();
}
public override sealed void Save()
public sealed override void Save()
{
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
Width = 84;
Height = 24;

View File

@ -76,7 +76,7 @@
HorizontalAlignment="Right" Width="110" TickPlacement="BottomRight" TickFrequency="1"
Value="{Binding Path=DebugEffectSettings.Scale, Mode=TwoWay}" Minimum="1" Maximum="4"
SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Color rotation -->
<TextBlock Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,9,0,10">
@ -100,7 +100,7 @@
</InlineUIContainer>
</TextBlock>
</StackPanel>
<!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="8" Orientation="Horizontal" VerticalAlignment="Bottom">
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"

View File

@ -2,8 +2,6 @@
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Artemis.Events;

View File

@ -7,65 +7,66 @@ using System.Windows.Forms;
using Artemis.KeyboardProviders.Logitech.Utilities;
using Artemis.Models;
using Artemis.Utilities;
using Open.WinKeyboardHook;
namespace Artemis.Modules.Effects.TypeWave
{
public class TypeWaveModel : EffectModel
{
private readonly List<Wave> _waves;
private Color _randomColor;
public TypeWaveModel(MainModel mainModel, TypeWaveSettings settings) : base(mainModel)
{
Name = "TypeWave";
Waves = new List<Wave>();
_waves = new List<Wave>();
_randomColor = Color.Red;
Settings = settings;
// KeyboardIntercepter won't start untill the effect is active
KeyboardInterceptor = new KeyboardInterceptor();
}
public TypeWaveSettings Settings { get; set; }
public List<Wave> Waves { get; set; }
public KeyboardInterceptor KeyboardInterceptor { get; set; }
public override void Dispose()
{
KeyboardInterceptor.KeyUp -= HandleKeypress;
KeyboardInterceptor.StopCapturing();
MainModel.KeyboardHook.Unsubscribe(HandleKeypress);
}
public override void Enable()
{
KeyboardInterceptor.StartCapturing();
KeyboardInterceptor.KeyUp += HandleKeypress;
// Listener won't start unless the effect is active
MainModel.KeyboardHook.Subscribe(HandleKeypress);
}
public override void Update()
{
for (var i = 0; i < Waves.Count; i++)
if (Settings.IsRandomColors)
_randomColor = ColorHelpers.ShiftColor(_randomColor, 25);
for (var i = 0; i < _waves.Count; i++)
{
// TODO: Get from settings
var fps = 25;
Waves[i].Size += Settings.SpreadSpeed;
_waves[i].Size += Settings.SpreadSpeed;
if (Settings.IsShiftColors)
Waves[i].Color = ColorHelpers.ShiftColor(Waves[i].Color, Settings.ShiftColorSpeed);
_waves[i].Color = ColorHelpers.ShiftColor(_waves[i].Color, Settings.ShiftColorSpeed);
var decreaseAmount = 255/(Settings.TimeToLive/fps);
Waves[i].Color = Color.FromArgb(Waves[i].Color.A - decreaseAmount, Waves[i].Color.R, Waves[i].Color.G,
Waves[i].Color.B);
_waves[i].Color = Color.FromArgb(_waves[i].Color.A - decreaseAmount, _waves[i].Color.R,
_waves[i].Color.G,
_waves[i].Color.B);
if (Waves[i].Color.A >= decreaseAmount)
if (_waves[i].Color.A >= decreaseAmount)
continue;
Waves.RemoveAt(i);
_waves.RemoveAt(i);
i--;
}
}
public override Bitmap GenerateBitmap()
{
if (Waves.Count == 0)
if (_waves.Count == 0)
return null;
var bitmap = new Bitmap(21, 6);
@ -78,17 +79,17 @@ namespace Artemis.Modules.Effects.TypeWave
// Don't want a foreach, collection is changed in different thread
// ReSharper disable once ForCanBeConvertedToForeach
for (var i = 0; i < Waves.Count; i++)
for (var i = 0; i < _waves.Count; i++)
{
if (Waves[i].Size == 0)
if (_waves[i].Size == 0)
continue;
var path = new GraphicsPath();
path.AddEllipse(Waves[i].Point.X - Waves[i].Size/2, Waves[i].Point.Y - Waves[i].Size/2,
Waves[i].Size, Waves[i].Size);
path.AddEllipse(_waves[i].Point.X - _waves[i].Size/2, _waves[i].Point.Y - _waves[i].Size/2,
_waves[i].Size, _waves[i].Size);
var pthGrBrush = new PathGradientBrush(path)
{
SurroundColors = new[] {Waves[i].Color},
SurroundColors = new[] {_waves[i].Color},
CenterColor = Color.Transparent
};
@ -96,8 +97,8 @@ namespace Artemis.Modules.Effects.TypeWave
pthGrBrush.FocusScales = new PointF(0.3f, 0.8f);
g.FillPath(pthGrBrush, path);
g.DrawEllipse(new Pen(pthGrBrush, 1), Waves[i].Point.X - Waves[i].Size/2,
Waves[i].Point.Y - Waves[i].Size/2, Waves[i].Size, Waves[i].Size);
g.DrawEllipse(new Pen(pthGrBrush, 1), _waves[i].Point.X - _waves[i].Size/2,
_waves[i].Point.Y - _waves[i].Size/2, _waves[i].Size, _waves[i].Size);
}
}
return bitmap;
@ -110,12 +111,16 @@ namespace Artemis.Modules.Effects.TypeWave
private void KeyPressTask(KeyEventArgs e)
{
// More than 25 waves is pointless
if (_waves.Count >= 25)
return;
var keyMatch = KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == e.KeyCode);
if (keyMatch == null)
return;
Waves.Add(Settings.IsRandomColors
? new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0, ColorHelpers.GetRandomRainbowColor())
_waves.Add(Settings.IsRandomColors
? new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0, _randomColor)
: new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0,
ColorHelpers.ToDrawingColor(Settings.WaveColor)));
}

View File

@ -17,7 +17,7 @@ namespace Artemis.Modules.Effects.TypeWave
public int TimeToLive { get; set; }
public int SpreadSpeed { get; set; }
public override sealed void Load()
public sealed override void Load()
{
IsRandomColors = Settings.TypeWave.Default.IsRandomColors;
WaveColor = Settings.TypeWave.Default.WaveColor;
@ -27,7 +27,7 @@ namespace Artemis.Modules.Effects.TypeWave
SpreadSpeed = Settings.TypeWave.Default.SpreadSpeed;
}
public override sealed void Save()
public sealed override void Save()
{
Settings.TypeWave.Default.IsRandomColors = IsRandomColors;
Settings.TypeWave.Default.WaveColor = WaveColor;
@ -39,7 +39,7 @@ namespace Artemis.Modules.Effects.TypeWave
Settings.TypeWave.Default.Save();
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
IsRandomColors = true;
WaveColor = Color.FromArgb(255, 255, 0, 0);

View File

@ -23,7 +23,6 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
@ -36,7 +35,7 @@
<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"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
</StackPanel>
</StackPanel>
@ -101,28 +100,8 @@
Value="{Binding Path=TypeWaveSettings.SpreadSpeed, Mode=TwoWay}" Minimum="1" Maximum="6"
SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Sensitivity -->
<TextBlock Grid.Row="7" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,8">
Volume sensitivity multiplier
</TextBlock>
<Slider x:Name="Sensitivity" Grid.Row="7" Grid.Column="1" VerticalAlignment="Center"
HorizontalAlignment="Right" Width="110" TickPlacement="BottomRight" TickFrequency="1"
Value="{Binding Path=AudioVisualizerSettings.Sensitivity, Mode=TwoWay}" Minimum="1" Maximum="10"
SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Fade speed -->
<TextBlock Grid.Row="8" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,8">
Bar fade-out speed
</TextBlock>
<Slider x:Name="FadeSpeed" Grid.Row="8" Grid.Column="1" VerticalAlignment="Center"
HorizontalAlignment="Right" Width="110" TickPlacement="BottomRight" TickFrequency="1"
Value="{Binding Path=AudioVisualizerSettings.FadeSpeed, Mode=TwoWay}" Minimum="1" Maximum="3"
SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
<StackPanel Grid.Column="0" Grid.Row="7" 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"

View File

@ -14,16 +14,17 @@ namespace Artemis.Modules.Games.CounterStrike
{
public class CounterStrikeModel : GameModel
{
private readonly CounterStrikeSettings _settings;
public CounterStrikeModel(MainModel mainModel, CounterStrikeSettings settings) : base(mainModel)
{
_settings = settings;
Settings = settings;
Name = "CounterStrike";
ProcessName = "csgo";
Scale = 4;
Enabled = Settings.Enabled;
}
public CounterStrikeSettings Settings { get; set; }
public KeyboardRectangle EventRect { get; set; }
public KeyboardRectangle TeamRect { get; set; }
public KeyboardRectangle AmmoRect { get; set; }
@ -34,11 +35,6 @@ namespace Artemis.Modules.Games.CounterStrike
public int Scale { get; set; }
public override bool Enabled()
{
return _settings.Enabled;
}
public override void Dispose()
{
MainModel.GameStateWebServer.GameDataReceived -= HandleGameData;
@ -50,9 +46,9 @@ namespace Artemis.Modules.Games.CounterStrike
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale};
LinearGradientMode.Horizontal) {Height = MainModel.ActiveKeyboard.Height*Scale - Scale};
EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale};
LinearGradientMode.Horizontal) {Height = MainModel.ActiveKeyboard.Height*Scale - Scale};
MainModel.GameStateWebServer.GameDataReceived += HandleGameData;
}
@ -61,15 +57,15 @@ namespace Artemis.Modules.Games.CounterStrike
if (CsJson == null)
return;
if (_settings.AmmoEnabled)
if (Settings.AmmoEnabled)
UpdateAmmo();
if (_settings.TeamColorEnabled)
if (Settings.TeamColorEnabled)
UpdateTeam();
if (_settings.LowHpEnabled)
if (Settings.LowHpEnabled)
UpdateHealth();
if (_settings.FlashEnabled)
if (Settings.FlashEnabled)
UpdateFlash();
if (_settings.SmokeEnabled)
if (Settings.SmokeEnabled)
UpdateSmoke();
}
@ -82,7 +78,7 @@ namespace Artemis.Modules.Games.CounterStrike
if (health > 25 || health < 1)
return;
TeamRect.Colors = new List<Color> {Color.Red, Color.OrangeRed, Color.Red, Color.OrangeRed };
TeamRect.Colors = new List<Color> {Color.Red, Color.OrangeRed, Color.Red, Color.OrangeRed};
}
private void UpdateSmoke()
@ -93,9 +89,9 @@ namespace Artemis.Modules.Games.CounterStrike
var smoked = CsJson["player"]["state"]["smoked"].Value<int>();
if (smoked == 0 && !DrawingSmoke)
return;
EventRect.Colors = new List<Color> {Color.FromArgb(smoked, 255, 255, 255)};
DrawingSmoke = (smoked != 0);
DrawingSmoke = smoked != 0;
}
private void UpdateFlash()
@ -108,7 +104,7 @@ namespace Artemis.Modules.Games.CounterStrike
return;
EventRect.Colors = new List<Color> {Color.FromArgb(flashed, 255, 255, 255)};
DrawingFlash = (flashed != 0);
DrawingFlash = flashed != 0;
}
private void UpdateTeam()
@ -150,11 +146,11 @@ namespace Artemis.Modules.Games.CounterStrike
return;
var ammoPercentage = (int) Math.Ceiling(100.00/maxAmmo)*ammo;
AmmoRect.Width = ((int) Math.Floor((16/100.00)*ammoPercentage))*Scale;
AmmoRect.Width = (int) Math.Floor(16/100.00*ammoPercentage)*Scale;
AmmoRect.Colors = new List<Color>
{
ColorHelpers.ToDrawingColor(_settings.AmmoMainColor),
ColorHelpers.ToDrawingColor(_settings.AmmoSecondaryColor)
ColorHelpers.ToDrawingColor(Settings.AmmoMainColor),
ColorHelpers.ToDrawingColor(Settings.AmmoSecondaryColor)
};
// Low ammo indicator

View File

@ -22,7 +22,7 @@ namespace Artemis.Modules.Games.CounterStrike
public bool SmokeEnabled { get; set; }
public bool LowHpEnabled { get; set; }
public override sealed void Load()
public sealed override void Load()
{
Enabled = CounterStrike.Default.Enabled;
GameDirectory = CounterStrike.Default.GameDirectory;
@ -37,7 +37,7 @@ namespace Artemis.Modules.Games.CounterStrike
LowHpEnabled = CounterStrike.Default.LowHpEnabled;
}
public override sealed void Save()
public sealed override void Save()
{
CounterStrike.Default.Enabled = Enabled;
CounterStrike.Default.GameDirectory = GameDirectory;
@ -54,7 +54,7 @@ namespace Artemis.Modules.Games.CounterStrike
CounterStrike.Default.Save();
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
Enabled = true;
GameDirectory = string.Empty;

View File

@ -11,7 +11,7 @@
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid Margin="15, 5, 15, 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@ -37,15 +37,17 @@
<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"
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
IsChecked="{Binding Path=CounterStrikeSettings.Enabled, Mode=TwoWay}"
Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2" Margin="0,0,1,0">
<Label FontSize="16" Content="CS:GO Directory" Style="{DynamicResource DescriptionHeaderStyle}"
FontFamily="Segoe UI Semibold" Foreground="#535353" Width="130" HorizontalAlignment="Left" />
<Label FontSize="16" Content="CS:GO Directory" FontFamily="Segoe UI Semibold" Foreground="#535353"
Width="130" HorizontalAlignment="Left" />
<Grid>
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
Text="{Binding Path=CounterStrikeSettings.GameDirectory, Mode=TwoWay}"

View File

@ -41,6 +41,25 @@ namespace Artemis.Modules.Games.CounterStrike
public static string Name => "CS:GO";
public string Content => "Counter-Strike: GO Content";
public void SaveSettings()
{
CounterStrikeSettings?.Save();
}
public void ResetSettings()
{
// TODO: Confirmation dialog (Generic MVVM approach)
CounterStrikeSettings.ToDefault();
NotifyOfPropertyChange(() => CounterStrikeSettings);
SaveSettings();
}
public void ToggleEffect()
{
CounterStrikeModel.Enabled = _counterStrikeSettings.Enabled;
}
public void BrowseDirectory()
{
var dialog = new FolderBrowserDialog {SelectedPath = CounterStrikeSettings.GameDirectory};
@ -59,7 +78,7 @@ namespace Artemis.Modules.Games.CounterStrike
return;
if (Directory.Exists(CounterStrikeSettings.GameDirectory + "/csgo/cfg"))
{
var cfgFile = Resources.gamestateConfigFileCsGo.Replace("{{port}}",
var cfgFile = Resources.gamestateConfiguration.Replace("{{port}}",
MainModel.GameStateWebServer.Port.ToString());
File.WriteAllText(CounterStrikeSettings.GameDirectory + "/csgo/cfg/gamestate_integration_artemis.cfg",
cfgFile);
@ -70,19 +89,5 @@ namespace Artemis.Modules.Games.CounterStrike
CounterStrikeSettings.GameDirectory = string.Empty;
NotifyOfPropertyChange(() => CounterStrikeSettings);
}
public void SaveSettings()
{
CounterStrikeSettings?.Save();
}
public void ResetSettings()
{
// TODO: Confirmation dialog (Generic MVVM approach)
CounterStrikeSettings.ToDefault();
NotifyOfPropertyChange(() => CounterStrikeSettings);
SaveSettings();
}
}
}

View File

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Games.RocketLeague" GeneratedClassName="RocketLeague">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
GeneratedClassNamespace="Artemis.Modules.Games.RocketLeague" GeneratedClassName="RocketLeague">
<Profiles />
<Settings>
<Setting Name="Enabled" Type="System.Boolean" Scope="User">

View File

@ -16,7 +16,6 @@ namespace Artemis.Modules.Games.RocketLeague
{
public class RocketLeagueModel : GameModel
{
private readonly RocketLeagueSettings _settings;
private int _boostAmount;
private bool _boostGrowing;
private KeyboardRectangle _boostRect;
@ -26,17 +25,14 @@ namespace Artemis.Modules.Games.RocketLeague
public RocketLeagueModel(MainModel mainModel, RocketLeagueSettings settings) : base(mainModel)
{
Settings = settings;
Name = "RocketLeague";
ProcessName = "RocketLeague";
Scale = 4;
_settings = settings;
Enabled = Settings.Enabled;
}
public override bool Enabled()
{
return _settings.Enabled;
}
public RocketLeagueSettings Settings { get; set; }
public int Scale { get; set; }
@ -49,8 +45,8 @@ namespace Artemis.Modules.Games.RocketLeague
{
_boostRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>
{
ColorHelpers.ToDrawingColor(_settings.MainColor),
ColorHelpers.ToDrawingColor(_settings.SecondaryColor)
ColorHelpers.ToDrawingColor(Settings.MainColor),
ColorHelpers.ToDrawingColor(Settings.SecondaryColor)
}, LinearGradientMode.Horizontal);
MemoryHelpers.GetPointers();
@ -80,11 +76,11 @@ namespace Artemis.Modules.Games.RocketLeague
if (_boostAmount > 100)
_boostAmount = 100;
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
_boostRect.Width = (int) Math.Ceiling(MainModel.ActiveKeyboard.Width*Scale/100.00*_boostAmount);
_boostRect.Colors = new List<Color>
{
ColorHelpers.ToDrawingColor(_settings.MainColor),
ColorHelpers.ToDrawingColor(_settings.SecondaryColor)
ColorHelpers.ToDrawingColor(Settings.MainColor),
ColorHelpers.ToDrawingColor(Settings.SecondaryColor)
};
Task.Run(() => GrowIfHigher());
@ -102,7 +98,7 @@ namespace Artemis.Modules.Games.RocketLeague
var differenceStep = difference/amountOfSteps;
var differenceStepRest = difference%amountOfSteps;
_boostAmount = _previousBoost;
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
_boostRect.Width = (int) Math.Ceiling(MainModel.ActiveKeyboard.Width*Scale/100.00*_boostAmount);
for (var i = 0; i < amountOfSteps; i++)
{
@ -110,10 +106,10 @@ namespace Artemis.Modules.Games.RocketLeague
{
differenceStepRest -= 1;
_boostAmount += 1;
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
_boostRect.Width = (int) Math.Ceiling(MainModel.ActiveKeyboard.Width*Scale/100.00*_boostAmount);
}
_boostAmount += differenceStep;
_boostRect.Width = (int) Math.Ceiling(((MainModel.ActiveKeyboard.Width*Scale)/100.00)*_boostAmount);
_boostRect.Width = (int) Math.Ceiling(MainModel.ActiveKeyboard.Width*Scale/100.00*_boostAmount);
Thread.Sleep(50);
}

View File

@ -14,14 +14,14 @@ namespace Artemis.Modules.Games.RocketLeague
public Color MainColor { get; set; }
public Color SecondaryColor { get; set; }
public override sealed void Load()
public sealed override void Load()
{
Enabled = RocketLeague.Default.Enabled;
MainColor = RocketLeague.Default.MainColor;
SecondaryColor = RocketLeague.Default.SecondaryColor;
}
public override sealed void Save()
public sealed override void Save()
{
RocketLeague.Default.Enabled = Enabled;
RocketLeague.Default.MainColor = MainColor;
@ -30,7 +30,7 @@ namespace Artemis.Modules.Games.RocketLeague
RocketLeague.Default.Save();
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
Enabled = true;
MainColor = Color.FromArgb(255, 255, 80, 0);

View File

@ -4,6 +4,7 @@
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"
mc:Ignorable="d"
d:DesignHeight="476.986" d:DesignWidth="538.772">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
@ -31,7 +32,9 @@
<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"
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
IsChecked="{Binding Path=RocketLeagueSettings.Enabled, Mode=TwoWay}"
Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
</StackPanel>
</StackPanel>

View File

@ -51,5 +51,10 @@ namespace Artemis.Modules.Games.RocketLeague
SaveSettings();
}
public void ToggleEffect()
{
RocketLeagueModel.Enabled = _rocketLeagueSettings.Enabled;
}
}
}

View File

@ -0,0 +1,31 @@
using Artemis.Models;
namespace Artemis.Modules.Games.Witcher3
{
public class Witcher3Settings : EffectSettings
{
public Witcher3Settings()
{
Load();
}
public bool Enabled { get; set; }
public sealed override void Load()
{
Enabled = Witcher3.Default.Enabled;
}
public sealed override void Save()
{
Witcher3.Default.Enabled = Enabled;
Witcher3.Default.Save();
}
public sealed override void ToDefault()
{
Enabled = true;
}
}
}

View File

@ -1,129 +1,108 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.IO;
using System.Text.RegularExpressions;
using Artemis.Models;
using Artemis.Modules.Games.RocketLeague;
using Artemis.Settings;
using Artemis.Utilities.Keyboard;
using Artemis.Utilities.Memory;
using MyMemory;
using Newtonsoft.Json;
namespace Artemis.Modules.Games.Witcher3
{
public class Witcher3Model : GameModel
{
private readonly Regex _signRegex;
private readonly Stopwatch _updateSw;
private KeyboardRectangle _signRect;
private IntPtr _baseAddress;
private GamePointersCollectionModel _pointer;
private RemoteProcess _process;
private string _witcherSettings;
public Witcher3Model(MainModel mainModel, RocketLeagueSettings settings) : base(mainModel)
public Witcher3Model(MainModel mainModel, Witcher3Settings settings) : base(mainModel)
{
Settings = settings;
Name = "Witcher3";
ProcessName = "witcher3";
Scale = 4;
Enabled = Settings.Enabled;
_updateSw = new Stopwatch();
_signRegex = new Regex("ActiveSign=(.*)", RegexOptions.Compiled);
}
public Witcher3Settings Settings { get; set; }
public int Scale { get; set; }
public override bool Enabled()
{
return true;
}
public override void Dispose()
{
_process = null;
_witcherSettings = null;
_updateSw.Reset();
}
public override void Enable()
{
_signRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(), LinearGradientMode.Horizontal)
_signRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
LinearGradientMode.Horizontal)
{
Rotate = true,
LoopSpeed = 0.5
};
MemoryHelpers.GetPointers();
_pointer = JsonConvert
.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.Witcher3);
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
_baseAddress = tempProcess.MainModule.BaseAddress;
_process = new RemoteProcess((uint) tempProcess.Id);
// Ensure the config file is found
var witcherSettings = Environment.GetFolderPath(Environment.SpecialFolder.Personal) +
@"\The Witcher 3\user.settings";
if (File.Exists(witcherSettings))
_witcherSettings = witcherSettings;
_updateSw.Start();
}
public override void Update()
{
if (_process == null)
// Witcher effect is very static and reads from disk, don't want to update too often.
if (_updateSw.ElapsedMilliseconds < 500)
return;
_updateSw.Restart();
if (_witcherSettings == null)
return;
var processHandle = _process.ProcessHandle;
var addr = MemoryHelpers.FindAddress(processHandle, _baseAddress,
_pointer.GameAddresses.First(ga => ga.Description == "Sign").BasePointer,
_pointer.GameAddresses.First(ga => ga.Description == "Sign").Offsets);
var reader = new StreamReader(File.Open(_witcherSettings,
FileMode.Open,
FileAccess.Read,
FileShare.ReadWrite));
var configContent = reader.ReadToEnd();
reader.Close();
var result = _process.MemoryManager.Read<byte>(addr);
var signRes = _signRegex.Match(configContent);
if (signRes.Groups.Count < 2)
return;
var sign = signRes.Groups[1].Value;
switch (result)
switch (sign)
{
case 0:
// Aard
_signRect.Colors = new List<Color>
{
Color.DeepSkyBlue,
Color.Blue,
Color.DeepSkyBlue,
Color.Blue
};
case "ST_Aard\r":
_signRect.Colors = new List<Color> {Color.DeepSkyBlue, Color.Blue};
break;
case 1:
// Yrden
_signRect.Colors = new List<Color>
{
Color.Purple,
Color.DeepPink,
Color.Purple,
Color.DeepPink
};
case "ST_Yrden\r":
_signRect.Colors = new List<Color> {Color.Purple, Color.DeepPink};
break;
case 2:
// Igni
_signRect.Colors = new List<Color>
{
Color.DarkOrange,
Color.Red,
Color.DarkOrange,
Color.Red
};
case "ST_Igni\r":
_signRect.Colors = new List<Color> {Color.DarkOrange, Color.Red};
break;
case 3:
// Quen
_signRect.Colors = new List<Color>
{
Color.DarkOrange,
Color.Yellow,
Color.DarkOrange,
Color.Yellow
};
case "ST_Quen\r":
_signRect.Colors = new List<Color> {Color.DarkOrange, Color.FromArgb(232, 193, 0)};
break;
case 4:
// Axii
_signRect.Colors = new List<Color>
{
Color.LawnGreen,
Color.DarkGreen,
Color.LawnGreen,
Color.DarkGreen
};
case "ST_Axii\r":
_signRect.Colors = new List<Color> {Color.LawnGreen, Color.DarkGreen};
break;
}
}
public override Bitmap GenerateBitmap()
{
var bitmap = MainModel.ActiveKeyboard.KeyboardBitmap();
var bitmap = MainModel.ActiveKeyboard.KeyboardBitmap(Scale);
using (var g = Graphics.FromImage(bitmap))
{
g.Clear(Color.Transparent);

View File

@ -3,17 +3,21 @@
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:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
d:DesignHeight="386.842" d:DesignWidth="554.887">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid Margin="15, 5, 15, 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
<Label FontSize="20" HorizontalAlignment="Left">
@ -25,15 +29,33 @@
<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"
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
IsChecked="{Binding Path=Witcher3Settings.Enabled, Mode=TwoWay}"
Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
</StackPanel>
</StackPanel>
<TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
Note: Requires patch x.x. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings).
Artemis requires the latest Witcher 3 version and mod to be installed in order to work. If you don't use any (conflicting) Witcher 3 mods, the mod can automatically be installed.
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
If you do use conflicting mods, we'll let you know what to do.
</TextBlock>
<Button Grid.Row="3" Grid.Column="0" x:Name="AutoInstall" Content="Try automatic mod install" Width="160"
Style="{DynamicResource SquareButtonStyle}" HorizontalAlignment="Left" Margin="0,20,0,0" />
<!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="4" 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>

View File

@ -1,22 +1,25 @@
using Artemis.Models;
using Artemis.Modules.Games.RocketLeague;
using Caliburn.Micro;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Artemis.Models;
using Artemis.Properties;
using Screen = Caliburn.Micro.Screen;
namespace Artemis.Modules.Games.Witcher3
{
public class Witcher3ViewModel : Screen
{
private RocketLeagueSettings _rocketLeagueSettings;
private Witcher3Settings _witcher3Settings;
public Witcher3ViewModel(MainModel mainModel)
{
MainModel = mainModel;
// Settings are loaded from file by class
RocketLeagueSettings = new RocketLeagueSettings();
Witcher3Settings = new Witcher3Settings();
// Create effect model and add it to MainModel
Witcher3Model = new Witcher3Model(mainModel, RocketLeagueSettings);
Witcher3Model = new Witcher3Model(mainModel, Witcher3Settings);
MainModel.EffectModels.Add(Witcher3Model);
}
@ -25,14 +28,14 @@ namespace Artemis.Modules.Games.Witcher3
public MainModel MainModel { get; set; }
public Witcher3Model Witcher3Model { get; set; }
public RocketLeagueSettings RocketLeagueSettings
public Witcher3Settings Witcher3Settings
{
get { return _rocketLeagueSettings; }
get { return _witcher3Settings; }
set
{
if (Equals(value, _rocketLeagueSettings)) return;
_rocketLeagueSettings = value;
NotifyOfPropertyChange(() => RocketLeagueSettings);
if (Equals(value, _witcher3Settings)) return;
_witcher3Settings = value;
NotifyOfPropertyChange(() => Witcher3Settings);
}
}
@ -41,16 +44,81 @@ namespace Artemis.Modules.Games.Witcher3
if (Witcher3Model == null)
return;
RocketLeagueSettings.Save();
Witcher3Settings.Save();
}
public void ResetSettings()
{
// TODO: Confirmation dialog (Generic MVVM approach)
RocketLeagueSettings.ToDefault();
NotifyOfPropertyChange(() => RocketLeagueSettings);
Witcher3Settings.ToDefault();
NotifyOfPropertyChange(() => Witcher3Settings);
SaveSettings();
}
public void ToggleEffect()
{
Witcher3Model.Enabled = _witcher3Settings.Enabled;
}
public void AutoInstall()
{
// Request The Witcher 3 folder
var dialog = new FolderBrowserDialog
{
Description = "Please select your Witcher 3 install path (root directory)."
};
var result = dialog.ShowDialog();
if (result != DialogResult.OK)
return;
// If the subfolder doesn't contain witcher3.exe, it's the wrong folder.
if (!File.Exists(dialog.SelectedPath + @"\bin\x64\witcher3.exe"))
{
var error = MessageBox.Show("That's not a valid Witcher 3 directory\n\n" +
"Default directories:\n" +
"Steam: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher 3\n" +
"GOG: C:\\GOG Games\\The Witcher 3 Wild Hunt", "Installation error",
MessageBoxButtons.RetryCancel);
if (error == DialogResult.Retry)
AutoInstall();
else
return;
}
// Look for any conflicting mods
if (Directory.Exists(dialog.SelectedPath + @"\mods"))
{
var file =
Directory.GetFiles(dialog.SelectedPath + @"\mods", "playerWitcher.ws", SearchOption.AllDirectories)
.FirstOrDefault();
if (file != null)
{
// Don't trip over our own mod
if (!file.Contains("modArtemis"))
{
MessageBox.Show("Oh no, you have a conflicting mod!\n\n" +
"Conflicting file: " + file.Remove(0, dialog.SelectedPath.Length) +
"\n\nOnce you press OK you will be taken to an instructions page.",
"Conflicting mod found");
return;
}
}
}
// Create the directory structure
if (!Directory.Exists(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player"))
Directory.CreateDirectory(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player");
if (!Directory.Exists(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc"))
Directory.CreateDirectory(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc");
// Install the mod files
File.WriteAllText(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc\artemis.xml",
Resources.artemisXml);
File.WriteAllText(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player\playerWitcher.ws",
Resources.playerWitcherWs);
MessageBox.Show("The mod was successfully installed!", "Success");
}
}
}

View File

@ -37,7 +37,7 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
},
LinearGradientMode.Horizontal)
{
Width = (int) ((MainModel.ActiveKeyboard.Width/100.00)*Volume)*Scale,
Width = (int) (MainModel.ActiveKeyboard.Width*Scale/100.00*Volume),
ContainedBrush = false
};
volumeRect.Draw(g);

View File

@ -4,7 +4,6 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Artemis.Models;
using NAudio.CoreAudioApi;
using Open.WinKeyboardHook;
namespace Artemis.Modules.Overlays.VolumeDisplay
{
@ -14,10 +13,6 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
{
Settings = settings;
Name = "VolumeDisplay";
KeyboardInterceptor = new KeyboardInterceptor();
KeyboardInterceptor.StartCapturing();
Enabled = Settings.Enabled;
VolumeDisplay = new VolumeDisplay(mainModel, settings);
@ -26,18 +21,16 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
public VolumeDisplay VolumeDisplay { get; set; }
public VolumeDisplaySettings Settings { get; set; }
public KeyboardInterceptor KeyboardInterceptor { get; set; }
public override void Dispose()
{
KeyboardInterceptor.KeyUp -= HandleKeypress;
KeyboardInterceptor.StopCapturing();
MainModel.KeyboardHook.Unsubscribe(HandleKeypress);
}
public override void Enable()
{
KeyboardInterceptor.StartCapturing();
KeyboardInterceptor.KeyUp += HandleKeypress;
// Listener won't start unless the effect is active
MainModel.KeyboardHook.Subscribe(HandleKeypress);
}
public override void Update()

View File

@ -14,14 +14,14 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
public Color MainColor { get; set; }
public Color SecondaryColor { get; set; }
public override sealed void Load()
public sealed override void Load()
{
Enabled = Settings.VolumeDisplay.Default.Enabled;
MainColor = Settings.VolumeDisplay.Default.MainColor;
SecondaryColor = Settings.VolumeDisplay.Default.SecondaryColor;
}
public override sealed void Save()
public sealed override void Save()
{
Settings.VolumeDisplay.Default.Enabled = Enabled;
Settings.VolumeDisplay.Default.MainColor = MainColor;
@ -30,7 +30,7 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
Settings.VolumeDisplay.Default.Save();
}
public override sealed void ToDefault()
public sealed override void ToDefault()
{
Enabled = true;
MainColor = Color.FromArgb(255, 38, 246, 0);

View File

@ -30,6 +30,7 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Label Content="Enable overlay" Margin="0 3 0 0" HorizontalAlignment="Right" />
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
IsChecked="{Binding Path=VolumeDisplaySettings.Enabled, Mode=TwoWay}"
Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
</StackPanel>

View File

@ -37,7 +37,7 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
public void ToggleEffect()
{
VolumeDisplayModel.Enabled = VolumeDisplaySettings.Enabled;
VolumeDisplayModel.Enabled = _volumeDisplaySettings.Enabled;
}
public void SaveSettings()

Binary file not shown.

View File

@ -60,10 +60,37 @@ namespace Artemis.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-16&quot;?&gt;
///&lt;!-- Used by Artemis to get the active Sign --&gt;
///&lt;UserConfig&gt;
/// &lt;Group id=&quot;Artemis&quot; displayName=&quot;Artemis&quot;&gt;
/// &lt;VisibleVars&gt;
/// &lt;Var id=&quot;ActiveSign&quot; displayName=&quot;ActiveSign&quot; displayType=&quot;SLIDER:0:1:1000000&quot;/&gt;
/// &lt;/VisibleVars&gt;
/// &lt;/Group&gt;
///&lt;/UserConfig&gt;.
/// </summary>
internal static string artemisXml {
get {
return ResourceManager.GetString("artemisXml", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap bow {
get {
object obj = ResourceManager.GetObject("bow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to &quot;Artemis&quot;
///{
/// &quot;uri&quot; &quot;{{address}}/csgo_game_event&quot;
/// &quot;uri&quot; &quot;http://localhost:{{port}}/csgo_game_event&quot;
/// &quot;timeout&quot; &quot;5.0&quot;
/// &quot;buffer&quot; &quot;0.1&quot;
/// &quot;throttle&quot; &quot;0.1&quot;
@ -80,9 +107,33 @@ namespace Artemis.Properties {
/// }
///}.
/// </summary>
internal static string gamestateConfigFileCsGo {
internal static string gamestateConfiguration {
get {
return ResourceManager.GetString("gamestateConfigFileCsGo", resourceCulture);
return ResourceManager.GetString("gamestateConfiguration", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to /***********************************************************************/
////** © 2015 CD PROJEKT S.A. All rights reserved.
////** THE WITCHER® is a trademark of CD PROJEKT S. A.
////** The Witcher game is based on the prose of Andrzej Sapkowski.
////***********************************************************************/
///
///
///
///
///statemachine class W3PlayerWitcher extends CR4Player
///{
///
/// private saved var craftingSchematics : array&lt;name&gt;;
///
///
/// private saved var alchemyRecipes : array&lt;name&gt;; [rest of string was truncated]&quot;;.
/// </summary>
internal static string playerWitcherWs {
get {
return ResourceManager.GetString("playerWitcherWs", resourceCulture);
}
}
}

View File

@ -118,7 +118,16 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="gamestateConfigFileCsGo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gamestateConfigFileCsGo.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<data name="artemisXml" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\witcher3\artemis.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="bow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="gamestateConfiguration" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\counterstrike\gamestateconfiguration.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="playerWitcherWs" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\witcher3\playerwitcher.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
</root>

View File

@ -1,6 +1,6 @@
"Artemis"
{
"uri" "http://127.0.0.1:{{port}}/csgo_game_event"
"uri" "http://localhost:{{port}}/csgo_game_event"
"timeout" "5.0"
"buffer" "0.1"
"throttle" "0.1"

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-16"?>
<!-- Used by Artemis to get the active Sign -->
<UserConfig>
<Group id="Artemis" displayName="Artemis">
<VisibleVars>
<Var id="ActiveSign" displayName="ActiveSign" displayType="SLIDER:0:1:1000000"/>
</VisibleVars>
</Group>
</UserConfig>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Settings" GeneratedClassName="General">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
GeneratedClassNamespace="Artemis.Settings" GeneratedClassName="General">
<Profiles />
<Settings>
<Setting Name="LastEffect" Type="System.String" Scope="User">

View File

@ -1,9 +1,8 @@
using System;
using System.IO;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using Artemis.Settings;
using Newtonsoft.Json;
namespace Artemis.Utilities.GameState
@ -31,7 +30,7 @@ namespace Artemis.Utilities.GameState
return;
_listener.Prefixes.Clear();
Port = Settings.General.Default.GamestatePort;
Port = General.Default.GamestatePort;
_listener.Prefixes.Add($"http://localhost:{Port}/");
_listener.Start();
@ -73,15 +72,6 @@ namespace Artemis.Utilities.GameState
});
Running = true;
// Create and store JSON file (Could serialize an object but not worth it)
var path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
@"\SteelSeries\SteelSeries Engine 3";
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
var content = "{\"address\":\"127.0.0.1:" + Port + "\"}";
File.WriteAllText(path + @"\coreProps.json", content);
}
private string HandleRequest(HttpListenerRequest request)

View File

@ -1,22 +1,22 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
namespace Artemis.Utilities
{
class ImageUtilities
internal class ImageUtilities
{
private static Dictionary<string, ImageCodecInfo> encoders = null;
private static Dictionary<string, ImageCodecInfo> encoders;
/// <summary>
/// A lock to prevent concurrency issues loading the encoders.
/// A lock to prevent concurrency issues loading the encoders.
/// </summary>
private static object encodersLock = new object();
private static readonly object encodersLock = new object();
/// <summary>
/// A quick lookup for getting image encoders
/// A quick lookup for getting image encoders
/// </summary>
public static Dictionary<string, ImageCodecInfo> Encoders
{
@ -35,7 +35,7 @@ namespace Artemis.Utilities
encoders = new Dictionary<string, ImageCodecInfo>();
//get all the codecs
foreach (ImageCodecInfo codec in ImageCodecInfo.GetImageEncoders())
foreach (var codec in ImageCodecInfo.GetImageEncoders())
{
//add each codec to the quick lookup
encoders.Add(codec.MimeType.ToLower(), codec);
@ -50,7 +50,7 @@ namespace Artemis.Utilities
}
/// <summary>
/// Resize the image to the specified width and height.
/// Resize the image to the specified width and height.
/// </summary>
/// <param name="image">The image to resize.</param>
/// <param name="width">The width to resize to.</param>
@ -59,17 +59,17 @@ namespace Artemis.Utilities
public static Bitmap ResizeImage(Image image, int width, int height)
{
//a holder for the result
Bitmap result = new Bitmap(width, height);
var result = new Bitmap(width, height);
//set the resolutions the same to avoid cropping due to resolution differences
result.SetResolution(image.HorizontalResolution, image.VerticalResolution);
//use a graphics object to draw the resized image into the bitmap
using (Graphics graphics = Graphics.FromImage(result))
using (var graphics = Graphics.FromImage(result))
{
//set the resize quality modes to high quality
graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
//draw the image into the target bitmap
graphics.DrawImage(image, 0, 0, result.Width, result.Height);
}
@ -78,14 +78,16 @@ namespace Artemis.Utilities
return result;
}
/// <summary>
/// Saves an image as a jpeg image, with the given quality
/// </summary>
/// <param name="path">Path to which the image would be saved.</param>
/// <param name="quality">An integer from 0 to 100, with 100 being the
/// highest quality</param>
/// <summary>
/// Saves an image as a jpeg image, with the given quality
/// </summary>
/// <param name="path">Path to which the image would be saved.</param>
/// <param name="quality">
/// An integer from 0 to 100, with 100 being the
/// highest quality
/// </param>
/// <exception cref="ArgumentOutOfRangeException">
/// An invalid value was entered for image quality.
/// An invalid value was entered for image quality.
/// </exception>
public static void SaveJpeg(string path, Image image, int quality)
{
@ -93,31 +95,34 @@ namespace Artemis.Utilities
if ((quality < 0) || (quality > 100))
{
//create the error message
string error = string.Format("Jpeg image quality must be between 0 and 100, with 100 being the highest quality. A value of {0} was specified.", quality);
var error =
string.Format(
"Jpeg image quality must be between 0 and 100, with 100 being the highest quality. A value of {0} was specified.",
quality);
//throw a helpful exception
throw new ArgumentOutOfRangeException(error);
}
//create an encoder parameter for the image quality
EncoderParameter qualityParam = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
var qualityParam = new EncoderParameter(Encoder.Quality, quality);
//get the jpeg codec
ImageCodecInfo jpegCodec = GetEncoderInfo("image/jpeg");
var jpegCodec = GetEncoderInfo("image/jpeg");
//create a collection of all parameters that we will pass to the encoder
EncoderParameters encoderParams = new EncoderParameters(1);
var encoderParams = new EncoderParameters(1);
//set the quality parameter for the codec
encoderParams.Param[0] = qualityParam;
//save the image using the codec and the parameters
image.Save(path, jpegCodec, encoderParams);
}
/// <summary>
/// Returns the image codec with the given mime type
/// </summary>
/// <summary>
/// Returns the image codec with the given mime type
/// </summary>
public static ImageCodecInfo GetEncoderInfo(string mimeType)
{
//do a case insensitive search for the mime type
string lookupKey = mimeType.ToLower();
var lookupKey = mimeType.ToLower();
//the codec to return, default to null
ImageCodecInfo foundCodec = null;
@ -132,4 +137,4 @@ namespace Artemis.Utilities
return foundCodec;
}
}
}
}

View File

@ -0,0 +1,31 @@
using System.Windows.Forms;
using Gma.System.MouseKeyHook;
namespace Artemis.Utilities.Keyboard
{
public class KeyboardHook
{
private IKeyboardMouseEvents _mGlobalHook;
public int Subscriptions { get; set; }
public void Subscribe(KeyEventHandler handleKeypress)
{
if (Subscriptions < 1)
_mGlobalHook = Hook.GlobalEvents();
_mGlobalHook.KeyDown += handleKeypress;
Subscriptions++;
}
public void Unsubscribe(KeyEventHandler handleKeypress)
{
_mGlobalHook.KeyDown -= handleKeypress;
Subscriptions--;
if (Subscriptions >= 1)
return;
_mGlobalHook.Dispose();
_mGlobalHook = null;
}
}
}

View File

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
@ -145,12 +144,11 @@ namespace Artemis.Utilities.Keyboard
if (Rotate)
rect = ContainedBrush
? new Rectangle((int) _rotationProgress, Y, Width*2, Height*2)
: new Rectangle((int) _rotationProgress, 0, (_keyboard.Width*Scale)*2, (_keyboard.Height*Scale)*2);
: new Rectangle((int) _rotationProgress, 0, _keyboard.Width*Scale*2, _keyboard.Height*Scale*2);
else
rect = ContainedBrush
? new Rectangle(X, Y, Width, Height)
: new Rectangle(0, 0, (_keyboard.Width*Scale), (_keyboard.Height*Scale));
: new Rectangle(0, 0, _keyboard.Width*Scale, _keyboard.Height*Scale);
return new LinearGradientBrush(rect, Color.Transparent, Color.Transparent, GradientMode)
{
@ -160,6 +158,8 @@ namespace Artemis.Utilities.Keyboard
private ColorBlend CreateColorBlend()
{
if (Colors.Count == 1)
return new ColorBlend {Colors = new[] {Colors[0], Colors[0]}, Positions = new[] {0F, 1F}};
var colorBlend = Rotate
? new ColorBlend {Colors = CreateTilebleColors(Colors).ToArray()}
: new ColorBlend {Colors = Colors.ToArray()};

View File

@ -11,17 +11,17 @@ namespace Artemis.Utilities.Memory
[Flags]
public enum ProcessAccessType
{
PROCESS_TERMINATE = (0x0001),
PROCESS_CREATE_THREAD = (0x0002),
PROCESS_SET_SESSIONID = (0x0004),
PROCESS_VM_OPERATION = (0x0008),
PROCESS_VM_READ = (0x0010),
PROCESS_VM_WRITE = (0x0020),
PROCESS_DUP_HANDLE = (0x0040),
PROCESS_CREATE_PROCESS = (0x0080),
PROCESS_SET_QUOTA = (0x0100),
PROCESS_SET_INFORMATION = (0x0200),
PROCESS_QUERY_INFORMATION = (0x0400)
PROCESS_TERMINATE = 0x0001,
PROCESS_CREATE_THREAD = 0x0002,
PROCESS_SET_SESSIONID = 0x0004,
PROCESS_VM_OPERATION = 0x0008,
PROCESS_VM_READ = 0x0010,
PROCESS_VM_WRITE = 0x0020,
PROCESS_DUP_HANDLE = 0x0040,
PROCESS_CREATE_PROCESS = 0x0080,
PROCESS_SET_QUOTA = 0x0100,
PROCESS_SET_INFORMATION = 0x0200,
PROCESS_QUERY_INFORMATION = 0x0400
}
[DllImport("kernel32.dll", SetLastError = true)]

View File

@ -9,12 +9,27 @@ namespace Artemis.ViewModels
{
public class EffectsViewModel : Conductor<IScreen>.Collection.OneActive
{
private readonly AudioVisualizerViewModel _audioVisualizerVm;
private readonly DebugEffectViewModel _debugVm;
private readonly TypeHoleViewModel _typeHoleVm;
private readonly TypeWaveViewModel _typeWaveVm;
public EffectsViewModel(MainModel mainModel)
{
ActivateItem(new TypeWaveViewModel(mainModel) {DisplayName = "Type Waves"});
ActivateItem(new TypeHoleViewModel(mainModel) {DisplayName = "Type Holes (NYI)"});
ActivateItem(new AudioVisualizerViewModel(mainModel) {DisplayName = "Audio Visualization"});
ActivateItem(new DebugEffectViewModel(mainModel) {DisplayName = "Debug Effect"});
_typeWaveVm = new TypeWaveViewModel(mainModel) {DisplayName = "Type Waves"};
_typeHoleVm = new TypeHoleViewModel(mainModel) {DisplayName = "Type Holes (NYI)"};
_audioVisualizerVm = new AudioVisualizerViewModel(mainModel) {DisplayName = "Audio Visualization"};
_debugVm = new DebugEffectViewModel(mainModel) {DisplayName = "Debug Effect"};
}
protected override void OnActivate()
{
base.OnActivate();
ActivateItem(_typeWaveVm);
ActivateItem(_typeHoleVm);
ActivateItem(_audioVisualizerVm);
ActivateItem(_debugVm);
}
}
}

View File

@ -33,6 +33,7 @@ namespace Artemis.ViewModels
return;
_isOpen = value;
HandleOpen();
NotifyOfPropertyChange(() => IsOpen);
}
}
@ -50,5 +51,7 @@ namespace Artemis.ViewModels
NotifyOfPropertyChange(() => Position);
}
}
protected abstract void HandleOpen();
}
}

View File

@ -1,19 +1,48 @@
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using Artemis.Models;
using Caliburn.Micro;
using MahApps.Metro.Controls;
namespace Artemis.ViewModels.Flyouts
{
public class FlyoutSettingsViewModel : FlyoutBaseViewModel
{
public FlyoutSettingsViewModel()
private string _selectedKeyboardProvider;
public MainModel MainModel { get; set; }
public FlyoutSettingsViewModel(MainModel mainModel)
{
MainModel = mainModel;
Header = "settings";
Position = Position.Right;
}
public BindableCollection<string> KeyboardProviders
=> new BindableCollection<string>(MainModel.KeyboardProviders.Select(k => k.Name));
public string SelectedKeyboardProvider
{
get { return _selectedKeyboardProvider; }
set
{
if (value == _selectedKeyboardProvider) return;
_selectedKeyboardProvider = value;
NotifyOfPropertyChange(() => SelectedKeyboardProvider);
MainModel.ChangeKeyboard(MainModel.KeyboardProviders.First(k => k.Name == _selectedKeyboardProvider));
}
}
public void NavigateTo(string url)
{
Process.Start(new ProcessStartInfo(url));
}
protected override void HandleOpen()
{
SelectedKeyboardProvider = MainModel.ActiveKeyboard?.Name;
}
}
}

View File

@ -9,12 +9,27 @@ namespace Artemis.ViewModels
{
public class GamesViewModel : Conductor<IScreen>.Collection.OneActive
{
private readonly CounterStrikeViewModel _counterStrikeVm;
private readonly Dota2ViewModel _dota2Vm;
private readonly RocketLeagueViewModel _rocketLeagueVm;
private readonly Witcher3ViewModel _witcher3Vm;
public GamesViewModel(MainModel mainModel)
{
ActivateItem(new RocketLeagueViewModel(mainModel) {DisplayName = "Rocket League"});
ActivateItem(new CounterStrikeViewModel(mainModel) {DisplayName = "CS:GO"});
ActivateItem(new Dota2ViewModel(mainModel) {DisplayName = "Dota 2 (NYI)"});
ActivateItem(new Witcher3ViewModel(mainModel) {DisplayName = "The Witcher 3"});
_rocketLeagueVm = new RocketLeagueViewModel(mainModel) {DisplayName = "Rocket League"};
_counterStrikeVm = new CounterStrikeViewModel(mainModel) {DisplayName = "CS:GO"};
_dota2Vm = new Dota2ViewModel(mainModel) {DisplayName = "Dota 2 (NYI)"};
_witcher3Vm = new Witcher3ViewModel(mainModel) {DisplayName = "The Witcher 3"};
}
protected override void OnActivate()
{
base.OnActivate();
ActivateItem(_rocketLeagueVm);
ActivateItem(_counterStrikeVm);
ActivateItem(_dota2Vm);
ActivateItem(_witcher3Vm);
}
}
}

View File

@ -6,9 +6,18 @@ namespace Artemis.ViewModels
{
public class OverlaysViewModel : Conductor<IScreen>.Collection.OneActive
{
private readonly VolumeDisplayViewModel _volumeDisplayVm;
public OverlaysViewModel(MainModel mainModel)
{
ActivateItem(new VolumeDisplayViewModel(mainModel) {DisplayName = "Volume Display"});
_volumeDisplayVm = new VolumeDisplayViewModel(mainModel) {DisplayName = "Volume Display"};
}
protected override void OnActivate()
{
base.OnActivate();
ActivateItem(_volumeDisplayVm);
}
}
}

View File

@ -7,19 +7,23 @@ using Caliburn.Micro;
namespace Artemis.ViewModels
{
internal sealed class ShellViewModel : Conductor<IScreen>.Collection.OneActive
public sealed class ShellViewModel : Conductor<IScreen>.Collection.OneActive
{
private readonly EffectsViewModel _effectsVm;
private readonly GamesViewModel _gamesVm;
private readonly OverlaysViewModel _overlaysVm;
public ShellViewModel()
{
IEventAggregator events = new EventAggregator();
MainModel = new MainModel(events);
DisplayName = "Artemis";
ActivateItem(new EffectsViewModel(MainModel) {DisplayName = "Effects"});
ActivateItem(new GamesViewModel(MainModel) {DisplayName = "Games"});
ActivateItem(new OverlaysViewModel(MainModel) {DisplayName = "Overlays"});
Flyouts.Add(new FlyoutSettingsViewModel());
_effectsVm = new EffectsViewModel(MainModel) {DisplayName = "Effects"};
_gamesVm = new GamesViewModel(MainModel) {DisplayName = "Games"};
_overlaysVm = new OverlaysViewModel(MainModel) {DisplayName = "Overlays"};
Flyouts.Add(new FlyoutSettingsViewModel(MainModel));
// By now Effects are added to the MainModel so we can savely start one
ToggleEffects();
@ -40,6 +44,15 @@ namespace Artemis.ViewModels
public MainModel MainModel { get; set; }
protected override void OnActivate()
{
base.OnActivate();
ActivateItem(_effectsVm);
ActivateItem(_gamesVm);
ActivateItem(_overlaysVm);
}
public void ToggleEffects()
{
if (EffectsEnabled)

View File

@ -0,0 +1,69 @@
using System.Windows;
using Caliburn.Micro;
namespace Artemis.ViewModels
{
public class SystemTrayViewModel : Screen
{
private readonly ShellViewModel _shellViewModel;
private readonly IWindowManager _windowManager;
/*
* NOTE: In this sample the system tray view-model doesn't receive any notification
* when the other window gets closed by pressing the top right 'x'.
* Thus no property notification is invoked, and system tray context-menu appears
* out of sync, still allowing 'Hide' and disabling 'Show'.
* Given the purpose of the sample - integrating Caliburn.Micro with WPF NotifyIcon -
* sync'ing the two view-models is not of interest here.
* */
public SystemTrayViewModel(IWindowManager windowManager, ShellViewModel shellViewModel)
{
_windowManager = windowManager;
_shellViewModel = shellViewModel;
// TODO: Check if show on startup is enabled, if so, show window.
}
public bool CanShowWindow => !_shellViewModel.IsActive;
public bool CanHideWindow => _shellViewModel.IsActive;
protected override void OnActivate()
{
base.OnActivate();
NotifyOfPropertyChange(() => CanShowWindow);
NotifyOfPropertyChange(() => CanHideWindow);
}
public void ShowWindow()
{
if (!CanShowWindow)
return;
// manually show the next window view-model
_windowManager.ShowWindow(_shellViewModel);
NotifyOfPropertyChange(() => CanShowWindow);
NotifyOfPropertyChange(() => CanHideWindow);
}
public void HideWindow()
{
if (!CanHideWindow)
return;
_shellViewModel.TryClose();
NotifyOfPropertyChange(() => CanShowWindow);
NotifyOfPropertyChange(() => CanHideWindow);
}
public void ExitApplication()
{
_shellViewModel.MainModel.ShutdownEffects();
Application.Current.Shutdown();
}
}
}

View File

@ -23,43 +23,51 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Startup with Windows -->
<!-- Master switch -->
<Label Grid.Row="0" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Startup with Windows:" />
Content="Enable Artemis:" />
<controls:ToggleSwitch Grid.Row="0" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
<!-- Keyboard selection -->
<!-- Startup with Windows -->
<Label Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Startup with Windows:" />
<controls:ToggleSwitch Grid.Row="1" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
<!-- Keyboard selection -->
<Label Grid.Row="2" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Keyboard:" />
<ComboBox Grid.Row="1" Grid.Column="1" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Right"
<ComboBox Grid.Row="2" Grid.Column="1" x:Name="KeyboardProviders" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Right"
Width="120" />
<!-- TODO: Ugly -->
<!-- Gamestate port -->
<Label Grid.Row="2" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
<Label Grid.Row="3" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Gamestate server port:" />
<controls:NumericUpDown Grid.Row="2" Grid.Column="1" Margin="10" VerticalAlignment="Center"
<controls:NumericUpDown Grid.Row="3" Grid.Column="1" Margin="10" VerticalAlignment="Center"
HorizontalAlignment="Right" Width="120" />
<!-- Update pointers -->
<Label Grid.Row="3" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
<Label Grid.Row="4" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Download pointers:" />
<controls:ToggleSwitch Grid.Row="3" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
<controls:ToggleSwitch Grid.Row="4" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
<!-- Buttons -->
<Button Grid.Row="4" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
<Button Grid.Row="5" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
VerticalAlignment="Center" HorizontalAlignment="Left" Width="120"
Style="{DynamicResource SquareButtonStyle}" />
<Button Grid.Row="4" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes"
<Button Grid.Row="5" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120"
Style="{DynamicResource SquareButtonStyle}" />
<!-- Version -->
<Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
<Grid Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
@ -68,8 +76,9 @@
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row ="0" Grid.Column="0" Text="Artemis pre-release" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button Grid.Row ="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
<TextBlock Grid.Row="0" Grid.Column="0" Text="Artemis pre-release" VerticalAlignment="Center"
HorizontalAlignment="Left" />
<Button Grid.Row="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
Content="View on GitHub" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>

View File

@ -6,10 +6,22 @@
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
cal:Message.Attach="[Event Closing] = [Action OnClose($eventArgs)]"
Title="Artemis" Height="670" Width="690"
MinWidth="500" MinHeight="400"
GlowBrush="{DynamicResource AccentColorBrush}">
GlowBrush="{DynamicResource AccentColorBrush}" Icon="/Artemis;component/logo.ico">
<!-- Bit of extra code to use a different icon than in the taskbar -->
<Controls:MetroWindow.IconTemplate>
<DataTemplate>
<Grid Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="0,0,-10,0"
Background="Transparent"
RenderOptions.EdgeMode="Aliased"
RenderOptions.BitmapScalingMode="HighQuality">
<Image Source="/Artemis;component/Resources/bow.png" />
</Grid>
</DataTemplate>
</Controls:MetroWindow.IconTemplate>
<Controls:MetroWindow.RightWindowCommands>
<Controls:WindowCommands>
<Button cal:Message.Attach="Settings">
@ -37,7 +49,7 @@
</Controls:FlyoutsControl.ItemTemplate>
<Controls:FlyoutsControl.ItemContainerStyle>
<Style BasedOn="{StaticResource {x:Type Controls:Flyout}}" TargetType="{x:Type Controls:Flyout}">
<Setter Property="Header" Value="{Binding Header}" />
<Setter Property="Header" Value="{Binding Header}" />
<Setter Property="IsOpen" Value="{Binding IsOpen}" />
<Setter Property="Position" Value="{Binding Position}" />
</Style>

View File

@ -0,0 +1,36 @@
<Window x:Class="Artemis.Views.SystemTrayView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburnproject.org"
xmlns:tb="http://www.hardcodet.net/taskbar"
Title="SystemTrayView"
Height="0" Width="0"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Visibility="Hidden">
<Window.Resources>
<ContextMenu x:Shared="false" x:Key="MainSysTrayMenu">
<MenuItem Header="Show Artemis" cal:Message.Attach="ShowWindow" />
<MenuItem Header="Hide Artemis" cal:Message.Attach="HideWindow" />
<Separator />
<MenuItem Header="Disable all effects" cal:Message.Attach="DisableEffects" />
<MenuItem Header="Exit" cal:Message.Attach="ExitApplication" />
</ContextMenu>
<!-- the application main system tray icon -->
<tb:TaskbarIcon x:Key="SystemTrayIcon"
IconSource="../logo.ico"
ToolTipText="Artemis"
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
ContextMenu="{StaticResource MainSysTrayMenu}" />
</Window.Resources>
<Grid>
<ContentControl Content="{StaticResource SystemTrayIcon}" />
</Grid>
</Window>

View File

@ -0,0 +1,15 @@
using System.Windows;
namespace Artemis.Views
{
/// <summary>
/// Interaction logic for SystemTrayView.xaml
/// </summary>
public partial class SystemTrayView : Window
{
public SystemTrayView()
{
InitializeComponent();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

@ -1,15 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Caliburn.Micro" version="2.0.2" targetFramework="net452" />
<package id="Caliburn.Micro.AutofacBootstrap" version="2.0.8" targetFramework="net452" />
<package id="Caliburn.Micro.Core" version="2.0.2" targetFramework="net452" />
<package id="Colore" version="3.0.2" targetFramework="net452" />
<package id="CUE.NET" version="1.0.0" targetFramework="net452" />
<package id="Extended.Wpf.Toolkit" version="2.6" targetFramework="net452" />
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.5" targetFramework="net452" />
<package id="log4net" version="2.0.5" targetFramework="net452" />
<package id="MahApps.Metro" version="1.3.0-ALPHA017" targetFramework="net452" />
<package id="MahApps.Metro.Resources" version="0.4.0.0" targetFramework="net452" />
<package id="MouseKeyHook" version="5.4.0" targetFramework="net452" />
<package id="NAudio" version="1.7.3" targetFramework="net452" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" />
<package id="Open.WinKeyboardHook" version="1.0.10.0" targetFramework="net452" />
<package id="WpfExceptionViewer" version="1.0.0.0" targetFramework="net452" />
</packages>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Select a Product Configuration -->
<InstallShieldProductConfiguration>Express</InstallShieldProductConfiguration>
<!-- Select a Visual Studio Configuration / InstallShield Release -->
<Configuration>Debug</Configuration>
<InstallShieldRelease>$(Configuration)</InstallShieldRelease>
</PropertyGroup>
<ItemGroup>
<!-- The InstallShieldProject item selects the project to build -->
<InstallShieldProject Include="$(MSBuildProjectDirectory)\$(MSBuildProjectName).isl"/>
<!-- The InstallShieldReleaseFlags sets Release Flags -->
<!--<InstallShieldReleaseFlags Include=""/>-->
<!-- The InstallShieldMergeModulePath specifies what directories are
searched for Merge Modules -->
<!--<InstallShieldMergeModulePath Include=""/>-->
</ItemGroup>
<ItemGroup>
<!-- The ProjectReference items refer to any Visual Studio solutions you want to automatically probe for Project Output Groups. -->
</ItemGroup>
<ItemGroup>
<!-- The TaggedOutputs items allow you to explicitly add extra files to output groups. Each item must include both Name and OutputGroup, as well as TargetPath metadata values. -->
<!--<TaggedOutputs Include="C:\My Test Exe.exe">
<Name>My Test Project</Name>
<OutputGroup>Primary output</OutputGroup>
<TargetPath>My Test Exe.exe</TargetPath>
</TaggedOutputs> -->
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\InstallShield\2015Limited\InstallShield.targets"/>
</Project>

View File

@ -13,13 +13,13 @@ Some of it's basic features:
Currently the following games are supported:
* Rocket League (Memory reading, we've had contact with Psyonix for a better solution)
* The Witcher 3 (Memory reading)
* Counter-Strike Global Offensive (Native Gamestate intergration)
* Rocket League (uses memory reading for now, we've had contact with Psyonix for a better solution)
* The Witcher 3 (uses a mod)
* Counter-Strike Global Offensive (uses native gamestate intergration)
Support is planned for:
* Dota 2 (Native Gamestate intergration)
* Project CARS (Native memory sharing)
* Dota 2 (using native gamestate intergration))
* Project CARS (using native memory sharing)
* What you happen to suggest!
For online games we greatly perfer to use an official API, since memory reading is frowned upon by anti-cheat sofware.
@ -32,9 +32,19 @@ For any keyboards/games/effects we'd love PRs!
A quick demo of Rocket League support in the old codebase (a better video demonstrating all functionality will be put up before release)
[![RocketLeague](http://img.youtube.com/vi/L8rqFGaPeTg/0.jpg)](https://www.youtube.com/watch?v=L8rqFGaPeTg "Rocket League")
A demo of The Witcher 3 support on the new codebase
[![Witcher3](http://img.youtube.com/vi/H03D_y2cFYs/0.jpg)](https://www.youtube.com/watch?v=H03D_y2cFYs "The Witcher 3")
### Screenshots
![Screenshot 1](http://i.imgur.com/mq8i4ht.png)
![Screenshot 2](http://i.imgur.com/Z2RkiTE.png)
![Screenshot 1](http://i.imgur.com/7bho4WH.png)
![Screenshot 2](http://i.imgur.com/X7LMaWr.png)
![Screenshot 3](http://i.imgur.com/iSy4jfW.png)
![Screenshot 4](http://i.imgur.com/P7WUsS6.png)
![Screenshot 5](http://i.imgur.com/JNoLaDB.png)
### Thanks to: