mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
TypeWave fix, implemented icon enabled indicator
This commit is contained in:
parent
bb0f6f46cf
commit
c1b8d12b4a
@ -2,44 +2,19 @@
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings"
|
||||
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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.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 />
|
||||
@ -233,7 +208,7 @@
|
||||
<value>51364</value>
|
||||
</setting>
|
||||
<setting name="Autorun" serializeAs="String">
|
||||
<value>True</value>
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Suspended" serializeAs="String">
|
||||
<value>False</value>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<!-- Accent and AppTheme setting -->
|
||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" />
|
||||
<ResourceDictionary
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
|
||||
<ResourceDictionary Source="/Resources/Icons.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@ -35,9 +35,13 @@
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<SupportUrl>https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-%28FAQ%29</SupportUrl>
|
||||
<ProductName>Artemis</ProductName>
|
||||
<PublisherName>Artemis</PublisherName>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.2.0</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
@ -74,7 +78,7 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>logo.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Resources\logo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -139,10 +143,6 @@
|
||||
<HintPath>..\packages\CUE.NET.1.0.2.1\lib\net45\CUE.NET.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Gma.System.MouseKeyHook, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MouseKeyHook.5.4.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.5\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@ -172,10 +172,7 @@
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
@ -189,6 +186,10 @@
|
||||
<HintPath>..\packages\WpfExceptionViewer.1.0.0.0\lib\VioletTape.WpfExceptionViewer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="VirtualInput, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\VirtualInput.1.0.1\lib\net20\VirtualInput.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
@ -434,9 +435,13 @@
|
||||
<Resource Include="Resources\bow.png" />
|
||||
<Resource Include="Resources\WindowsIcons-license.txt" />
|
||||
<Resource Include="Resources\Entypo-license.txt" />
|
||||
<Content Include="logo.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Resource Include="Resources\logo.ico" />
|
||||
<Resource Include="Resources\logo-disabled.ico" />
|
||||
<Content Include="Resources\Witcher3\playerWitcher.txt" />
|
||||
<Content Include="Resources\Witcher3\artemis.txt" />
|
||||
<Resource Include="logo-disabled.ico" />
|
||||
<Resource Include="Resources\Entypo.ttf" />
|
||||
<None Include="Settings\Offsets.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@ -527,9 +532,6 @@
|
||||
<Content Include="RzChromaSDK64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Resource Include="logo.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Content Include="Resources\CounterStrike\gamestateConfiguration.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.KeyboardProviders.Corsair;
|
||||
using Artemis.KeyboardProviders.Logitech.Utilities;
|
||||
@ -24,14 +23,33 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
_randomColor = Color.Red;
|
||||
Settings = settings;
|
||||
Initialized = false;
|
||||
Scale = 4;
|
||||
}
|
||||
|
||||
public int Scale { get; set; }
|
||||
|
||||
public TypeWaveSettings Settings { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Initialized = false;
|
||||
MainManager.KeyboardHook.Unsubscribe(HandleKeypress);
|
||||
MainManager.KeyboardHook.KeyDownCallback -= KeyboardHookOnKeyDownCallback;
|
||||
}
|
||||
|
||||
private void KeyboardHookOnKeyDownCallback(KeyEventArgs e)
|
||||
{
|
||||
// More than 25 waves is pointless
|
||||
if (_waves.Count >= 25)
|
||||
return;
|
||||
|
||||
var keyMatch = KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == e.KeyCode);
|
||||
if (keyMatch == null)
|
||||
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,
|
||||
ColorHelpers.ToDrawingColor(Settings.WaveColor)));
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
@ -39,7 +57,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
Initialized = false;
|
||||
|
||||
// Listener won't start unless the effect is active
|
||||
MainManager.KeyboardHook.Subscribe(HandleKeypress);
|
||||
MainManager.KeyboardHook.KeyDownCallback += KeyboardHookOnKeyDownCallback;
|
||||
|
||||
Initialized = true;
|
||||
}
|
||||
@ -54,7 +72,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
// TODO: Get from settings
|
||||
var fps = 25;
|
||||
|
||||
_waves[i].Size += Settings.SpreadSpeed;
|
||||
_waves[i].Size += Settings.SpreadSpeed * Scale;
|
||||
|
||||
if (Settings.IsShiftColors)
|
||||
_waves[i].Color = ColorHelpers.ShiftColor(_waves[i].Color, Settings.ShiftColorSpeed);
|
||||
@ -78,7 +96,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
if (_waves.Count == 0)
|
||||
return null;
|
||||
|
||||
var bitmap = MainManager.KeyboardManager.ActiveKeyboard.KeyboardBitmap();
|
||||
var bitmap = MainManager.KeyboardManager.ActiveKeyboard.KeyboardBitmap(Scale);
|
||||
using (var g = Graphics.FromImage(bitmap))
|
||||
{
|
||||
g.Clear(Color.Transparent);
|
||||
@ -116,27 +134,6 @@ namespace Artemis.Modules.Effects.TypeWave
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
private void HandleKeypress(object sender, KeyEventArgs e)
|
||||
{
|
||||
Task.Factory.StartNew(() => KeyPressTask(e));
|
||||
}
|
||||
|
||||
private void KeyPressTask(KeyEventArgs e)
|
||||
{
|
||||
// More than 25 waves is pointless
|
||||
if (_waves.Count >= 25)
|
||||
return;
|
||||
|
||||
var keyMatch = KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == e.KeyCode);
|
||||
if (keyMatch == null)
|
||||
return;
|
||||
|
||||
_waves.Add(Settings.IsRandomColors
|
||||
? new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0, _randomColor)
|
||||
: new Wave(new Point(keyMatch.PosX, keyMatch.PosY), 0,
|
||||
ColorHelpers.ToDrawingColor(Settings.WaveColor)));
|
||||
}
|
||||
}
|
||||
|
||||
public class Wave
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
using Artemis.Managers;
|
||||
using Caliburn.Micro;
|
||||
using Artemis.ViewModels.Abstract;
|
||||
|
||||
namespace Artemis.Modules.Games.Dota2
|
||||
{
|
||||
public class Dota2ViewModel : Screen
|
||||
public class Dota2ViewModel : GameViewModel
|
||||
{
|
||||
public Dota2ViewModel(MainManager mainManager)
|
||||
{
|
||||
MainManager = mainManager;
|
||||
}
|
||||
|
||||
public MainManager MainManager { get; set; }
|
||||
|
||||
public static string Name => "Dota 2 (NYI)";
|
||||
public string Content => "Dota 2 Content";
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<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"
|
||||
IsChecked="{Binding Path=Witcher3Settings.Enabled, Mode=TwoWay}"
|
||||
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
||||
</StackPanel>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
@ -25,13 +24,13 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
MainManager.KeyboardHook.Unsubscribe(HandleKeypress);
|
||||
MainManager.KeyboardHook.KeyDownCallback -= KeyPressTask;
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
// Listener won't start unless the effect is active
|
||||
MainManager.KeyboardHook.Subscribe(HandleKeypress);
|
||||
MainManager.KeyboardHook.KeyDownCallback += KeyPressTask;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
@ -80,11 +79,6 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
private void HandleKeypress(object sender, KeyEventArgs e)
|
||||
{
|
||||
Task.Factory.StartNew(() => KeyPressTask(e));
|
||||
}
|
||||
|
||||
private void KeyPressTask(KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode != Keys.VolumeUp && e.KeyCode != Keys.VolumeDown)
|
||||
|
||||
20
Artemis/Artemis/Properties/Resources.Designer.cs
generated
20
Artemis/Artemis/Properties/Resources.Designer.cs
generated
@ -113,6 +113,26 @@ namespace Artemis.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon logo {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("logo", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon logo_disabled {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("logo_disabled", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to /***********************************************************************/
|
||||
////** © 2015 CD PROJEKT S.A. All rights reserved.
|
||||
|
||||
@ -127,6 +127,12 @@
|
||||
<data name="gamestateConfiguration" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\counterstrike\gamestateconfiguration.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="logo_disabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo-disabled.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="playerWitcherWs" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\witcher3\playerwitcher.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
|
||||
</data>
|
||||
|
||||
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
BIN
Artemis/Artemis/Resources/logo.ico
Normal file
BIN
Artemis/Artemis/Resources/logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
2
Artemis/Artemis/Settings/General.Designer.cs
generated
2
Artemis/Artemis/Settings/General.Designer.cs
generated
@ -73,7 +73,7 @@ namespace Artemis.Settings {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool Autorun {
|
||||
get {
|
||||
return ((bool)(this["Autorun"]));
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<Value Profile="(Default)">51364</Value>
|
||||
</Setting>
|
||||
<Setting Name="Autorun" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="Suspended" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Settings;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@ -29,11 +31,18 @@ namespace Artemis.Utilities.GameState
|
||||
if (Running)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
_listener.Prefixes.Clear();
|
||||
Port = General.Default.GamestatePort;
|
||||
_listener.Prefixes.Add($"http://localhost:{Port}/");
|
||||
|
||||
_listener.Start();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Couldn't start the webserver. CS:GO effect won't work :c \n\nTry changing the port in Settings and restart Artemis.");
|
||||
}
|
||||
|
||||
ThreadPool.QueueUserWorkItem(o =>
|
||||
{
|
||||
|
||||
@ -1,34 +1,24 @@
|
||||
using System.Windows.Forms;
|
||||
using Gma.System.MouseKeyHook;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using VirtualInput;
|
||||
|
||||
namespace Artemis.Utilities.Keyboard
|
||||
{
|
||||
public class KeyboardHook
|
||||
{
|
||||
private IKeyboardMouseEvents _mGlobalHook;
|
||||
public int Subscriptions { get; set; }
|
||||
public delegate void KeyDownCallbackHandler(KeyEventArgs e);
|
||||
|
||||
public void Subscribe(KeyEventHandler handleKeypress)
|
||||
public KeyboardHook()
|
||||
{
|
||||
if (_mGlobalHook == null)
|
||||
_mGlobalHook = Hook.GlobalEvents();
|
||||
|
||||
_mGlobalHook.KeyDown += handleKeypress;
|
||||
Subscriptions++;
|
||||
VirtualKeyboard.KeyDown += VirtualKeyboardOnKeyDown;
|
||||
VirtualKeyboard.StartInterceptor();
|
||||
}
|
||||
|
||||
public void Unsubscribe(KeyEventHandler handleKeypress)
|
||||
private void VirtualKeyboardOnKeyDown(object sender, KeyEventArgs keyEventArgs)
|
||||
{
|
||||
if (_mGlobalHook == null)
|
||||
return;
|
||||
Task.Factory.StartNew(() => { KeyDownCallback?.Invoke(keyEventArgs); });
|
||||
}
|
||||
|
||||
_mGlobalHook.KeyDown -= handleKeypress;
|
||||
Subscriptions--;
|
||||
|
||||
if (Subscriptions >= 1)
|
||||
return;
|
||||
_mGlobalHook.Dispose();
|
||||
_mGlobalHook = null;
|
||||
}
|
||||
public event KeyDownCallbackHandler KeyDownCallback;
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,6 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Models;
|
||||
using Artemis.Services;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities.Memory;
|
||||
@ -15,7 +14,7 @@ namespace Artemis.Utilities
|
||||
{
|
||||
public static class Updater
|
||||
{
|
||||
public static int CurrentVersion = 100;
|
||||
public static int CurrentVersion = 102;
|
||||
|
||||
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Artemis.Events;
|
||||
using Artemis.Properties;
|
||||
using Artemis.Settings;
|
||||
using Artemis.Utilities;
|
||||
using Caliburn.Micro;
|
||||
@ -12,6 +13,7 @@ namespace Artemis.ViewModels
|
||||
private readonly ShellViewModel _shellViewModel;
|
||||
|
||||
private readonly IWindowManager _windowManager;
|
||||
private string _activeIcon;
|
||||
private bool _checkedForUpdate;
|
||||
private bool _enabled;
|
||||
private string _toggleText;
|
||||
@ -23,6 +25,7 @@ namespace Artemis.ViewModels
|
||||
_shellViewModel.MainManager.Events.Subscribe(this);
|
||||
_shellViewModel.MainManager.EnableProgram();
|
||||
_checkedForUpdate = false;
|
||||
//ActiveIcon = "../logo.ico";
|
||||
|
||||
if (General.Default.ShowOnStartup)
|
||||
ShowWindow();
|
||||
@ -41,10 +44,21 @@ namespace Artemis.ViewModels
|
||||
_enabled = value;
|
||||
|
||||
ToggleText = _enabled ? "Disable Artemis" : "Enable Artemis";
|
||||
ActiveIcon = _enabled ? "../Resources/logo.ico" : "../Resources/logo-disabled.ico";
|
||||
NotifyOfPropertyChange(() => Enabled);
|
||||
}
|
||||
}
|
||||
|
||||
public string ActiveIcon
|
||||
{
|
||||
get { return _activeIcon; }
|
||||
set
|
||||
{
|
||||
_activeIcon = value;
|
||||
NotifyOfPropertyChange();
|
||||
}
|
||||
}
|
||||
|
||||
public string ToggleText
|
||||
{
|
||||
get { return _toggleText; }
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
mc:Ignorable="d"
|
||||
Title="Artemis" Height="670" Width="690"
|
||||
MinWidth="500" MinHeight="400"
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="/Artemis;component/logo.ico">
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico">
|
||||
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
||||
<Controls:MetroWindow.IconTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
<!-- the application main system tray icon -->
|
||||
<tb:TaskbarIcon x:Key="SystemTrayIcon"
|
||||
IconSource="../logo.ico"
|
||||
IconSource="{Binding Path=ActiveIcon, Mode=OneWay}"
|
||||
ToolTipText="Artemis"
|
||||
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
|
||||
ContextMenu="{StaticResource MainSysTrayMenu}" />
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<?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" />
|
||||
@ -12,8 +11,8 @@
|
||||
<package id="log4net" version="2.0.5" targetFramework="net452" />
|
||||
<package id="MahApps.Metro" version="1.2.4.0" targetFramework="net452" />
|
||||
<package id="MahApps.Metro.Resources" version="0.4.0.0" targetFramework="net452" />
|
||||
<package id="MouseKeyHook" version="5.4.0" targetFramework="net452" />
|
||||
<package id="NAudio" version="1.7.3" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" />
|
||||
<package id="VirtualInput" version="1.0.1" targetFramework="net452" />
|
||||
<package id="WpfExceptionViewer" version="1.0.0.0" targetFramework="net452" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user