1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Resharper cleanup on entire project

This commit is contained in:
SpoinkyNL 2016-04-27 20:40:41 +02:00
parent c52be47e9f
commit a3b983fb9c
52 changed files with 265 additions and 288 deletions

View File

@ -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 />

View File

@ -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);
}
}

View File

@ -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

View File

@ -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)

View File

@ -1,6 +1,4 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using Artemis.Utilities;
using Corale.Colore.Razer.Keyboard.Effects;

View File

@ -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>

View File

@ -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;
}
}
}

View File

@ -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;
@ -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++;
}
}
@ -133,7 +133,6 @@ namespace Artemis.Modules.Effects.AmbientLightning
test.SaveBmp(ms);
ms.Position = 0;
return new Bitmap(ms);
}
}
}

View File

@ -1,17 +1,4 @@
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
{

View File

@ -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;

View File

@ -1,5 +1,4 @@
using System.Diagnostics;
using System.Drawing;
using System.Drawing;
using Artemis.Managers;
using Artemis.Models;
using Artemis.Utilities.GameState;

View File

@ -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);

View File

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Games.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">

View File

@ -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,7 +47,6 @@ namespace Artemis.Modules.Games.Dota2
public override void ToDefault()
{
Enabled = true;
GameDirectory = string.Empty;
@ -82,7 +60,22 @@ namespace Artemis.Modules.Games.Dota2
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
}
}

View File

@ -46,7 +46,6 @@
</StackPanel>
<StackPanel Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2" Margin="0,0,1,0">
@ -97,7 +96,9 @@
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"
<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" />
@ -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}" />

View File

@ -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();

View File

@ -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();

View File

@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Games.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">

View File

@ -1,5 +1,4 @@
using System;
using Artemis.Models.Interfaces;
using Artemis.Models.Interfaces;
namespace Artemis.Modules.Games.TheDivision
{

View File

@ -1,17 +1,4 @@
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
{

View File

@ -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);
}

View File

@ -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;

View File

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

View File

@ -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>

View File

@ -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,10 +552,12 @@
<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}}}"
<Rectangle
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
Width="20" Height="20">
<Rectangle.OpacityMask>
<VisualBrush

View File

@ -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;

View File

@ -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; }
}
}

View File

@ -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();
}
}
}

View File

@ -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

View File

@ -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;

View File

@ -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)
{

View File

@ -1,7 +1,6 @@
using System;
using System.Windows;
using Artemis.Events;
using Artemis.Properties;
using Artemis.Settings;
using Artemis.Utilities;
using Caliburn.Micro;

View File

@ -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>

View File

@ -1,17 +1,4 @@
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
{

View File

@ -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>

View File

@ -1,17 +1,4 @@
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
{

View File

@ -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"

View File

@ -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,7 +73,8 @@
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
@ -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

View File

@ -1,17 +1,4 @@
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
{

View File

@ -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}" />

View File

@ -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" />