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

Code cleanup

This commit is contained in:
SpoinkyNL 2016-02-29 10:24:14 +01:00
parent b2426d164f
commit 5c6e393dd5
26 changed files with 105 additions and 83 deletions

View File

@ -2,19 +2,44 @@
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <sectionGroup name="userSettings"
<section name="Artemis.Modules.Overlays.VolumeDisplay.VolumeDisplay" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Artemis.Modules.Games.RocketLeague.RocketLeague" 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"
<section name="Artemis.Settings.Offsets" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Modules.Games.Witcher3.Witcher3" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.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.RocketLeague.RocketLeague"
<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" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Settings.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="Artemis.Settings.Offsets"
<section name="Artemis.Settings.RocketLeague" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
<section name="Artemis.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.TypeWave" 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"
<section name="Artemis.Settings.General" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Modules.Games.CounterStrike.CounterStrike"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.CounterStrike"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.AudioVisualization"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.RocketLeague"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.TypeWave"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="Artemis.Settings.General"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<connectionStrings /> <connectionStrings />

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Threading; using System.Threading;
using System.Windows.Forms;
using Artemis.KeyboardProviders.Logitech.Utilities; using Artemis.KeyboardProviders.Logitech.Utilities;
namespace Artemis.KeyboardProviders.Logitech namespace Artemis.KeyboardProviders.Logitech

View File

@ -10,8 +10,8 @@ namespace Artemis.Managers
{ {
public class EffectManager public class EffectManager
{ {
private readonly MainManager _mainManager;
private readonly IEventAggregator _events; private readonly IEventAggregator _events;
private readonly MainManager _mainManager;
public EffectManager(MainManager mainManager, IEventAggregator events) public EffectManager(MainManager mainManager, IEventAggregator events)
{ {
@ -121,7 +121,7 @@ namespace Artemis.Managers
// Don't mess with the ActiveEffect if in the process of changing the effect. // Don't mess with the ActiveEffect if in the process of changing the effect.
if (PauseEffect != null) if (PauseEffect != null)
return; return;
if (ActiveEffect == null) if (ActiveEffect == null)
return; return;

View File

@ -2,7 +2,6 @@
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Windows.Forms;
using Artemis.Events; using Artemis.Events;
using Artemis.Models; using Artemis.Models;
using Artemis.Utilities.GameState; using Artemis.Utilities.GameState;
@ -28,7 +27,7 @@ namespace Artemis.Managers
_fps = 25; _fps = 25;
UpdateWorker = new BackgroundWorker {WorkerSupportsCancellation = true}; UpdateWorker = new BackgroundWorker {WorkerSupportsCancellation = true};
ProcessWorker = new BackgroundWorker { WorkerSupportsCancellation = true }; ProcessWorker = new BackgroundWorker {WorkerSupportsCancellation = true};
UpdateWorker.DoWork += UpdateWorker_DoWork; UpdateWorker.DoWork += UpdateWorker_DoWork;
UpdateWorker.RunWorkerCompleted += BackgroundWorkerExceptionCatcher; UpdateWorker.RunWorkerCompleted += BackgroundWorkerExceptionCatcher;
@ -149,6 +148,13 @@ namespace Artemis.Managers
Events.PublishOnUIThread(new ToggleEnabled(ProgramEnabled)); Events.PublishOnUIThread(new ToggleEnabled(ProgramEnabled));
} }
public void Shutdown()
{
Stop();
ProcessWorker.CancelAsync();
GameStateWebServer.Stop();
}
#region Workers #region Workers
private void UpdateWorker_DoWork(object sender, DoWorkEventArgs e) private void UpdateWorker_DoWork(object sender, DoWorkEventArgs e)
@ -255,12 +261,5 @@ namespace Artemis.Managers
} }
#endregion #endregion
public void Shutdown()
{
Stop();
ProcessWorker.CancelAsync();
GameStateWebServer.Stop();
}
} }
} }

View File

@ -8,9 +8,10 @@ namespace Artemis.Models
{ {
public delegate void SettingsUpdateHandler(EffectSettings settings); public delegate void SettingsUpdateHandler(EffectSettings settings);
public bool Initialized;
public MainManager MainManager; public MainManager MainManager;
public string Name; public string Name;
public bool Initialized;
protected EffectModel(MainManager mainManager) protected EffectModel(MainManager mainManager)
{ {

View File

@ -17,10 +17,10 @@ namespace Artemis.Modules.Effects.AudioVisualizer
{ {
private const int FftLength = 2048; private const int FftLength = 2048;
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength); private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength);
private bool _generating;
private IWaveIn _waveIn;
private int _sensitivity;
private bool _fromBottom; private bool _fromBottom;
private bool _generating;
private int _sensitivity;
private IWaveIn _waveIn;
public AudioVisualizerModel(MainManager mainManager, AudioVisualizerSettings settings) : base(mainManager) public AudioVisualizerModel(MainManager mainManager, AudioVisualizerSettings settings) : base(mainManager)
{ {
@ -92,7 +92,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
} }
public override void Update() public override void Update()
{ {
// Start filling the model // Start filling the model
_generating = true; _generating = true;
@ -118,7 +118,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
height = (int) Math.Round(SpectrumData[i]/2.55); height = (int) Math.Round(SpectrumData[i]/2.55);
// Apply Sensitivity setting // Apply Sensitivity setting
height = height* _sensitivity; height = height*_sensitivity;
var keyboardHeight = var keyboardHeight =
(int) Math.Round(MainManager.KeyboardManager.ActiveKeyboard.Height/100.00*height*Scale); (int) Math.Round(MainManager.KeyboardManager.ActiveKeyboard.Height/100.00*height*Scale);
if (keyboardHeight > SoundRectangles[i].Height) if (keyboardHeight > SoundRectangles[i].Height)

View File

@ -37,8 +37,8 @@
<Label Content="Enable effect" Margin="0 3 0 0" 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" <ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
Style="{DynamicResource MetroCircleToggleButtonStyle}" Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
ToolTip="Note: You can't enable an effect when Artemis is disabled"/> ToolTip="Note: You can't enable an effect when Artemis is disabled" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<!-- Top color --> <!-- Top color -->

View File

@ -35,9 +35,9 @@
<Label Content="Enable effect" Margin="0 3 0 0" 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" <ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
Style="{DynamicResource MetroCircleToggleButtonStyle}" Style="{DynamicResource MetroCircleToggleButtonStyle}"
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
ToolTip="Note: You can't enable an effect when Artemis is disabled" ToolTip="Note: You can't enable an effect when Artemis is disabled"
ToolTipService.ShowOnDisabled="True"/> ToolTipService.ShowOnDisabled="True" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>

View File

@ -37,7 +37,8 @@
IsOpen="{Binding Path=ShowDisabledPopup, Mode=TwoWay}" Placement="Left" VerticalOffset="-10" IsOpen="{Binding Path=ShowDisabledPopup, Mode=TwoWay}" Placement="Left" VerticalOffset="-10"
PopupAnimation="Fade" StaysOpen="False"> PopupAnimation="Fade" StaysOpen="False">
<Border Margin="1"> <Border Margin="1">
<TextBlock Background="{DynamicResource AccentColorBrush}" Foreground="{DynamicResource IdealForegroundColorBrush}" <TextBlock Background="{DynamicResource AccentColorBrush}"
Foreground="{DynamicResource IdealForegroundColorBrush}"
Text="You can't enable an effect when Artemis is disabled" Padding="4" /> Text="You can't enable an effect when Artemis is disabled" Padding="4" />
</Border> </Border>
</Popup> </Popup>

View File

@ -40,7 +40,8 @@
IsOpen="{Binding Path=ShowDisabledPopup, Mode=TwoWay}" Placement="Left" VerticalOffset="-10" IsOpen="{Binding Path=ShowDisabledPopup, Mode=TwoWay}" Placement="Left" VerticalOffset="-10"
PopupAnimation="Fade" StaysOpen="False"> PopupAnimation="Fade" StaysOpen="False">
<Border Margin="1"> <Border Margin="1">
<TextBlock Background="{DynamicResource AccentColorBrush}" Foreground="{DynamicResource IdealForegroundColorBrush}" <TextBlock Background="{DynamicResource AccentColorBrush}"
Foreground="{DynamicResource IdealForegroundColorBrush}"
Text="You can't enable an effect when Artemis is disabled" Padding="4" /> Text="You can't enable an effect when Artemis is disabled" Padding="4" />
</Border> </Border>
</Popup> </Popup>

View File

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

View File

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

View File

@ -32,7 +32,6 @@ namespace Artemis.Modules.Games.RocketLeague
Scale = 4; Scale = 4;
Enabled = Settings.Enabled; Enabled = Settings.Enabled;
Initialized = false; Initialized = false;
} }
public RocketLeagueSettings Settings { get; set; } public RocketLeagueSettings Settings { get; set; }
@ -92,12 +91,12 @@ namespace Artemis.Modules.Games.RocketLeague
if (ContextualColor) if (ContextualColor)
{ {
if(_boostAmount < 33) if (_boostAmount < 33)
_boostRect.Colors = new List<Color>{ Color.Red }; _boostRect.Colors = new List<Color> {Color.Red};
else if(_boostAmount >= 33 && _boostAmount < 66) else if (_boostAmount >= 33 && _boostAmount < 66)
_boostRect.Colors = new List<Color> { Color.Yellow }; _boostRect.Colors = new List<Color> {Color.Yellow};
else if(_boostAmount >= 66) else if (_boostAmount >= 66)
_boostRect.Colors = new List<Color> { Color.Lime }; _boostRect.Colors = new List<Color> {Color.Lime};
} }
else else
{ {

View File

@ -76,9 +76,10 @@
Tip: To find a color combination you like, start an exhibition match, pickup 100 boost and play around with the colors. Tip: To find a color combination you like, start an exhibition match, pickup 100 boost and play around with the colors.
They'll appear on your keyboard immediately! Once you're satisfied don't forget to click save changes. They'll appear on your keyboard immediately! Once you're satisfied don't forget to click save changes.
</TextBlock> </TextBlock>
<TextBlock x:Name="VersionText" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8" <TextBlock x:Name="VersionText" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center"
Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
Foreground="{DynamicResource HighlightBrush}" MaxWidth="510" TextAlignment="Justify"/> Foreground="{DynamicResource HighlightBrush}" MaxWidth="510" TextAlignment="Justify" />
<!-- Buttons --> <!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom"> <StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">

View File

@ -2,7 +2,6 @@
using Artemis.Models; using Artemis.Models;
using Artemis.Settings; using Artemis.Settings;
using Artemis.Utilities; using Artemis.Utilities;
using Artemis.Utilities.Memory;
using Caliburn.Micro; using Caliburn.Micro;
using Newtonsoft.Json; using Newtonsoft.Json;

View File

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

View File

@ -26,7 +26,7 @@ namespace Artemis.Modules.Games.Witcher3
Scale = 4; Scale = 4;
Enabled = Settings.Enabled; Enabled = Settings.Enabled;
Initialized = false; Initialized = false;
_updateSw = new Stopwatch(); _updateSw = new Stopwatch();
_signRegex = new Regex("ActiveSign=(.*)", RegexOptions.Compiled); _signRegex = new Regex("ActiveSign=(.*)", RegexOptions.Compiled);
} }
@ -87,21 +87,21 @@ namespace Artemis.Modules.Games.Witcher3
return; return;
var sign = signRes.Groups[1].Value; var sign = signRes.Groups[1].Value;
switch (sign) switch (sign)
{ {
case "ST_Aard\r": case "ST_Aard\r":
_signRect.Colors = new List<Color> {Color.DeepSkyBlue, Color.Blue}; _signRect.Colors = new List<Color> {Color.DeepSkyBlue, Color.Blue};
break; break;
case "ST_Yrden\r": case "ST_Yrden\r":
_signRect.Colors = new List<Color> {Color.Purple, Color.DeepPink}; _signRect.Colors = new List<Color> {Color.Purple, Color.DeepPink};
break; break;
case "ST_Igni\r": case "ST_Igni\r":
_signRect.Colors = new List<Color> {Color.DarkOrange, Color.Red}; _signRect.Colors = new List<Color> {Color.DarkOrange, Color.Red};
break; break;
case "ST_Quen\r": case "ST_Quen\r":
_signRect.Colors = new List<Color> {Color.DarkOrange, Color.FromArgb(232, 193, 0)}; _signRect.Colors = new List<Color> {Color.DarkOrange, Color.FromArgb(232, 193, 0)};
break; break;
case "ST_Axii\r": case "ST_Axii\r":
_signRect.Colors = new List<Color> {Color.LawnGreen, Color.DarkGreen}; _signRect.Colors = new List<Color> {Color.LawnGreen, Color.DarkGreen};
break; break;
} }

View File

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

View File

@ -55,12 +55,12 @@
<xctk:ColorPicker x:Name="SecondaryColor" <xctk:ColorPicker x:Name="SecondaryColor"
SelectedColor="{Binding Path=VolumeDisplaySettings.SecondaryColor, Mode=TwoWay}" SelectedColor="{Binding Path=VolumeDisplaySettings.SecondaryColor, Mode=TwoWay}"
Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="0,5,-1,5" Height="22" > VerticalAlignment="Center" Margin="0,5,-1,5" Height="22">
<xctk:ColorPicker.Template> <xctk:ColorPicker.Template>
<ControlTemplate> <ControlTemplate>
<Rectangle ></Rectangle> <Rectangle />
</ControlTemplate> </ControlTemplate>
</xctk:ColorPicker.Template> </xctk:ColorPicker.Template>
</xctk:ColorPicker> </xctk:ColorPicker>
<TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8" <TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"

View File

@ -34,7 +34,7 @@ namespace Artemis.Utilities.GameState
_listener.Prefixes.Add($"http://localhost:{Port}/"); _listener.Prefixes.Add($"http://localhost:{Port}/");
_listener.Start(); _listener.Start();
ThreadPool.QueueUserWorkItem(o => ThreadPool.QueueUserWorkItem(o =>
{ {
try try

View File

@ -1,12 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Artemis.Models;
using Artemis.Settings;
using Newtonsoft.Json;
namespace Artemis.Utilities.Memory namespace Artemis.Utilities.Memory
{ {

View File

@ -1,6 +1,4 @@
using System; using System.Linq;
using System.Linq;
using System.Windows;
using Artemis.Managers; using Artemis.Managers;
using Artemis.ViewModels.Flyouts; using Artemis.ViewModels.Flyouts;
using Caliburn.Micro; using Caliburn.Micro;

View File

@ -1,13 +1,9 @@
using System; using System;
using System.Diagnostics;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows;
using Artemis.Events; using Artemis.Events;
using Artemis.Utilities; using Artemis.Utilities;
using Caliburn.Micro; using Caliburn.Micro;
using Newtonsoft.Json.Linq;
using Application = System.Windows.Application;
using Screen = Caliburn.Micro.Screen;
namespace Artemis.ViewModels namespace Artemis.ViewModels
{ {

View File

@ -32,7 +32,7 @@
Content="Enable Artemis:" /> Content="Enable Artemis:" />
<controls:ToggleSwitch Grid.Row="0" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No" <controls:ToggleSwitch Grid.Row="0" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
IsChecked="{Binding Path=Enabled, Mode=TwoWay}"/> IsChecked="{Binding Path=Enabled, Mode=TwoWay}" />
<!-- Startup with Windows --> <!-- Startup with Windows -->
<Label Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" <Label Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"

View File

@ -28,8 +28,8 @@
</Label> </Label>
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8" <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" TextWrapping="Wrap" HorizontalAlignment="Left"
MaxWidth="520" TextAlignment="Justify"> MaxWidth="520" TextAlignment="Justify">
Hello, <LineBreak /><LineBreak /> Hello, <LineBreak /><LineBreak />
Thanks a bunch for downloading this application. You're going to enjoy this! :)<LineBreak /> Thanks a bunch for downloading this application. You're going to enjoy this! :)<LineBreak />
<LineBreak /> <LineBreak />

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Autofac" version="4.0.0-rc1-177" targetFramework="net452" /> <package id="Autofac" version="4.0.0-rc1-177" targetFramework="net452" />
<package id="Caliburn.Micro" version="2.0.2" targetFramework="net452" /> <package id="Caliburn.Micro" version="2.0.2" targetFramework="net452" />