1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-01 18:23:32 +00:00

Project cleanup

Added animation reset when not drawn for >100ms to some animations
Fixed Artemis.exe trailing after shutdown
This commit is contained in:
SpoinkyNL 2016-08-13 01:05:45 +02:00
parent 4d006784f3
commit 6f1c1c4245
39 changed files with 178 additions and 150 deletions

View File

@ -1,26 +1,66 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <sectionGroup name="userSettings"
<section name="Artemis.Modules.Games.UnrealTournament.UnrealTournament" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Artemis.Modules.Games.WoW.WoW" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="Artemis.Modules.Games.UnrealTournament.UnrealTournament"
<section name="Artemis.Modules.Effects.Bubbles.Bubbles" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Modules.Effects.WindowsProfile.WindowsProfile" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.Overwatch.Overwatch" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="Artemis.Modules.Games.WoW.WoW"
<section name="Artemis.Modules.Games.TheDivision.TheDivision" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Modules.Games.Dota2.Dota2" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Overlays.VolumeDisplay.VolumeDisplay" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="Artemis.Modules.Effects.Bubbles.Bubbles"
<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" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Settings.Offsets" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> 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.WindowsProfile.WindowsProfile"
<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" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<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" /> 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.Modules.Games.Overwatch.Overwatch"
<section name="Artemis.Settings.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Settings.RocketLeague" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> 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.Modules.Games.TheDivision.TheDivision"
<section name="Artemis.Settings.TypeWave" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Settings.General" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.Dota2.Dota2"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Overlays.VolumeDisplay.VolumeDisplay"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<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.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> </sectionGroup>
</configSections> </configSections>
<connectionStrings /> <connectionStrings />
@ -323,4 +363,4 @@
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View File

@ -13,6 +13,12 @@ namespace Artemis
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
Environment.Exit(0);
}
public App() public App()
{ {
if (!IsRunAsAdministrator()) if (!IsRunAsAdministrator())
@ -31,11 +37,6 @@ namespace Artemis
return wp.IsInRole(WindowsBuiltInRole.Administrator); return wp.IsInRole(WindowsBuiltInRole.Administrator);
} }
private void Application_Startup(object sender, StartupEventArgs e)
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
}
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{ {
if (DoHandle) if (DoHandle)
@ -50,12 +51,6 @@ namespace Artemis
} }
} }
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
var ex = e.ExceptionObject as Exception;
GetArtemisExceptionViewer(ex).ShowDialog();
}
private static ExceptionViewer GetArtemisExceptionViewer(Exception e) private static ExceptionViewer GetArtemisExceptionViewer(Exception e)
{ {
var logger = LogManager.GetCurrentClassLogger(); var logger = LogManager.GetCurrentClassLogger();

View File

@ -95,6 +95,7 @@ namespace Artemis
protected override void OnExit(object sender, EventArgs e) protected override void OnExit(object sender, EventArgs e)
{ {
_kernel.Dispose(); _kernel.Dispose();
// Enviroment.Exit(0);
base.OnExit(sender, e); base.OnExit(sender, e);
} }

View File

@ -10,7 +10,6 @@ using CUE.NET;
using CUE.NET.Brushes; using CUE.NET.Brushes;
using CUE.NET.Devices.Generic.Enums; using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Devices.Keyboard; using CUE.NET.Devices.Keyboard;
using CUE.NET.Devices.Keyboard.Enums;
using CUE.NET.Devices.Keyboard.Keys; using CUE.NET.Devices.Keyboard.Keys;
using Ninject.Extensions.Logging; using Ninject.Extensions.Logging;
using Point = System.Drawing.Point; using Point = System.Drawing.Point;
@ -121,7 +120,7 @@ namespace Artemis.DeviceProviders.Corsair
{ {
var widthMultiplier = Width/_keyboard.KeyboardRectangle.Width; var widthMultiplier = Width/_keyboard.KeyboardRectangle.Width;
var heightMultiplier = Height/_keyboard.KeyboardRectangle.Height; var heightMultiplier = Height/_keyboard.KeyboardRectangle.Height;
CorsairKey cueKey = null; CorsairKey cueKey = null;
try try
{ {
@ -132,7 +131,7 @@ namespace Artemis.DeviceProviders.Corsair
{ {
// ignored // ignored
} }
if (cueKey != null) if (cueKey != null)
return new KeyMatch(keyCode, (int) (cueKey.KeyRectangle.X*widthMultiplier), return new KeyMatch(keyCode, (int) (cueKey.KeyRectangle.X*widthMultiplier),
(int) (cueKey.KeyRectangle.Y*heightMultiplier)); (int) (cueKey.KeyRectangle.Y*heightMultiplier));

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using CUE.NET.Devices.Keyboard.Enums; using CUE.NET.Devices.Keyboard.Enums;
using CUE.NET.Devices.Keyboard.Keys;
namespace Artemis.DeviceProviders.Corsair.Utilities namespace Artemis.DeviceProviders.Corsair.Utilities
{ {

View File

@ -7,7 +7,6 @@ using Artemis.DeviceProviders.Razer.Utilities;
using Artemis.Properties; using Artemis.Properties;
using Corale.Colore.Core; using Corale.Colore.Core;
using Corale.Colore.Razer; using Corale.Colore.Razer;
using Corale.Colore.Razer.Keyboard;
using Constants = Corale.Colore.Razer.Keyboard.Constants; using Constants = Corale.Colore.Razer.Keyboard.Constants;
namespace Artemis.DeviceProviders.Razer namespace Artemis.DeviceProviders.Razer
@ -31,7 +30,7 @@ namespace Artemis.DeviceProviders.Razer
{ {
if (!Chroma.IsSdkAvailable()) if (!Chroma.IsSdkAvailable())
return false; return false;
// Some people have Synapse installed, but not a Chroma keyboard, deal with this // Some people have Synapse installed, but not a Chroma keyboard, deal with this
var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected; var blackWidowFound = Chroma.Instance.Query(Devices.Blackwidow).Connected;
var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected; var blackWidowTeFound = Chroma.Instance.Query(Devices.BlackwidowTe).Connected;

View File

@ -65,7 +65,7 @@ namespace Artemis.Managers
while (_deviceManager.ChangingKeyboard) while (_deviceManager.ChangingKeyboard)
Thread.Sleep(200); Thread.Sleep(200);
// If still null, no last keyboard, so stop. // If still null, no last keyboard, so stop.
if (_deviceManager.ActiveKeyboard == null) if (_deviceManager.ActiveKeyboard == null)
{ {

View File

@ -1,13 +1,10 @@
using System; using System;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Timers; using System.Timers;
using Artemis.Events; using Artemis.Events;
using Artemis.Models; using Artemis.Models;
using Artemis.Modules.Effects.ProfilePreview;
using Artemis.Utilities.DataReaders; using Artemis.Utilities.DataReaders;
using Artemis.Utilities.GameState; using Artemis.Utilities.GameState;
using Artemis.Utilities.Keyboard;
using Artemis.ViewModels; using Artemis.ViewModels;
using Caliburn.Micro; using Caliburn.Micro;
using Ninject; using Ninject;

View File

@ -23,7 +23,7 @@
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0"> <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
<Label FontSize="20" HorizontalAlignment="Left"> <Label FontSize="20" HorizontalAlignment="Left">
<Label.Content> <Label.Content>
<AccessText TextWrapping="Wrap" <AccessText TextWrapping="Wrap"
Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset" /> Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset" />
</Label.Content> </Label.Content>
</Label> </Label>

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using System.Windows.Media; using System.Windows.Media;
using Artemis.Events; using Artemis.Events;
using Artemis.Managers; using Artemis.Managers;
@ -98,9 +97,7 @@ namespace Artemis.Modules.Games.Overwatch
private void PipeServerOnPipeMessage(string message) private void PipeServerOnPipeMessage(string message)
{ {
_lastMessage = message;
_lastMessage = message;
} }
public override void Update() public override void Update()

View File

@ -18,7 +18,7 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0"> <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
<Label FontSize="20" HorizontalAlignment="Left"> <Label FontSize="20" HorizontalAlignment="Left">
<Label.Content> <Label.Content>

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using Artemis.Managers; using Artemis.Managers;
using Artemis.Models; using Artemis.Models;

View File

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

View File

@ -1,4 +1,5 @@
using Artemis.Models.Interfaces; using Artemis.Models.Interfaces;
using Newtonsoft.Json;
namespace Artemis.Modules.Games.UnrealTournament namespace Artemis.Modules.Games.UnrealTournament
{ {
@ -24,7 +25,6 @@ namespace Artemis.Modules.Games.UnrealTournament
public PlayerState State { get; set; } public PlayerState State { get; set; }
public Inventory Inventory { get; set; } public Inventory Inventory { get; set; }
public Weapon Weapon { get; set; } public Weapon Weapon { get; set; }
public MatchPlayer MatchStatus { get; set; }
} }
public class PlayerState public class PlayerState
@ -32,12 +32,16 @@ namespace Artemis.Modules.Games.UnrealTournament
public string PlayerName { get; set; } public string PlayerName { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public int Score { get; set; } public int Score { get; set; }
[JsonProperty("Team Num")]
public int TeamNum { get; set; } public int TeamNum { get; set; }
public int RankCheck { get; set; } public int RankCheck { get; set; }
[JsonProperty("Duel Rank")]
public int DuelRank { get; set; } public int DuelRank { get; set; }
public int No_of_Duel_Played { get; set; } public int No_of_Duel_Played { get; set; }
[JsonProperty("CTF Rank")]
public int CTFRank { get; set; } public int CTFRank { get; set; }
public int No_CTF_MatchesPlayed { get; set; } public int No_CTF_MatchesPlayed { get; set; }
[JsonProperty("TDM Rank")]
public int TDMRank { get; set; } public int TDMRank { get; set; }
public int No_TDM_MatchesPlayed { get; set; } public int No_TDM_MatchesPlayed { get; set; }
public int DMRank { get; set; } public int DMRank { get; set; }
@ -73,7 +77,7 @@ namespace Artemis.Modules.Games.UnrealTournament
Unzoomed = 0, Unzoomed = 0,
Zoomed = 3, Zoomed = 3,
ZoomingIn = 2, ZoomingIn = 2,
ZoomingOut = 1, ZoomingOut = 1
} }
public class Environment public class Environment
@ -97,22 +101,4 @@ namespace Artemis.Modules.Games.UnrealTournament
public int ForceRespawnTime { get; set; } public int ForceRespawnTime { get; set; }
} }
public class MatchPlayer
{
public string PlayerName { get; set; }
public string UniqueId { get; set; }
public int Score { get; set; }
public int TeamNum { get; set; }
public int RankCheck { get; set; }
public int DuelRank { get; set; }
public int No_of_Duel_Played { get; set; }
public int CTFRank { get; set; }
public int No_CTF_MatchesPlayed { get; set; }
public int TDMRank { get; set; }
public int No_TDM_MatchesPlayed { get; set; }
public int DMRank { get; set; }
public int No_DM_Matches_Played { get; set; }
public int ShowdownRank { get; set; }
public int No_Showdowns { get; set; }
}
} }

View File

@ -2,7 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using Artemis.Managers; using Artemis.Managers;
using Artemis.Models; using Artemis.Models;
using Artemis.Modules.Games.CounterStrike;
using Artemis.Profiles.Layers.Models; using Artemis.Profiles.Layers.Models;
using Artemis.Utilities.Memory; using Artemis.Utilities.Memory;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -52,7 +51,6 @@ namespace Artemis.Modules.Games.UnrealTournament
{ {
//ignored //ignored
} }
} }
public override void Update() public override void Update()

View File

@ -20,7 +20,7 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0"> <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
<Label FontSize="20" HorizontalAlignment="Left"> <Label FontSize="20" HorizontalAlignment="Left">
<Label.Content> <Label.Content>

View File

@ -80,7 +80,8 @@ namespace Artemis.Modules.Games.Witcher3
archive.ExtractToDirectory(folder + @"witcher3-mod", true); archive.ExtractToDirectory(folder + @"witcher3-mod", true);
System.Diagnostics.Process.Start(new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3")); System.Diagnostics.Process.Start(
new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
return; return;
} }
} }

View File

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

View File

@ -142,12 +142,6 @@ namespace Artemis.Modules.Games.WorldofWarcraft
objectTYPE = 0x10 objectTYPE = 0x10
} }
public class ObjectManagerClass
{
public static uint clientConnection;
public static uint sCurMgr;
}
public enum Party public enum Party
{ {
NumOfPlayers = 200, NumOfPlayers = 200,
@ -252,5 +246,11 @@ namespace Artemis.Modules.Games.WorldofWarcraft
{ {
CGUnit_C__GetFacing = 0x35 CGUnit_C__GetFacing = 0x35
} }
public class ObjectManagerClass
{
public static uint clientConnection;
public static uint sCurMgr;
}
} }
} }

View File

@ -2,7 +2,6 @@
using Artemis.Managers; using Artemis.Managers;
using Artemis.Models; using Artemis.Models;
using Artemis.Profiles.Layers.Models; using Artemis.Profiles.Layers.Models;
using Artemis.Utilities;
using Artemis.Utilities.Memory; using Artemis.Utilities.Memory;
namespace Artemis.Modules.Games.WorldofWarcraft namespace Artemis.Modules.Games.WorldofWarcraft
@ -51,7 +50,5 @@ namespace Artemis.Modules.Games.WorldofWarcraft
{ {
return Profile.GetRenderLayers(DataModel, keyboardOnly); return Profile.GetRenderLayers(DataModel, keyboardOnly);
} }
} }
} }

View File

@ -1,4 +1,5 @@
using System.Windows; using System;
using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Artemis.Profiles.Layers.Interfaces; using Artemis.Profiles.Layers.Interfaces;
using Artemis.Profiles.Layers.Models; using Artemis.Profiles.Layers.Models;
@ -7,10 +8,16 @@ namespace Artemis.Profiles.Layers.Animations
{ {
public class GrowAnimation : ILayerAnimation public class GrowAnimation : ILayerAnimation
{ {
private DateTime _lastUpdate;
public string Name { get; } = "Grow"; public string Name { get; } = "Grow";
public void Update(LayerModel layerModel, bool updateAnimations) public void Update(LayerModel layerModel, bool updateAnimations)
{ {
// Reset animation progress if layer wasn't drawn for 100ms
if (new TimeSpan(0, 0, 0, 0, 100) < DateTime.Now - _lastUpdate)
layerModel.Properties.AnimationProgress = 0;
_lastUpdate = DateTime.Now;
var progress = layerModel.Properties.AnimationProgress; var progress = layerModel.Properties.AnimationProgress;
if (MustExpire(layerModel)) if (MustExpire(layerModel))

View File

@ -8,11 +8,18 @@ namespace Artemis.Profiles.Layers.Animations
{ {
public class PulseAnimation : ILayerAnimation public class PulseAnimation : ILayerAnimation
{ {
private DateTime _lastUpdate;
public string Name { get; } = "Pulse"; public string Name { get; } = "Pulse";
public void Update(LayerModel layerModel, bool updateAnimations) public void Update(LayerModel layerModel, bool updateAnimations)
{ {
// Reset animation progress if layer wasn't drawn for 100ms
if (new TimeSpan(0, 0, 0, 0, 100) < DateTime.Now - _lastUpdate)
layerModel.Properties.AnimationProgress = 0;
_lastUpdate = DateTime.Now;
var progress = layerModel.Properties.AnimationProgress; var progress = layerModel.Properties.AnimationProgress;
if (MustExpire(layerModel)) if (MustExpire(layerModel))
progress = 0; progress = 0;
progress = progress + layerModel.Properties.AnimationSpeed/2; progress = progress + layerModel.Properties.AnimationSpeed/2;

View File

@ -8,6 +8,7 @@ namespace Artemis.Profiles.Layers.Interfaces
{ {
[JsonIgnore] [JsonIgnore]
string Name { get; } string Name { get; }
void Update(LayerModel layerModel, bool updateAnimations); void Update(LayerModel layerModel, bool updateAnimations);
void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c); void Draw(LayerPropertiesModel props, LayerPropertiesModel applied, DrawingContext c);
bool MustExpire(LayerModel layer); bool MustExpire(LayerModel layer);

View File

@ -68,7 +68,7 @@ namespace Artemis.Profiles.Layers.Models
public Rect GetRect(int scale = 4) public Rect GetRect(int scale = 4)
{ {
return new Rect(X * scale, Y * scale, Width * scale, Height * scale); return new Rect(X*scale, Y*scale, Width*scale, Height*scale);
} }
} }
} }

View File

@ -44,7 +44,8 @@
VerticalAlignment="Top" Height="18" Width="130" /> VerticalAlignment="Top" Height="18" Width="130" />
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}" <Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit"> BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134" VerticalAlignment="Top" /> <ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134"
VerticalAlignment="Top" />
</Border> </Border>
</StackPanel> </StackPanel>

View File

@ -20,14 +20,14 @@ namespace Artemis.Profiles.Layers.Types.Audio
{ {
internal class AudioType : ILayerType internal class AudioType : ILayerType
{ {
private readonly List<LayerModel> _audioLayers = new List<LayerModel>();
private readonly MMDevice _device; private readonly MMDevice _device;
private readonly MainManager _mainManager; private readonly MainManager _mainManager;
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(2048); private readonly SampleAggregator _sampleAggregator = new SampleAggregator(2048);
private readonly WasapiLoopbackCapture _waveIn; private readonly WasapiLoopbackCapture _waveIn;
private readonly List<LayerModel> _audioLayers = new List<LayerModel>();
private int _lines; private int _lines;
private AudioPropertiesModel _properties;
private AudioPropertiesModel _previousSettings; private AudioPropertiesModel _previousSettings;
private AudioPropertiesModel _properties;
public AudioType(MainManager mainManager) public AudioType(MainManager mainManager)
{ {
@ -107,6 +107,26 @@ namespace Artemis.Profiles.Layers.Types.Audio
} }
} }
public void SetupProperties(LayerModel layerModel)
{
if (layerModel.Properties is AudioPropertiesModel)
return;
layerModel.Properties = new AudioPropertiesModel(layerModel.Properties)
{
FadeSpeed = 0.2,
Sensitivity = 2
};
}
public LayerPropertiesViewModel SetupViewModel(LayerPropertiesViewModel layerPropertiesViewModel,
List<ILayerAnimation> layerAnimations, IDataModel dataModel, LayerModel proposedLayer)
{
if (layerPropertiesViewModel is AudioPropertiesViewModel)
return layerPropertiesViewModel;
return new AudioPropertiesViewModel(proposedLayer, dataModel);
}
private void CompareSettings(LayerModel layerModel) private void CompareSettings(LayerModel layerModel)
{ {
var settings = (AudioPropertiesModel) layerModel.Properties; var settings = (AudioPropertiesModel) layerModel.Properties;
@ -133,26 +153,6 @@ namespace Artemis.Profiles.Layers.Types.Audio
} }
} }
public void SetupProperties(LayerModel layerModel)
{
if (layerModel.Properties is AudioPropertiesModel)
return;
layerModel.Properties = new AudioPropertiesModel(layerModel.Properties)
{
FadeSpeed = 0.2,
Sensitivity = 2
};
}
public LayerPropertiesViewModel SetupViewModel(LayerPropertiesViewModel layerPropertiesViewModel,
List<ILayerAnimation> layerAnimations, IDataModel dataModel, LayerModel proposedLayer)
{
if (layerPropertiesViewModel is AudioPropertiesViewModel)
return layerPropertiesViewModel;
return new AudioPropertiesViewModel(proposedLayer, dataModel);
}
private void FftCalculated(object sender, FftEventArgs e) private void FftCalculated(object sender, FftEventArgs e)
{ {
lock (SpectrumData) lock (SpectrumData)

View File

@ -44,7 +44,8 @@
VerticalAlignment="Top" Height="18" Width="130" /> VerticalAlignment="Top" Height="18" Width="130" />
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}" <Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit"> BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134" VerticalAlignment="Top" /> <ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" Height="24" Width="134"
VerticalAlignment="Top" />
</Border> </Border>
</StackPanel> </StackPanel>

View File

@ -63,7 +63,7 @@ namespace Artemis.Profiles
// Remove the clip // Remove the clip
c.Pop(); c.Pop();
} }
using (var bmp = ImageUtilities.DrawingVisualToBitmap(visual, keyboardRect)) using (var bmp = ImageUtilities.DrawingVisualToBitmap(visual, keyboardRect))
keyboard.DrawImage(bmp, new PointF(0, 0)); keyboard.DrawImage(bmp, new PointF(0, 0));
} }
@ -177,7 +177,7 @@ namespace Artemis.Profiles
{ {
foreach (var layer in GetLayers()) foreach (var layer in GetLayers())
{ {
if (!layer.LayerType.ShowInEdtor || if (!layer.LayerType.ShowInEdtor ||
!(Math.Abs(layer.Properties.Width - Width) < 0.01) || !(Math.Abs(layer.Properties.Width - Width) < 0.01) ||
!(Math.Abs(layer.Properties.Height - Height) < 0.01)) !(Math.Abs(layer.Properties.Height - Height) < 0.01))
continue; continue;

View File

@ -118,7 +118,7 @@ namespace Artemis.Utilities
if (brush is RadialGradientBrush) if (brush is RadialGradientBrush)
{ {
var randomBrush = (RadialGradientBrush)brush.CloneCurrentValue(); var randomBrush = (RadialGradientBrush) brush.CloneCurrentValue();
var rand = GetRandomRainbowMediaColor(); var rand = GetRandomRainbowMediaColor();
foreach (var stop in randomBrush.GradientStops) foreach (var stop in randomBrush.GradientStops)
stop.Color = System.Windows.Media.Color.FromArgb(stop.Color.A, rand.R, rand.G, rand.B); stop.Color = System.Windows.Media.Color.FromArgb(stop.Color.A, rand.R, rand.G, rand.B);

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
using Ninject; using Ninject;

View File

@ -1,6 +1,5 @@
using System; using System;
using System.IO; using System.IO;
using Artemis.Modules.Games.Overwatch;
using Artemis.Properties; using Artemis.Properties;
using Microsoft.Win32; using Microsoft.Win32;
using NLog; using NLog;
@ -11,6 +10,23 @@ namespace Artemis.Utilities.DataReaders
{ {
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
#region Razer
public static void PlaceRazerDll(string path)
{
try
{
File.WriteAllBytes(path + @"\RzChromaSDK64.dll", Resources.RzChromaSDK64);
Logger.Debug("Successfully placed Razer DLL in {0}", path);
}
catch (Exception e)
{
Logger.Error(e, "Couldn't place Razer DLL in {0}", path);
}
}
#endregion
#region Logitech #region Logitech
private const string LogitechPath = @"C:\Program Files\Logitech Gaming Software\SDK\LED\x64\"; private const string LogitechPath = @"C:\Program Files\Logitech Gaming Software\SDK\LED\x64\";
@ -95,22 +111,5 @@ namespace Artemis.Utilities.DataReaders
} }
#endregion #endregion
#region Razer
public static void PlaceRazerDll(string path)
{
try
{
File.WriteAllBytes(path + @"\RzChromaSDK64.dll", Resources.RzChromaSDK64);
Logger.Debug("Successfully placed Razer DLL in {0}", path);
}
catch (Exception e)
{
Logger.Error(e, "Couldn't place Razer DLL in {0}", path);
}
}
#endregion
} }
} }

View File

@ -3,7 +3,6 @@ using System.IO.Pipes;
using System.Security.AccessControl; using System.Security.AccessControl;
using System.Security.Principal; using System.Security.Principal;
using System.Text; using System.Text;
using System.Threading.Tasks;
using Ninject.Extensions.Logging; using Ninject.Extensions.Logging;
namespace Artemis.Utilities.DataReaders namespace Artemis.Utilities.DataReaders
@ -16,13 +15,14 @@ namespace Artemis.Utilities.DataReaders
private readonly ILogger _logger; private readonly ILogger _logger;
private string _pipeName; private string _pipeName;
private NamedPipeServerStream _pipeServer; private NamedPipeServerStream _pipeServer;
public event DelegateMessage PipeMessage;
public PipeServer(ILogger logger) public PipeServer(ILogger logger)
{ {
_logger = logger; _logger = logger;
} }
public event DelegateMessage PipeMessage;
public void Start(string pipeName) public void Start(string pipeName)
{ {
_pipeName = pipeName; _pipeName = pipeName;

View File

@ -34,10 +34,10 @@ namespace Artemis.Utilities
{ {
var completeFileName = Path.Combine(destinationDirectoryName, file.FullName); var completeFileName = Path.Combine(destinationDirectoryName, file.FullName);
Directory.CreateDirectory(Path.GetDirectoryName(completeFileName)); Directory.CreateDirectory(Path.GetDirectoryName(completeFileName));
if (file.Name == "") if (file.Name == "")
continue; continue;
file.ExtractToFile(completeFileName, true); file.ExtractToFile(completeFileName, true);
} }
} }

View File

@ -50,7 +50,7 @@ namespace Artemis.Utilities
if (ReferenceEquals(source, null)) if (ReferenceEquals(source, null))
return default(T); return default(T);
return (T)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(source), source.GetType()); return (T) JsonConvert.DeserializeObject(JsonConvert.SerializeObject(source), source.GetType());
} }
public static object GetPropertyValue(object o, string path) public static object GetPropertyValue(object o, string path)

View File

@ -38,7 +38,8 @@ namespace Artemis.Utilities.Memory
return address; return address;
} }
public static T ReadMultilevelPointer<T>(this IMemory memory, IntPtr address, params int[] offsets) where T : struct public static T ReadMultilevelPointer<T>(this IMemory memory, IntPtr address, params int[] offsets)
where T : struct
{ {
for (var i = 0; i < offsets.Length - 1; i++) for (var i = 0; i < offsets.Length - 1; i++)
{ {

View File

@ -25,19 +25,19 @@ namespace Artemis.ViewModels.Profiles
new NamedOperator("Not equal to", "!=") new NamedOperator("Not equal to", "!=")
}; };
private readonly NamedOperator[] _operators =
{
new NamedOperator("Equal to", "=="),
new NamedOperator("Not equal to", "!=")
};
private readonly NamedOperator[] _stringOperators = private readonly NamedOperator[] _stringOperators =
{ {
new NamedOperator("Equal to", "=="), new NamedOperator("Equal to", "=="),
new NamedOperator("Not equal to", "!="), new NamedOperator("Not equal to", "!="),
new NamedOperator("Contains", ".Contains"), new NamedOperator("Contains", ".Contains"),
new NamedOperator("Starts with", ".StartsWith"), new NamedOperator("Starts with", ".StartsWith"),
new NamedOperator("Ends with", ".EndsWith"), new NamedOperator("Ends with", ".EndsWith")
};
private readonly NamedOperator[] _operators =
{
new NamedOperator("Equal to", "=="),
new NamedOperator("Not equal to", "!=")
}; };
private bool _enumValueIsVisible; private bool _enumValueIsVisible;

View File

@ -10,7 +10,6 @@ using Artemis.Managers;
using Artemis.Modules.Effects.ProfilePreview; using Artemis.Modules.Effects.ProfilePreview;
using Artemis.Profiles; using Artemis.Profiles;
using Artemis.Profiles.Layers.Models; using Artemis.Profiles.Layers.Models;
using Artemis.Profiles.Layers.Types.Keyboard;
using Artemis.Properties; using Artemis.Properties;
using Artemis.Utilities; using Artemis.Utilities;
using Caliburn.Micro; using Caliburn.Micro;

View File

@ -1,5 +1,4 @@
using System.Diagnostics; using System.Windows.Controls;
using System.Windows.Controls;
using System.Windows.Navigation; using System.Windows.Navigation;
namespace Artemis.Views namespace Artemis.Views
@ -16,7 +15,8 @@ namespace Artemis.Views
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{ {
System.Diagnostics.Process.Start("https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)"); System.Diagnostics.Process.Start(
"https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)");
} }
} }
} }

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Caliburn.Micro" version="3.0.1" targetFramework="net452" /> <package id="Caliburn.Micro" version="3.0.1" targetFramework="net452" />
<package id="Caliburn.Micro.Core" version="3.0.1" targetFramework="net452" /> <package id="Caliburn.Micro.Core" version="3.0.1" targetFramework="net452" />