diff --git a/Artemis/Artemis/App.config b/Artemis/Artemis/App.config index 4abfc6fbb..1e8822674 100644 --- a/Artemis/Artemis/App.config +++ b/Artemis/Artemis/App.config @@ -2,56 +2,23 @@ - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index 9e09dda4f..d284a598a 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -156,10 +156,6 @@ ..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll True - - ..\packages\ImageLibrary.2.0.5\lib\net45\Kaliko.ImageLibrary.dll - True - ..\packages\log4net.2.0.5\lib\net45-full\log4net.dll True @@ -199,18 +195,6 @@ ..\packages\NLog.4.3.4\lib\net45\NLog.dll True - - ..\packages\SharpDX.3.0.2\lib\net45\SharpDX.dll - True - - - ..\packages\SharpDX.Direct3D11.3.0.2\lib\net45\SharpDX.Direct3D11.dll - True - - - ..\packages\SharpDX.DXGI.3.0.2\lib\net45\SharpDX.DXGI.dll - True - ..\packages\SpotifyAPI-NET.2.9.0\lib\SpotifyAPI.dll True @@ -326,13 +310,6 @@ - - - - AmbientLightningEffectView.xaml - - - AudioVisualization.settings True @@ -673,10 +650,6 @@ - - Designer - MSBuild:Compile - MSBuild:Compile Designer diff --git a/Artemis/Artemis/InjectionModules/ArtemisModules.cs b/Artemis/Artemis/InjectionModules/ArtemisModules.cs index 368eca467..bc882aa9f 100644 --- a/Artemis/Artemis/InjectionModules/ArtemisModules.cs +++ b/Artemis/Artemis/InjectionModules/ArtemisModules.cs @@ -27,7 +27,6 @@ namespace Artemis.InjectionModules Bind().To().InSingletonScope(); Bind().To().InSingletonScope(); Bind().To().InSingletonScope(); - //Bind().To().InSingletonScope(); // Games Bind().To().InSingletonScope(); diff --git a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectModel.cs b/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectModel.cs deleted file mode 100644 index 09e15e681..000000000 --- a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectModel.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Linq; -using System.Windows.Forms; -using Artemis.Managers; -using Artemis.Models; -using Artemis.Models.Profiles; -using Artemis.Utilities.Keyboard; - -namespace Artemis.Modules.Effects.AmbientLightning -{ - internal class AmbientLightningEffectModel : EffectModel - { - private KeyboardRectangle _botRect; - private List _colors; - private List _rectangles; - private ScreenCapture _screenCapturer; - private KeyboardRectangle _topRect; - - public AmbientLightningEffectModel(MainManager mainManager, AmbientLightningEffectSettings settings) - : base(mainManager, null) - { - Name = "Ambient Lightning"; - Settings = settings; - Scale = 4; - Initialized = false; - } - - public int Scale { get; set; } - - public AmbientLightningEffectSettings Settings { get; set; } - - public KeyboardRectangle KeyboardRectangle { get; set; } - - public override void Dispose() - { - Initialized = false; - - _screenCapturer.Dispose(); - _screenCapturer = null; - } - - public override void Enable() - { - Initialized = false; - - _colors = new List(); - _screenCapturer = new ScreenCapture(); - _topRect = new KeyboardRectangle(MainManager.DeviceManager.ActiveKeyboard, 0, 0, new List(), - LinearGradientMode.Horizontal) {Height = MainManager.DeviceManager.ActiveKeyboard.Height*Scale/2}; - _botRect = new KeyboardRectangle(MainManager.DeviceManager.ActiveKeyboard, 0, 0, new List(), - LinearGradientMode.Horizontal); - - Initialized = true; - } - - public override void Update() - { - var capture = _screenCapturer.Capture(); - if (capture == null) - return; - - _rectangles = new List(); - // Analise the result - // Chop the screen into 2 rows and 3 columns - var resolution = Screen.PrimaryScreen.Bounds; - var blockWidth = resolution.Width/3; - var blockHeight = resolution.Height/2; - var colorIndex = 0; - for (var row = 0; row < 2; row++) - { - for (var column = 0; column < 3; column++) - { - var blockBase = new Point(blockWidth*column, blockHeight*row); - var samples = new List(); - // For each block, take samples - for (var blockRow = 0; blockRow < 6; blockRow++) - { - for (var blockColumn = 0; blockColumn < 6; blockColumn++) - { - var x = blockWidth/6*blockColumn + blockWidth/6/4 + blockBase.X; - var y = blockHeight/6*blockRow + blockHeight/6/4 + blockBase.Y; - samples.Add(_screenCapturer.GetColor(capture, new Point(x, y))); - } - } - - // Take the average of the samples - var averageR = samples.Sum(s => s.R)/samples.Count; - var averageG = samples.Sum(s => s.G)/samples.Count; - var averageB = samples.Sum(s => s.B)/samples.Count; - - if (_colors.Count <= colorIndex) - _colors.Add(Color.FromArgb(255, averageR, averageG, averageB)); - else - _colors[colorIndex] = Color.FromArgb(255, (averageR + _colors[colorIndex].R*5)/6, - (averageG + _colors[colorIndex].G*5)/6, (averageB + _colors[colorIndex].B*5)/6); - colorIndex++; - } - } - - // Put the resulting colors in 6 rectangles, their size differs per keyboard - var rectWidth = MainManager.DeviceManager.ActiveKeyboard.Width/3*Scale; - var rectHeight = MainManager.DeviceManager.ActiveKeyboard.Height/2*Scale; - for (var row = 0; row < 2; row++) - { - for (var column = 0; column < 3; column++) - { - var rectBase = new Point(rectWidth*column, rectHeight*row); - _rectangles.Add(new Rectangle(rectBase.X, rectBase.Y, rectWidth, rectHeight)); - } - } - } - - public override List GetRenderLayers(bool renderMice, bool renderHeadsets) - { - return null; - } - } -} \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectSettings.cs b/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectSettings.cs deleted file mode 100644 index 28685ccf1..000000000 --- a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectSettings.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Drawing.Drawing2D; -using Artemis.Models; - -namespace Artemis.Modules.Effects.AmbientLightning -{ - internal class AmbientLightningEffectSettings : EffectSettings - { - public AmbientLightningEffectSettings() - { - Load(); - } - - public int Width { get; set; } - public int Height { get; set; } - public bool Rotate { get; set; } - public int Scale { get; set; } - public LinearGradientMode Type { get; set; } - - public sealed override void Load() - { - ToDefault(); - } - - public sealed override void Save() - { - } - - public sealed override void ToDefault() - { - Width = 84; - Height = 24; - Scale = 4; - Type = LinearGradientMode.Horizontal; - Rotate = true; - } - } -} \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectView.xaml b/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectView.xaml deleted file mode 100644 index 3621b1189..000000000 --- a/Artemis/Artemis/Modules/Effects/AmbientLightning/AmbientLightningEffectView.xaml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -