mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
Resharper cleanup on entire project
This commit is contained in:
parent
c52be47e9f
commit
a3b983fb9c
@ -2,21 +2,50 @@
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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" />
|
||||
<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 name="userSettings"
|
||||
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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" />
|
||||
<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>
|
||||
</configSections>
|
||||
<connectionStrings />
|
||||
|
||||
@ -76,7 +76,7 @@ namespace Artemis.KeyboardProviders.Corsair
|
||||
case "K95 RGB":
|
||||
Height = 7;
|
||||
Width = 25;
|
||||
PreviewSettings = new PreviewSettings(626, 175, new Thickness(0,-15,0,0), Resources.k95);
|
||||
PreviewSettings = new PreviewSettings(626, 175, new Thickness(0, -15, 0, 0), Resources.k95);
|
||||
KeyboardRegions.Add(new KeyboardRegion("TopRow", new Point(0, 1), new Point(20, 1)));
|
||||
KeyboardRegions.Add(new KeyboardRegion("NumPad", new Point(21, 2), new Point(25, 7)));
|
||||
KeyboardRegions.Add(new KeyboardRegion("QWER", new Point(5, 3), new Point(8, 3)));
|
||||
|
||||
@ -15,6 +15,7 @@ namespace Artemis.KeyboardProviders
|
||||
public Point TopLeft { get; set; }
|
||||
public Point BottomRight { get; set; }
|
||||
|
||||
public Rectangle GetRectangle() => new Rectangle(TopLeft.X, TopLeft.Y, BottomRight.X - TopLeft.X, BottomRight.Y - TopLeft.Y);
|
||||
public Rectangle GetRectangle()
|
||||
=> new Rectangle(TopLeft.X, TopLeft.Y, BottomRight.X - TopLeft.X, BottomRight.Y - TopLeft.Y);
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,6 @@ using System.Windows;
|
||||
using Artemis.KeyboardProviders.Logitech.Utilities;
|
||||
using Artemis.Properties;
|
||||
using Artemis.Utilities;
|
||||
using Artemis.Utilities.LogitechDll;
|
||||
using Point = System.Drawing.Point;
|
||||
|
||||
namespace Artemis.KeyboardProviders.Logitech
|
||||
@ -27,7 +26,7 @@ namespace Artemis.KeyboardProviders.Logitech
|
||||
new KeyboardRegion("TopRow", new Point(0, 0), new Point(18, 0)),
|
||||
new KeyboardRegion("NumPad", new Point(17, 1), new Point(21, 6)),
|
||||
new KeyboardRegion("QWER", new Point(2, 2), new Point(5, 2))
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
public override bool CanEnable()
|
||||
|
||||
@ -146,7 +146,7 @@ namespace Artemis.KeyboardProviders.Logitech.Utilities
|
||||
new KeyMapping(120, 121),
|
||||
new KeyMapping(121, 122),
|
||||
new KeyMapping(122, 123),
|
||||
new KeyMapping(124, 124),
|
||||
new KeyMapping(124, 124)
|
||||
};
|
||||
|
||||
public static byte[] BitmapToByteArray(Bitmap b, bool remap = true)
|
||||
@ -171,10 +171,10 @@ namespace Artemis.KeyboardProviders.Logitech.Utilities
|
||||
var remapped = new byte[pixels.Length];
|
||||
|
||||
// Every key is 4 bytes
|
||||
for (var i = 0; i <= pixels.Length /4; i++)
|
||||
for (var i = 0; i <= pixels.Length/4; i++)
|
||||
{
|
||||
var firstSByte = Keymappings[i].Source * 4;
|
||||
var firstTByte = Keymappings[i].Target * 4;
|
||||
var firstSByte = Keymappings[i].Source*4;
|
||||
var firstTByte = Keymappings[i].Target*4;
|
||||
|
||||
for (var j = 0; j < 4; j++)
|
||||
remapped[firstTByte + j] = pixels[firstSByte + j];
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using Artemis.Utilities;
|
||||
using Corale.Colore.Razer.Keyboard.Effects;
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ namespace Artemis.Managers
|
||||
private readonly MainManager _mainManager;
|
||||
private EffectModel _activeEffect;
|
||||
private bool _clearing;
|
||||
public EffectModel PauseEffect { get; set; }
|
||||
|
||||
public EffectManager(MainManager mainManager, IEventAggregator events)
|
||||
{
|
||||
@ -32,6 +31,8 @@ namespace Artemis.Managers
|
||||
Logger.Info("Intialized EffectManager");
|
||||
}
|
||||
|
||||
public EffectModel PauseEffect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by ViewModels to show a preview of the profile currently being edited
|
||||
/// </summary>
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models.Interfaces;
|
||||
using Artemis.Models.Profiles;
|
||||
using Artemis.Modules.Games.Witcher3;
|
||||
|
||||
namespace Artemis.Models
|
||||
{
|
||||
public abstract class GameModel : EffectModel
|
||||
{
|
||||
protected GameModel(MainManager mainManager, GameSettings settings) : base(mainManager)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
public GameSettings Settings { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public string ProcessName { get; set; }
|
||||
public IGameDataModel GameDataModel { get; set; }
|
||||
public ProfileModel Profile { get; set; }
|
||||
|
||||
protected GameModel(MainManager mainManager, GameSettings settings) : base(mainManager)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,7 @@ namespace Artemis.Models.Profiles
|
||||
if (layerProp == null || userProp == null)
|
||||
return;
|
||||
|
||||
var percentage = ToDouble(gameProperty) / percentageSource;
|
||||
var percentage = ToDouble(gameProperty)/percentageSource;
|
||||
layerProp.SetValue(props, (int) (percentage*(int) userProp.GetValue(userProps, null)));
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
using Artemis.Utilities;
|
||||
using Artemis.Utilities.Keyboard;
|
||||
using Kaliko.ImageLibrary;
|
||||
using Kaliko.ImageLibrary.Filters;
|
||||
@ -54,7 +53,7 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
LinearGradientMode.Horizontal) {Height = MainManager.KeyboardManager.ActiveKeyboard.Height*Scale/2};
|
||||
_botRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>(),
|
||||
LinearGradientMode.Horizontal);
|
||||
|
||||
|
||||
Initialized = true;
|
||||
}
|
||||
|
||||
@ -96,7 +95,8 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
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);
|
||||
_colors[colorIndex] = Color.FromArgb(255, (averageR + _colors[colorIndex].R*5)/6,
|
||||
(averageG + _colors[colorIndex].G*5)/6, (averageB + _colors[colorIndex].B*5)/6);
|
||||
colorIndex++;
|
||||
}
|
||||
}
|
||||
@ -108,7 +108,7 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
{
|
||||
for (var column = 0; column < 3; column++)
|
||||
{
|
||||
var rectBase = new Point(rectWidth * column, rectHeight * row);
|
||||
var rectBase = new Point(rectWidth*column, rectHeight*row);
|
||||
_rectangles.Add(new Rectangle(rectBase.X, rectBase.Y, rectWidth, rectHeight));
|
||||
}
|
||||
}
|
||||
@ -133,7 +133,6 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
test.SaveBmp(ms);
|
||||
ms.Position = 0;
|
||||
return new Bitmap(ms);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,55 +1,55 @@
|
||||
<UserControl x:Class="Artemis.Modules.Effects.AmbientLightning.AmbientLightningEffectView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.Modules.Effects.AmbientLightning"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="475.392" d:DesignWidth="583.577">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<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" Margin="0,0,1,0">
|
||||
<Label FontSize="20" MaxWidth="500" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="Colors the keyboard according to what is on screen" />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable effect" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
|
||||
ToolTip="Note: You can't enable an effect when Artemis is disabled"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="8" 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 VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<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" Margin="0,0,1,0">
|
||||
<Label FontSize="20" MaxWidth="500" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="Colors the keyboard according to what is on screen" />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable effect" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
|
||||
ToolTip="Note: You can't enable an effect when Artemis is disabled"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="8" 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>
|
||||
</UserControl>
|
||||
@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.Modules.Effects.AmbientLightning
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for AmbientLightningEffectView.xaml
|
||||
/// Interaction logic for AmbientLightningEffectView.xaml
|
||||
/// </summary>
|
||||
public partial class AmbientLightningEffectView : UserControl
|
||||
{
|
||||
@ -25,4 +12,4 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ namespace Artemis.Modules.Effects.AmbientLightning
|
||||
private readonly Factory1 _factory;
|
||||
private readonly Texture2D _screenTexture;
|
||||
private DataStream _dataStream;
|
||||
private OutputDuplication _duplicatedOutput;
|
||||
private readonly OutputDuplication _duplicatedOutput;
|
||||
private Resource _screenResource;
|
||||
private Surface _screenSurface;
|
||||
|
||||
|
||||
@ -47,8 +47,8 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
return;
|
||||
|
||||
_waves.Add(Settings.IsRandomColors
|
||||
? new Wave(new Point(keyMatch.PosX * Scale, keyMatch.PosY * Scale), 0, _randomColor)
|
||||
: new Wave(new Point(keyMatch.PosX * Scale, keyMatch.PosY * Scale), 0,
|
||||
? new Wave(new Point(keyMatch.PosX*Scale, keyMatch.PosY*Scale), 0, _randomColor)
|
||||
: new Wave(new Point(keyMatch.PosX*Scale, keyMatch.PosY*Scale), 0,
|
||||
ColorHelpers.ToDrawingColor(Settings.WaveColor)));
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
// TODO: Get from settings
|
||||
var fps = 25;
|
||||
|
||||
_waves[i].Size += Settings.SpreadSpeed * Scale;
|
||||
_waves[i].Size += Settings.SpreadSpeed*Scale;
|
||||
|
||||
if (Settings.IsShiftColors)
|
||||
_waves[i].Color = ColorHelpers.ShiftColor(_waves[i].Color, Settings.ShiftColorSpeed);
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
using Artemis.Utilities.GameState;
|
||||
|
||||
@ -1,16 +1,15 @@
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Properties;
|
||||
using Artemis.ViewModels;
|
||||
using Artemis.ViewModels.Abstract;
|
||||
|
||||
namespace Artemis.Modules.Games.CounterStrike
|
||||
{
|
||||
public class CounterStrikeViewModel : GameViewModel<CounterStrikeDataModel>
|
||||
{
|
||||
public CounterStrikeViewModel(MainManager mainManager) : base(mainManager, new CounterStrikeModel(mainManager, new CounterStrikeSettings()))
|
||||
public CounterStrikeViewModel(MainManager mainManager)
|
||||
: base(mainManager, new CounterStrikeModel(mainManager, new CounterStrikeSettings()))
|
||||
{
|
||||
// Create effect model and add it to MainManager
|
||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
||||
|
||||
@ -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.Dota2" GeneratedClassName="Dota2">
|
||||
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
||||
GeneratedClassNamespace="Artemis.Modules.Games.Dota2" GeneratedClassName="Dota2">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
||||
|
||||
@ -225,4 +225,4 @@
|
||||
public int gold_unreliable { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,37 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Media;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using Artemis.Models;
|
||||
|
||||
namespace Artemis.Modules.Games.Dota2
|
||||
{
|
||||
class Dota2Settings : GameSettings
|
||||
internal class Dota2Settings : GameSettings
|
||||
{
|
||||
|
||||
public Dota2Settings()
|
||||
{
|
||||
Load();
|
||||
}
|
||||
|
||||
|
||||
#region Variables
|
||||
public string GameDirectory { get; set; }
|
||||
public bool CanCastAbility { get; set; }
|
||||
public bool ShowHealth { get; set; }
|
||||
public bool ShowDayCycle { get; set; }
|
||||
public bool ShowMana { get; set; }
|
||||
public bool ShowEvents { get; set; }
|
||||
public Color MainColor { get; set; }
|
||||
public Color ManaColor { get; set; }
|
||||
public string KeyboardLayout { get; set; }
|
||||
public Color AbilityCooldownColor { get; set; }
|
||||
public Color AbilityReadyColor { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
KeyboardLayout = Dota2.Default.KeyboardLayout;
|
||||
@ -68,21 +47,35 @@ namespace Artemis.Modules.Games.Dota2
|
||||
|
||||
public override void ToDefault()
|
||||
{
|
||||
|
||||
Enabled = true;
|
||||
GameDirectory = string.Empty;
|
||||
|
||||
KeyboardLayout = "Default";
|
||||
MainColor = Color.FromArgb(255,255,0,0);
|
||||
ManaColor = Color.FromArgb(255,0,0,255);
|
||||
AbilityCooldownColor = Color.FromArgb(255,106,90,205);
|
||||
AbilityReadyColor = Color.FromArgb(255, 0, 255, 0);
|
||||
MainColor = Color.FromArgb(255, 255, 0, 0);
|
||||
ManaColor = Color.FromArgb(255, 0, 0, 255);
|
||||
AbilityCooldownColor = Color.FromArgb(255, 106, 90, 205);
|
||||
AbilityReadyColor = Color.FromArgb(255, 0, 255, 0);
|
||||
ShowHealth = true;
|
||||
CanCastAbility = true;
|
||||
ShowDayCycle = true;
|
||||
ShowMana = true;
|
||||
ShowEvents = true;
|
||||
|
||||
}
|
||||
|
||||
#region Variables
|
||||
|
||||
public string GameDirectory { get; set; }
|
||||
public bool CanCastAbility { get; set; }
|
||||
public bool ShowHealth { get; set; }
|
||||
public bool ShowDayCycle { get; set; }
|
||||
public bool ShowMana { get; set; }
|
||||
public bool ShowEvents { get; set; }
|
||||
public Color MainColor { get; set; }
|
||||
public Color ManaColor { get; set; }
|
||||
public string KeyboardLayout { get; set; }
|
||||
public Color AbilityCooldownColor { get; set; }
|
||||
public Color AbilityReadyColor { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="0,0,0,-19">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@ -46,7 +46,6 @@
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
@ -97,9 +96,11 @@
|
||||
Height="16" Margin="0,10,0,9">
|
||||
Keyboard Template
|
||||
</TextBlock>
|
||||
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="KeyboardLayouts" ItemsSource="{Binding Path=KeyboardLayouts}" SelectedIndex="{Binding Path=GameSettings.KeyboardLayout}" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Width="109" Margin="0,6,0,7" />
|
||||
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="KeyboardLayouts"
|
||||
ItemsSource="{Binding Path=KeyboardLayouts}"
|
||||
SelectedIndex="{Binding Path=GameSettings.KeyboardLayout}" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Width="109" Margin="0,6,0,7" />
|
||||
|
||||
<!-- Items Display -->
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||
@ -144,7 +145,8 @@
|
||||
Display day/night
|
||||
</TextBlock>
|
||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.ShowDayCycle, Mode=TwoWay}"
|
||||
Grid.Row="10" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||
Grid.Row="10" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes"
|
||||
OffLabel="No"
|
||||
Margin="0,0,-5,0" Width="114" />
|
||||
|
||||
<!-- Dead Display -->
|
||||
@ -153,12 +155,11 @@
|
||||
Show events on the keyboard
|
||||
</TextBlock>
|
||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.ShowEvents, Mode=TwoWay}"
|
||||
Grid.Row="11" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||
Grid.Row="11" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes"
|
||||
OffLabel="No"
|
||||
Margin="0,0,-5,0" Width="114" />
|
||||
|
||||
|
||||
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="12" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
|
||||
@ -9,7 +9,8 @@ namespace Artemis.Modules.Games.Dota2
|
||||
{
|
||||
public class Dota2ViewModel : GameViewModel<Dota2DataModel>
|
||||
{
|
||||
public Dota2ViewModel(MainManager mainManager) : base(mainManager, new Dota2Model(mainManager, new Dota2Settings()))
|
||||
public Dota2ViewModel(MainManager mainManager)
|
||||
: base(mainManager, new Dota2Model(mainManager, new Dota2Settings()))
|
||||
{
|
||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
||||
PlaceConfigFile();
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
@ -11,7 +11,8 @@ namespace Artemis.Modules.Games.RocketLeague
|
||||
{
|
||||
private string _versionText;
|
||||
|
||||
public RocketLeagueViewModel(MainManager mainManager) : base(mainManager, new RocketLeagueModel(mainManager, new RocketLeagueSettings()))
|
||||
public RocketLeagueViewModel(MainManager mainManager)
|
||||
: base(mainManager, new RocketLeagueModel(mainManager, new RocketLeagueSettings()))
|
||||
{
|
||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
||||
SetVersionText();
|
||||
|
||||
@ -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.TheDivision" GeneratedClassName="TheDivision">
|
||||
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
||||
GeneratedClassNamespace="Artemis.Modules.Games.TheDivision" GeneratedClassName="TheDivision">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Enabled" Type="System.Boolean" Scope="User">
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Artemis.Models.Interfaces;
|
||||
using Artemis.Models.Interfaces;
|
||||
|
||||
namespace Artemis.Modules.Games.TheDivision
|
||||
{
|
||||
@ -21,7 +20,7 @@ namespace Artemis.Modules.Games.TheDivision
|
||||
public TestTest TestyTest { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class TestTest
|
||||
{
|
||||
public string TestS { get; set; }
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="Artemis.Modules.Games.TheDivision.TheDivisionView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.Modules.Games.TheDivision"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
mc:Ignorable="d"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="416.495" d:DesignWidth="553.608">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
@ -41,10 +41,10 @@
|
||||
Foreground="{DynamicResource HighlightBrush}" MaxWidth="510" TextAlignment="Justify">
|
||||
Note: For this game to work with Artemis, please open up your Division settings, navigate to 3rd Party and set LED keyboard support to Yes. (This only works if you have Artemis running before starting the game)
|
||||
</TextBlock>
|
||||
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
@ -55,4 +55,4 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.Modules.Games.TheDivision
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for TheDivisionView.xaml
|
||||
/// Interaction logic for TheDivisionView.xaml
|
||||
/// </summary>
|
||||
public partial class TheDivisionView : UserControl
|
||||
{
|
||||
@ -25,4 +12,4 @@ namespace Artemis.Modules.Games.TheDivision
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
using Artemis.Managers;
|
||||
using Artemis.ViewModels;
|
||||
using Artemis.ViewModels.Abstract;
|
||||
|
||||
namespace Artemis.Modules.Games.TheDivision
|
||||
{
|
||||
public class TheDivisionViewModel : GameViewModel<TheDivisionDataModel>
|
||||
{
|
||||
public TheDivisionViewModel(MainManager mainManager) : base(mainManager, new TheDivisionModel(mainManager, new TheDivisionSettings()))
|
||||
public TheDivisionViewModel(MainManager mainManager)
|
||||
: base(mainManager, new TheDivisionModel(mainManager, new TheDivisionSettings()))
|
||||
{
|
||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
||||
}
|
||||
|
||||
@ -12,7 +12,8 @@ namespace Artemis.Modules.Games.Witcher3
|
||||
{
|
||||
public class Witcher3ViewModel : GameViewModel<Witcher3DataModel>
|
||||
{
|
||||
public Witcher3ViewModel(MainManager mainManager) : base(mainManager, new Witcher3Model(mainManager, new Witcher3Settings()))
|
||||
public Witcher3ViewModel(MainManager mainManager)
|
||||
: base(mainManager, new Witcher3Model(mainManager, new Witcher3Settings()))
|
||||
{
|
||||
MainManager = mainManager;
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
// The MIT License(MIT)
|
||||
|
||||
|
||||
// Copyright(c) 2015 ihtfw
|
||||
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -35,19 +35,29 @@
|
||||
<SolidColorBrush x:Key="RightArrowFill" Color="{StaticResource AccentColor}" options:Freeze="True" />
|
||||
|
||||
<Color x:Key="IdealForegroundColor">White</Color>
|
||||
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{StaticResource IdealForegroundColor}" Opacity="0.4" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{StaticResource IdealForegroundColor}"
|
||||
options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{StaticResource IdealForegroundColor}" Opacity="0.4"
|
||||
options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{StaticResource IdealForegroundColor}"
|
||||
options:Freeze="True" />
|
||||
|
||||
<!-- DataGrid brushes -->
|
||||
<SolidColorBrush x:Key="MetroDataGrid.HighlightBrush" Color="{StaticResource AccentColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.HighlightTextBrush" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.MouseOverHighlightBrush" Color="{StaticResource AccentColor3}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.HighlightTextBrush" Color="{StaticResource IdealForegroundColor}"
|
||||
options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.MouseOverHighlightBrush" Color="{StaticResource AccentColor3}"
|
||||
options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.FocusBorderBrush" Color="{StaticResource AccentColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.InactiveSelectionHighlightBrush" Color="{StaticResource AccentColor2}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.InactiveSelectionHighlightTextBrush" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.InactiveSelectionHighlightBrush" Color="{StaticResource AccentColor2}"
|
||||
options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MetroDataGrid.InactiveSelectionHighlightTextBrush"
|
||||
Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchBrush.Win10" Color="{StaticResource AccentColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchMouseOverBrush.Win10" Color="{StaticResource AccentColor2}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.ThumbIndicatorCheckedBrush.Win10" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchBrush.Win10"
|
||||
Color="{StaticResource AccentColor}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.OnSwitchMouseOverBrush.Win10"
|
||||
Color="{StaticResource AccentColor2}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="MahApps.Metro.Brushes.ToggleSwitchButton.ThumbIndicatorCheckedBrush.Win10"
|
||||
Color="{StaticResource IdealForegroundColor}" options:Freeze="True" />
|
||||
</ResourceDictionary>
|
||||
@ -33,7 +33,7 @@
|
||||
<Setter Property="IsMoveToPointEnabled" Value="True" />
|
||||
<Setter Property="Minimum" Value="0" />
|
||||
<Setter Property="Maximum" Value="1" />
|
||||
<Setter Property="Margin" Value="2,8,2,0"/>
|
||||
<Setter Property="Margin" Value="2,8,2,0" />
|
||||
</Style>
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVis" />
|
||||
@ -156,7 +156,8 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type nc:ColorBox}">
|
||||
<Border x:Name="PART_Root" Background="{TemplateBinding Background}" BorderBrush="{StaticResource ControlBorderBrush}">
|
||||
<Border x:Name="PART_Root" Background="{TemplateBinding Background}"
|
||||
BorderBrush="{StaticResource ControlBorderBrush}">
|
||||
<Border.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{x:Static nc:ColorBox.RemoveGradientStop}" />
|
||||
</Border.InputBindings>
|
||||
@ -220,7 +221,8 @@
|
||||
Padding="0,3">
|
||||
<Path x:Name="Icon" Height="12" Width="20"
|
||||
Stretch="Fill" Fill="#FF403C3C"
|
||||
StrokeThickness="1" Stroke="{StaticResource ControlBorderBrush}"
|
||||
StrokeThickness="1"
|
||||
Stroke="{StaticResource ControlBorderBrush}"
|
||||
Data="M371,190L557,190 557,293 371,293 371,190z" />
|
||||
</Border>
|
||||
|
||||
@ -488,7 +490,8 @@
|
||||
SelectedGradient="{Binding}"
|
||||
Margin="0,0,0,2">
|
||||
<nc:GradientStopSlider.Background>
|
||||
<SolidColorBrush Color="{Binding Color}"/>
|
||||
<SolidColorBrush
|
||||
Color="{Binding Color}" />
|
||||
</nc:GradientStopSlider.Background>
|
||||
</nc:GradientStopSlider>
|
||||
|
||||
@ -549,11 +552,13 @@
|
||||
<Button Grid.Column="1" ToolTip="Reverse gradient stops"
|
||||
Command="{x:Static nc:ColorBox.ReverseGradientStop}"
|
||||
x:Name="Delete" Width="50" Height="50"
|
||||
Style="{DynamicResource MetroCircleButtonStyle}" VerticalAlignment="Top"
|
||||
Style="{DynamicResource MetroCircleButtonStyle}"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right" Margin="0,-4,0,0">
|
||||
<Button.Content>
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="20" Height="20">
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="20" Height="20">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush
|
||||
Visual="{StaticResource appbar_arrow_left_right}"
|
||||
|
||||
@ -4,8 +4,6 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Security.Principal;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
@ -57,7 +55,7 @@ namespace Artemis.Utilities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a deep Copy of the object.
|
||||
/// Perform a deep Copy of the object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of object being copied.</typeparam>
|
||||
/// <param name="source">The object instance to copy.</param>
|
||||
@ -68,13 +66,13 @@ namespace Artemis.Utilities
|
||||
if (ReferenceEquals(source, null))
|
||||
return default(T);
|
||||
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
var serializer = new XmlSerializer(typeof (T));
|
||||
Stream stream = new MemoryStream();
|
||||
using (stream)
|
||||
{
|
||||
serializer.Serialize(stream, source);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
return (T)serializer.Deserialize(stream);
|
||||
return (T) serializer.Deserialize(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ namespace Artemis.Utilities.Keyboard
|
||||
{
|
||||
Task.Factory.StartNew(() => { KeyDownCallback?.Invoke(keyEventArgs); });
|
||||
}
|
||||
|
||||
|
||||
public event KeyDownCallbackHandler KeyDownCallback;
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@ namespace Artemis.Utilities.LogitechDll
|
||||
{
|
||||
if (!File.Exists(LogitechPath + @"\LogitechLed.dll") || !File.Exists(LogitechPath + @"\artemis.txt"))
|
||||
return false;
|
||||
|
||||
|
||||
// Get rid of our own DLL
|
||||
File.Delete(LogitechPath + @"\LogitechLed.dll");
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Pipes;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@ -184,6 +183,4 @@ namespace Artemis.Utilities.LogitechDll
|
||||
|
||||
public string Data { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -16,8 +16,8 @@ namespace Artemis.Utilities.ParentChild
|
||||
where P : class
|
||||
where T : IChildItem<P>
|
||||
{
|
||||
private IList<T> _collection;
|
||||
private readonly P _parent;
|
||||
private IList<T> _collection;
|
||||
|
||||
public ChildItemCollection(P parent)
|
||||
{
|
||||
@ -49,6 +49,11 @@ namespace Artemis.Utilities.ParentChild
|
||||
|
||||
#endregion
|
||||
|
||||
public void Sort(Func<T, object> func)
|
||||
{
|
||||
_collection = _collection.OrderBy(func).ToList();
|
||||
}
|
||||
|
||||
#region IList<T> Members
|
||||
|
||||
public int IndexOf(T item)
|
||||
@ -129,10 +134,5 @@ namespace Artemis.Utilities.ParentChild
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Sort(Func<T, object> func)
|
||||
{
|
||||
_collection = _collection.OrderBy(func).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,6 @@ using System.Threading.Tasks;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
using Artemis.Modules.Effects.ProfilePreview;
|
||||
using Artemis.Modules.Games.Witcher3;
|
||||
using Caliburn.Micro;
|
||||
|
||||
namespace Artemis.ViewModels.Abstract
|
||||
@ -122,8 +121,8 @@ namespace Artemis.ViewModels.Abstract
|
||||
if (gameModel != null)
|
||||
if (!gameModel.Enabled)
|
||||
MainManager.EffectManager.GetLastEffect();
|
||||
else
|
||||
MainManager.EffectManager.ChangeEffect(_lastEffect, true);
|
||||
else
|
||||
MainManager.EffectManager.ChangeEffect(_lastEffect, true);
|
||||
}
|
||||
else
|
||||
MainManager.EffectManager.ClearEffect();
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Artemis.Managers;
|
||||
using Artemis.Modules.Effects.AmbientLightning;
|
||||
using Artemis.Modules.Effects.AudioVisualizer;
|
||||
using Artemis.Modules.Effects.Debug;
|
||||
using Artemis.Modules.Effects.TypeHole;
|
||||
|
||||
@ -11,10 +11,10 @@ namespace Artemis.ViewModels
|
||||
public class GamesViewModel : Conductor<IScreen>.Collection.OneActive
|
||||
{
|
||||
private readonly CounterStrikeViewModel _counterStrikeVm;
|
||||
private readonly TheDivisionViewModel _divisionVm;
|
||||
private readonly Dota2ViewModel _dota2Vm;
|
||||
private readonly RocketLeagueViewModel _rocketLeagueVm;
|
||||
private readonly Witcher3ViewModel _witcher3Vm;
|
||||
private readonly TheDivisionViewModel _divisionVm;
|
||||
|
||||
public GamesViewModel(MainManager mainManager)
|
||||
{
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Artemis.Events;
|
||||
using Artemis.Properties;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities;
|
||||
using Caliburn.Micro;
|
||||
|
||||
@ -57,7 +57,9 @@
|
||||
<Button Grid.Column="1" x:Name="Delete" Width="26" Height="26" Style="{DynamicResource SquareButtonStyle}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Right">
|
||||
<Button.Content>
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
|
||||
@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.Views.LayerEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for LayerConditionView.xaml
|
||||
/// Interaction logic for LayerConditionView.xaml
|
||||
/// </summary>
|
||||
public partial class LayerConditionView : UserControl
|
||||
{
|
||||
@ -25,4 +12,4 @@ namespace Artemis.Views.LayerEditor
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -81,7 +81,8 @@
|
||||
|
||||
<!-- PercentageOf -->
|
||||
<StackPanel Grid.Column="3" x:Name="UserSourceIsVisible" VerticalAlignment="Center">
|
||||
<controls:NumericUpDown Margin="10,0" Height="22" Value="{Binding Path=LayerDynamicPropertiesModelProposed.PercentageSource, Mode=TwoWay}" />
|
||||
<controls:NumericUpDown Margin="10,0" Height="22"
|
||||
Value="{Binding Path=LayerDynamicPropertiesModelProposed.PercentageSource, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.Views.LayerEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for LayerDynamicPropertiesView.xaml
|
||||
/// Interaction logic for LayerDynamicPropertiesView.xaml
|
||||
/// </summary>
|
||||
public partial class LayerDynamicPropertiesView : UserControl
|
||||
{
|
||||
@ -25,4 +12,4 @@ namespace Artemis.Views.LayerEditor
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,8 @@
|
||||
Title="Artemis | Edit Layer" Height="750" Width="630"
|
||||
xmlns:profileEnumerations="clr-namespace:Artemis.Models.Profiles"
|
||||
xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../../Resources/bow.png" ResizeMode="NoResize">
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../../Resources/bow.png"
|
||||
ResizeMode="NoResize">
|
||||
<controls:MetroWindow.Resources>
|
||||
<utilities:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
|
||||
<ObjectDataProvider MethodName="GetValues"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Artemis.Views.LayerEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for LayerEditorView.xaml
|
||||
/// Interaction logic for LayerEditorView.xaml
|
||||
/// </summary>
|
||||
public partial class LayerEditorView : MetroWindow
|
||||
{
|
||||
@ -12,4 +12,4 @@ namespace Artemis.Views.LayerEditor
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -63,7 +63,8 @@
|
||||
<Label Grid.Column="1" Grid.Row="0" FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" />
|
||||
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}"
|
||||
BorderThickness="3" Margin="10,0,0,0" Height="400" Width="233">
|
||||
<TreeView x:Name="ProfileTree" ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<TreeView x:Name="ProfileTree"
|
||||
ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<i:Interaction.Behaviors>
|
||||
<itemBehaviours:BindableSelectedItemBehavior SelectedItem="{Binding SelectedLayer, Mode=TwoWay}" />
|
||||
</i:Interaction.Behaviors>
|
||||
@ -72,14 +73,15 @@
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<HierarchicalDataTemplate
|
||||
ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, ElementName=ProfileTree}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu
|
||||
cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||
<MenuItem Header="Rename" />
|
||||
<MenuItem Header="Duplicate" cal:Message.Attach="CloneLayer($datacontext)"/>
|
||||
<MenuItem Header="Delete" cal:Message.Attach="RemoveLayerFromMenu($datacontext)"/>
|
||||
<MenuItem Header="Duplicate" cal:Message.Attach="CloneLayer($datacontext)" />
|
||||
<MenuItem Header="Delete" cal:Message.Attach="RemoveLayerFromMenu($datacontext)" />
|
||||
<MenuItem Header="Properties" cal:Message.Attach="LayerEditor($datacontext)" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
@ -106,7 +108,8 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Layer movement -->
|
||||
<StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0">
|
||||
<StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Margin="10,0,0,0">
|
||||
<Button x:Name="LayerUp" Width="40" Height="40" Style="{DynamicResource MetroCircleButtonStyle}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
|
||||
@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ProfileEditorView.xaml
|
||||
/// Interaction logic for ProfileEditorView.xaml
|
||||
/// </summary>
|
||||
public partial class ProfileEditorView : UserControl
|
||||
{
|
||||
@ -25,4 +12,4 @@ namespace Artemis.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
dialogs:DialogParticipation.Register="{Binding RelativeSource={RelativeSource Self}, Path=DataContext}"
|
||||
mc:Ignorable="d"
|
||||
Title="Artemis" Height="800" Width="1210"
|
||||
MinHeight="800" MinWidth="1210"
|
||||
MinHeight="800" MinWidth="1210"
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico">
|
||||
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
||||
<Controls:MetroWindow.IconTemplate>
|
||||
@ -64,7 +64,8 @@
|
||||
<ResourceDictionary
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
||||
</Grid.Resources>
|
||||
<TabControl Margin="0,10,10,10" TabStripPlacement="Left" x:Name="Items" cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
||||
<TabControl Margin="0,10,10,10" TabStripPlacement="Left" x:Name="Items"
|
||||
cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}" />
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="Autofac" version="4.0.0-rc1-177" targetFramework="net452" />
|
||||
<package id="Caliburn.Micro" version="2.0.2" targetFramework="net452" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user