mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merging some old code
This commit is contained in:
commit
27660176a4
@ -3,8 +3,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<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.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.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.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.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.Effects.AudioVisualizer.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
@ -199,7 +199,7 @@
|
|||||||
<value>TypeWave</value>
|
<value>TypeWave</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="LastKeyboard" serializeAs="String">
|
<setting name="LastKeyboard" serializeAs="String">
|
||||||
<value />
|
<value>Logitech G910 RGB</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="EnablePointersUpdate" serializeAs="String">
|
<setting name="EnablePointersUpdate" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -208,17 +208,11 @@
|
|||||||
<value>51364</value>
|
<value>51364</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="Autorun" serializeAs="String">
|
<setting name="Autorun" serializeAs="String">
|
||||||
<value>False</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="Suspended" serializeAs="String">
|
<setting name="Suspended" serializeAs="String">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="ShowOnStartup" serializeAs="String">
|
|
||||||
<value>True</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="CheckForUpdates" serializeAs="String">
|
|
||||||
<value>True</value>
|
|
||||||
</setting>
|
|
||||||
</Artemis.Settings.General>
|
</Artemis.Settings.General>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
<runtime>
|
<runtime>
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<Application x:Class="Artemis.App"
|
<Application x:Class="Artemis.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:artemis="clr-namespace:Artemis"
|
xmlns:local="clr-namespace:Artemis"
|
||||||
DispatcherUnhandledException="Application_DispatcherUnhandledException"
|
DispatcherUnhandledException="Application_DispatcherUnhandledException"
|
||||||
ShutdownMode="OnExplicitShutdown">
|
ShutdownMode="OnExplicitShutdown">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<artemis:ArtemisBootstrapper x:Key="ArtemisBootstrapper" />
|
<local:ArtemisBootstrapper x:Key="ArtemisBootstrapper" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
|
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
||||||
|
|||||||
@ -16,8 +16,8 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
public CorsairRGB()
|
public CorsairRGB()
|
||||||
{
|
{
|
||||||
Name = "Corsair RGB Keyboards";
|
Name = "Corsair RGB Keyboards";
|
||||||
CantEnableText = "Couldn't connect to your Corsair keyboard.\n" +
|
CantEnableText = "Couldn't connect to your Corsair keyboard.\n " +
|
||||||
"Please check your cables and/or drivers (could be outdated) and that Corsair Utility Engine is running.\n\n" +
|
"Please check your cables and/or drivers (could be outdated) and that Corsair Utility Engine is running.\n\n " +
|
||||||
"If needed, you can select a different keyboard in Artemis under settings.";
|
"If needed, you can select a different keyboard in Artemis under settings.";
|
||||||
KeyboardRegions = new List<KeyboardRegion>();
|
KeyboardRegions = new List<KeyboardRegion>();
|
||||||
}
|
}
|
||||||
@ -103,6 +103,7 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap
|
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap
|
||||||
/// size.
|
/// size.
|
||||||
|
/// Does not reset the color each time. Uncomment line 48 for collor reset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitmap"></param>
|
/// <param name="bitmap"></param>
|
||||||
public override void DrawBitmap(Bitmap bitmap)
|
public override void DrawBitmap(Bitmap bitmap)
|
||||||
@ -124,4 +125,4 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
_keyboard.Update(true);
|
_keyboard.Update(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
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
|
||||||
|
|||||||
@ -10,10 +10,8 @@ namespace Artemis.Managers
|
|||||||
{
|
{
|
||||||
public class EffectManager
|
public class EffectManager
|
||||||
{
|
{
|
||||||
private readonly IEventAggregator _events;
|
|
||||||
private readonly MainManager _mainManager;
|
private readonly MainManager _mainManager;
|
||||||
private bool _clearing;
|
private readonly IEventAggregator _events;
|
||||||
private EffectModel _pauseEffect;
|
|
||||||
|
|
||||||
public EffectManager(MainManager mainManager, IEventAggregator events)
|
public EffectManager(MainManager mainManager, IEventAggregator events)
|
||||||
{
|
{
|
||||||
@ -25,6 +23,7 @@ namespace Artemis.Managers
|
|||||||
|
|
||||||
public List<EffectModel> EffectModels { get; set; }
|
public List<EffectModel> EffectModels { get; set; }
|
||||||
public EffectModel ActiveEffect { get; private set; }
|
public EffectModel ActiveEffect { get; private set; }
|
||||||
|
public EffectModel PauseEffect { get; private set; }
|
||||||
|
|
||||||
public IEnumerable<OverlayModel> EnabledOverlays
|
public IEnumerable<OverlayModel> EnabledOverlays
|
||||||
{
|
{
|
||||||
@ -84,27 +83,27 @@ namespace Artemis.Managers
|
|||||||
|
|
||||||
private void ChangeEffectWithPause(EffectModel effectModel)
|
private void ChangeEffectWithPause(EffectModel effectModel)
|
||||||
{
|
{
|
||||||
if (_pauseEffect != null)
|
if (PauseEffect != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_pauseEffect = effectModel;
|
PauseEffect = effectModel;
|
||||||
_mainManager.Pause();
|
_mainManager.Pause();
|
||||||
_mainManager.PauseCallback += ChangeEffectPauseCallback;
|
_mainManager.PauseCallback += MainManagerOnPauseCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeEffectPauseCallback()
|
private void MainManagerOnPauseCallback()
|
||||||
{
|
{
|
||||||
// Change effect logic
|
// Change effect logic
|
||||||
ActiveEffect?.Dispose();
|
ActiveEffect?.Dispose();
|
||||||
|
|
||||||
ActiveEffect = _pauseEffect;
|
ActiveEffect = PauseEffect;
|
||||||
ActiveEffect.Enable();
|
ActiveEffect.Enable();
|
||||||
|
|
||||||
// Let the ViewModels know
|
// Let the ViewModels know
|
||||||
_events.PublishOnUIThread(new ActiveEffectChanged(ActiveEffect.Name));
|
_events.PublishOnUIThread(new ActiveEffectChanged(ActiveEffect.Name));
|
||||||
|
|
||||||
|
PauseEffect = null;
|
||||||
_mainManager.Unpause();
|
_mainManager.Unpause();
|
||||||
_pauseEffect = null;
|
|
||||||
|
|
||||||
if (ActiveEffect is GameModel)
|
if (ActiveEffect is GameModel)
|
||||||
return;
|
return;
|
||||||
@ -119,34 +118,18 @@ namespace Artemis.Managers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void ClearEffect()
|
public void ClearEffect()
|
||||||
{
|
{
|
||||||
if (_clearing)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
||||||
_clearing = true;
|
|
||||||
|
|
||||||
_mainManager.Pause();
|
|
||||||
_mainManager.PauseCallback += ClearEffectPauseCallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClearEffectPauseCallback()
|
|
||||||
{
|
|
||||||
ActiveEffect.Dispose();
|
ActiveEffect.Dispose();
|
||||||
ActiveEffect = null;
|
ActiveEffect = null;
|
||||||
|
|
||||||
General.Default.LastEffect = null;
|
General.Default.LastEffect = null;
|
||||||
General.Default.Save();
|
General.Default.Save();
|
||||||
|
|
||||||
_events.PublishOnUIThread(new ActiveEffectChanged(""));
|
|
||||||
|
|
||||||
_clearing = false;
|
|
||||||
_mainManager.Unpause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -19,40 +19,29 @@ namespace Artemis.Managers
|
|||||||
public List<KeyboardProvider> KeyboardProviders { get; set; }
|
public List<KeyboardProvider> KeyboardProviders { get; set; }
|
||||||
public KeyboardProvider ActiveKeyboard { get; set; }
|
public KeyboardProvider ActiveKeyboard { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
public bool LoadLastKeyboard()
|
||||||
/// Enables the last keyboard according to the settings file
|
|
||||||
/// </summary>
|
|
||||||
public void EnableLastKeyboard()
|
|
||||||
{
|
{
|
||||||
if (General.Default.LastKeyboard == null)
|
|
||||||
return;
|
|
||||||
if (General.Default.LastKeyboard == "")
|
|
||||||
return;
|
|
||||||
|
|
||||||
var keyboard = KeyboardProviders.FirstOrDefault(k => k.Name == General.Default.LastKeyboard);
|
var keyboard = KeyboardProviders.FirstOrDefault(k => k.Name == General.Default.LastKeyboard);
|
||||||
EnableKeyboard(keyboard);
|
return ChangeKeyboard(keyboard ?? KeyboardProviders.First());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public bool ChangeKeyboard(KeyboardProvider keyboardProvider)
|
||||||
/// Enables the given keyboard
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="keyboardProvider"></param>
|
|
||||||
public void EnableKeyboard(KeyboardProvider keyboardProvider)
|
|
||||||
{
|
{
|
||||||
ReleaseActiveKeyboard();
|
|
||||||
|
|
||||||
if (keyboardProvider == null)
|
if (keyboardProvider == null)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
if (ActiveKeyboard != null)
|
if (ActiveKeyboard != null)
|
||||||
if (keyboardProvider.Name == ActiveKeyboard.Name)
|
if (keyboardProvider.Name == ActiveKeyboard.Name)
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
|
ReleaseActiveKeyboard();
|
||||||
|
|
||||||
// Disable everything if there's no active keyboard found
|
// Disable everything if there's no active keyboard found
|
||||||
if (!keyboardProvider.CanEnable())
|
if (!keyboardProvider.CanEnable())
|
||||||
{
|
{
|
||||||
_mainManager.DialogService.ShowErrorMessageBox(keyboardProvider.CantEnableText);
|
MessageBox.Show(keyboardProvider.CantEnableText, "Artemis (╯°□°)╯︵ ┻━┻", MessageBoxButtons.OK,
|
||||||
return;
|
MessageBoxIcon.Warning);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveKeyboard = keyboardProvider;
|
ActiveKeyboard = keyboardProvider;
|
||||||
@ -60,11 +49,10 @@ namespace Artemis.Managers
|
|||||||
|
|
||||||
General.Default.LastKeyboard = ActiveKeyboard.Name;
|
General.Default.LastKeyboard = ActiveKeyboard.Name;
|
||||||
General.Default.Save();
|
General.Default.Save();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Releases the active keyboard
|
|
||||||
/// </summary>
|
|
||||||
public void ReleaseActiveKeyboard()
|
public void ReleaseActiveKeyboard()
|
||||||
{
|
{
|
||||||
if (ActiveKeyboard == null)
|
if (ActiveKeyboard == null)
|
||||||
@ -73,20 +61,5 @@ namespace Artemis.Managers
|
|||||||
ActiveKeyboard.Disable();
|
ActiveKeyboard.Disable();
|
||||||
ActiveKeyboard = null;
|
ActiveKeyboard = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Changes the active keyboard
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="keyboardProvider"></param>
|
|
||||||
public void ChangeKeyboard(KeyboardProvider keyboardProvider)
|
|
||||||
{
|
|
||||||
if (keyboardProvider == ActiveKeyboard)
|
|
||||||
return;
|
|
||||||
|
|
||||||
General.Default.LastKeyboard = keyboardProvider?.Name;
|
|
||||||
General.Default.Save();
|
|
||||||
|
|
||||||
_mainManager.Restart();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,9 +2,9 @@
|
|||||||
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.Services;
|
|
||||||
using Artemis.Utilities.GameState;
|
using Artemis.Utilities.GameState;
|
||||||
using Artemis.Utilities.Keyboard;
|
using Artemis.Utilities.Keyboard;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
@ -17,12 +17,10 @@ namespace Artemis.Managers
|
|||||||
|
|
||||||
private readonly int _fps;
|
private readonly int _fps;
|
||||||
private bool _paused;
|
private bool _paused;
|
||||||
private bool _restarting;
|
|
||||||
|
|
||||||
public MainManager(IEventAggregator events, MetroDialogService dialogService)
|
public MainManager(IEventAggregator events)
|
||||||
{
|
{
|
||||||
Events = events;
|
Events = events;
|
||||||
DialogService = dialogService;
|
|
||||||
|
|
||||||
KeyboardManager = new KeyboardManager(this);
|
KeyboardManager = new KeyboardManager(this);
|
||||||
EffectManager = new EffectManager(this, Events);
|
EffectManager = new EffectManager(this, Events);
|
||||||
@ -30,7 +28,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;
|
||||||
@ -59,7 +57,6 @@ namespace Artemis.Managers
|
|||||||
|
|
||||||
public GameStateWebServer GameStateWebServer { get; set; }
|
public GameStateWebServer GameStateWebServer { get; set; }
|
||||||
public IEventAggregator Events { get; set; }
|
public IEventAggregator Events { get; set; }
|
||||||
public MetroDialogService DialogService { get; set; }
|
|
||||||
|
|
||||||
public bool ProgramEnabled { get; private set; }
|
public bool ProgramEnabled { get; private set; }
|
||||||
public bool Suspended { get; set; }
|
public bool Suspended { get; set; }
|
||||||
@ -82,8 +79,7 @@ namespace Artemis.Managers
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Only continue if a keyboard was loaded
|
// Only continue if a keyboard was loaded
|
||||||
KeyboardManager.EnableLastKeyboard();
|
if (!KeyboardManager.LoadLastKeyboard())
|
||||||
if (KeyboardManager.ActiveKeyboard == null)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Running = true;
|
Running = true;
|
||||||
@ -133,41 +129,6 @@ namespace Artemis.Managers
|
|||||||
PauseCallback = null;
|
PauseCallback = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shutdown()
|
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
ProcessWorker.CancelAsync();
|
|
||||||
GameStateWebServer.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Restart()
|
|
||||||
{
|
|
||||||
if (_restarting)
|
|
||||||
return;
|
|
||||||
if (!Running)
|
|
||||||
{
|
|
||||||
Start();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_restarting = true;
|
|
||||||
|
|
||||||
UpdateWorker.RunWorkerCompleted += FinishRestart;
|
|
||||||
Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FinishRestart(object sender, RunWorkerCompletedEventArgs e)
|
|
||||||
{
|
|
||||||
UpdateWorker.RunWorkerCompleted -= FinishRestart;
|
|
||||||
|
|
||||||
if (e.Error != null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Start();
|
|
||||||
|
|
||||||
_restarting = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the last active effect and starts the program
|
/// Loads the last active effect and starts the program
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -294,5 +255,12 @@ namespace Artemis.Managers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public void Shutdown()
|
||||||
|
{
|
||||||
|
Stop();
|
||||||
|
ProcessWorker.CancelAsync();
|
||||||
|
GameStateWebServer.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,32 +1,31 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
|
|
||||||
namespace Artemis.Models
|
namespace Artemis.Models
|
||||||
{
|
{
|
||||||
public abstract class EffectModel : IDisposable
|
public abstract class EffectModel : IDisposable
|
||||||
{
|
{
|
||||||
public delegate void SettingsUpdateHandler(EffectSettings settings);
|
public delegate void SettingsUpdateHandler(EffectSettings settings);
|
||||||
|
|
||||||
public bool Initialized;
|
public MainManager MainManager;
|
||||||
|
public string Name;
|
||||||
public MainManager MainManager;
|
public bool Initialized;
|
||||||
public string Name;
|
|
||||||
|
protected EffectModel(MainManager mainManager)
|
||||||
protected EffectModel(MainManager mainManager)
|
{
|
||||||
{
|
MainManager = mainManager;
|
||||||
MainManager = mainManager;
|
}
|
||||||
}
|
|
||||||
|
public abstract void Dispose();
|
||||||
public abstract void Dispose();
|
|
||||||
|
// Called on creation
|
||||||
// Called on creation
|
public abstract void Enable();
|
||||||
public abstract void Enable();
|
|
||||||
|
// Called every iteration
|
||||||
// Called every iteration
|
public abstract void Update();
|
||||||
public abstract void Update();
|
|
||||||
|
// Called after every update
|
||||||
// Called after every update
|
public abstract Bitmap GenerateBitmap();
|
||||||
public abstract Bitmap GenerateBitmap();
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,26 +1,26 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Artemis.Utilities.Memory
|
namespace Artemis.Models
|
||||||
{
|
{
|
||||||
public class GamePointer
|
public class GamePointersCollectionModel
|
||||||
{
|
{
|
||||||
public string Description { get; set; }
|
public string Game { get; set; }
|
||||||
public IntPtr BasePointer { get; set; }
|
public string GameVersion { get; set; }
|
||||||
public int[] Offsets { get; set; }
|
public List<GamePointer> GameAddresses { get; set; }
|
||||||
|
}
|
||||||
public override string ToString()
|
|
||||||
{
|
public class GamePointer
|
||||||
return Offsets.Aggregate(BasePointer.ToString("X"),
|
{
|
||||||
(current, offset) => current + $"+{offset.ToString("X")}");
|
public string Description { get; set; }
|
||||||
}
|
public IntPtr BasePointer { get; set; }
|
||||||
}
|
public int[] Offsets { get; set; }
|
||||||
|
|
||||||
public class GamePointersCollection
|
public override string ToString()
|
||||||
{
|
{
|
||||||
public string Game { get; set; }
|
return Offsets.Aggregate(BasePointer.ToString("X"),
|
||||||
public string GameVersion { get; set; }
|
(current, offset) => current + $"+{offset.ToString("X")}");
|
||||||
public List<GamePointer> GameAddresses { get; set; }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +0,0 @@
|
|||||||
namespace Artemis.Models
|
|
||||||
{
|
|
||||||
public abstract class GameSettings : EffectSettings
|
|
||||||
{
|
|
||||||
public bool Enabled { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -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 _fromBottom;
|
|
||||||
private bool _generating;
|
private bool _generating;
|
||||||
private int _sensitivity;
|
|
||||||
private IWaveIn _waveIn;
|
private IWaveIn _waveIn;
|
||||||
|
private int _sensitivity;
|
||||||
|
private bool _fromBottom;
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@ -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 -->
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
EffectModel = new AudioVisualizerModel(mainManager, (AudioVisualizerSettings) EffectSettings);
|
EffectModel = new AudioVisualizerModel(mainManager, (AudioVisualizerSettings) EffectSettings);
|
||||||
MainManager.EffectManager.EffectModels.Add(EffectModel);
|
MainManager.EffectManager.EffectModels.Add((AudioVisualizerModel) EffectModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Name => "Audio Visualizer";
|
public static string Name => "Audio Visualizer";
|
||||||
|
|||||||
@ -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>
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ namespace Artemis.Modules.Effects.Debug
|
|||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
EffectModel = new DebugEffectModel(mainManager, (DebugEffectSettings) EffectSettings);
|
EffectModel = new DebugEffectModel(mainManager, (DebugEffectSettings) EffectSettings);
|
||||||
MainManager.EffectManager.EffectModels.Add(EffectModel);
|
MainManager.EffectManager.EffectModels.Add((DebugEffectModel) EffectModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,8 +37,7 @@
|
|||||||
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}"
|
<TextBlock Background="{DynamicResource AccentColorBrush}" Foreground="{DynamicResource IdealForegroundColorBrush}"
|
||||||
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>
|
||||||
|
|||||||
@ -15,7 +15,7 @@ namespace Artemis.Modules.Effects.TypeHole
|
|||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
EffectModel = new TypeHoleModel(mainManager);
|
EffectModel = new TypeHoleModel(mainManager);
|
||||||
MainManager.EffectManager.EffectModels.Add(EffectModel);
|
MainManager.EffectManager.EffectModels.Add((TypeHoleModel) EffectModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Name => "Type Holes (NYI)";
|
public static string Name => "Type Holes (NYI)";
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Artemis.KeyboardProviders.Corsair;
|
using Artemis.KeyboardProviders.Corsair;
|
||||||
using Artemis.KeyboardProviders.Logitech.Utilities;
|
using Artemis.KeyboardProviders.Logitech.Utilities;
|
||||||
@ -23,33 +24,14 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
_randomColor = Color.Red;
|
_randomColor = Color.Red;
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
Initialized = false;
|
Initialized = false;
|
||||||
Scale = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Scale { get; set; }
|
|
||||||
|
|
||||||
public TypeWaveSettings Settings { get; set; }
|
public TypeWaveSettings Settings { get; set; }
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
Initialized = false;
|
Initialized = false;
|
||||||
MainManager.KeyboardHook.KeyDownCallback -= KeyboardHookOnKeyDownCallback;
|
MainManager.KeyboardHook.Unsubscribe(HandleKeypress);
|
||||||
}
|
|
||||||
|
|
||||||
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()
|
public override void Enable()
|
||||||
@ -57,7 +39,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
Initialized = false;
|
Initialized = false;
|
||||||
|
|
||||||
// Listener won't start unless the effect is active
|
// Listener won't start unless the effect is active
|
||||||
MainManager.KeyboardHook.KeyDownCallback += KeyboardHookOnKeyDownCallback;
|
MainManager.KeyboardHook.Subscribe(HandleKeypress);
|
||||||
|
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
}
|
}
|
||||||
@ -72,7 +54,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
// TODO: Get from settings
|
// TODO: Get from settings
|
||||||
var fps = 25;
|
var fps = 25;
|
||||||
|
|
||||||
_waves[i].Size += Settings.SpreadSpeed * Scale;
|
_waves[i].Size += Settings.SpreadSpeed;
|
||||||
|
|
||||||
if (Settings.IsShiftColors)
|
if (Settings.IsShiftColors)
|
||||||
_waves[i].Color = ColorHelpers.ShiftColor(_waves[i].Color, Settings.ShiftColorSpeed);
|
_waves[i].Color = ColorHelpers.ShiftColor(_waves[i].Color, Settings.ShiftColorSpeed);
|
||||||
@ -96,7 +78,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
if (_waves.Count == 0)
|
if (_waves.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var bitmap = MainManager.KeyboardManager.ActiveKeyboard.KeyboardBitmap(Scale);
|
var bitmap = MainManager.KeyboardManager.ActiveKeyboard.KeyboardBitmap();
|
||||||
using (var g = Graphics.FromImage(bitmap))
|
using (var g = Graphics.FromImage(bitmap))
|
||||||
{
|
{
|
||||||
g.Clear(Color.Transparent);
|
g.Clear(Color.Transparent);
|
||||||
@ -134,6 +116,27 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
}
|
}
|
||||||
return bitmap;
|
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
|
public class Wave
|
||||||
|
|||||||
@ -40,8 +40,7 @@
|
|||||||
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}"
|
<TextBlock Background="{DynamicResource AccentColorBrush}" Foreground="{DynamicResource IdealForegroundColorBrush}"
|
||||||
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>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace Artemis.Modules.Effects.TypeWave
|
|||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
EffectModel = new TypeWaveModel(mainManager, (TypeWaveSettings) EffectSettings);
|
EffectModel = new TypeWaveModel(mainManager, (TypeWaveSettings) EffectSettings);
|
||||||
MainManager.EffectManager.EffectModels.Add(EffectModel);
|
MainManager.EffectManager.EffectModels.Add((TypeWaveModel) EffectModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Name => "Type Waves";
|
public static string Name => "Type Waves";
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?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">
|
||||||
|
|||||||
@ -3,13 +3,14 @@ using Artemis.Models;
|
|||||||
|
|
||||||
namespace Artemis.Modules.Games.CounterStrike
|
namespace Artemis.Modules.Games.CounterStrike
|
||||||
{
|
{
|
||||||
public class CounterStrikeSettings : GameSettings
|
public class CounterStrikeSettings : EffectSettings
|
||||||
{
|
{
|
||||||
public CounterStrikeSettings()
|
public CounterStrikeSettings()
|
||||||
{
|
{
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Enabled { get; set; }
|
||||||
public string GameDirectory { get; set; }
|
public string GameDirectory { get; set; }
|
||||||
|
|
||||||
public bool AmmoEnabled { get; set; }
|
public bool AmmoEnabled { get; set; }
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<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"
|
||||||
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
IsChecked="{Binding Path=CounterStrikeSettings.Enabled, Mode=TwoWay}"
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
Width="130" HorizontalAlignment="Left" />
|
Width="130" HorizontalAlignment="Left" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||||
Text="{Binding Path=GameSettings.GameDirectory, Mode=TwoWay}"
|
Text="{Binding Path=CounterStrikeSettings.GameDirectory, Mode=TwoWay}"
|
||||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
||||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||||
HorizontalAlignment="Right" Width="25"
|
HorizontalAlignment="Right" Width="25"
|
||||||
@ -63,7 +63,7 @@
|
|||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Display ammo on F-keys
|
Display ammo on F-keys
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.AmmoEnabled, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=CounterStrikeSettings.AmmoEnabled, Mode=TwoWay}"
|
||||||
Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
@ -73,7 +73,7 @@
|
|||||||
Main ammo color
|
Main ammo color
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<xctk:ColorPicker x:Name="MainColor"
|
<xctk:ColorPicker x:Name="MainColor"
|
||||||
SelectedColor="{Binding Path=GameSettings.AmmoMainColor, Mode=TwoWay}"
|
SelectedColor="{Binding Path=CounterStrikeSettings.AmmoMainColor, Mode=TwoWay}"
|
||||||
Grid.Row="3" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
Grid.Row="3" 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" />
|
||||||
|
|
||||||
@ -83,7 +83,7 @@
|
|||||||
Secondary ammo color
|
Secondary ammo color
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<xctk:ColorPicker x:Name="SecondaryColor"
|
<xctk:ColorPicker x:Name="SecondaryColor"
|
||||||
SelectedColor="{Binding Path=GameSettings.AmmoSecondaryColor, Mode=TwoWay}"
|
SelectedColor="{Binding Path=CounterStrikeSettings.AmmoSecondaryColor, Mode=TwoWay}"
|
||||||
Grid.Row="4" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
Grid.Row="4" 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" />
|
||||||
|
|
||||||
@ -92,7 +92,7 @@
|
|||||||
Height="16" Margin="0,9,0,10">
|
Height="16" Margin="0,9,0,10">
|
||||||
Display smoked effect
|
Display smoked effect
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.SmokeEnabled, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=CounterStrikeSettings.SmokeEnabled, Mode=TwoWay}"
|
||||||
Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
@ -101,7 +101,7 @@
|
|||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Display flashed effect
|
Display flashed effect
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.FlashEnabled, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=CounterStrikeSettings.FlashEnabled, Mode=TwoWay}"
|
||||||
Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
@ -110,7 +110,7 @@
|
|||||||
Height="16" Margin="0,9,0,10">
|
Height="16" Margin="0,9,0,10">
|
||||||
Color keyboard according to team
|
Color keyboard according to team
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.TeamColorEnabled, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=CounterStrikeSettings.TeamColorEnabled, Mode=TwoWay}"
|
||||||
Grid.Row="7" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="7" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
@ -119,7 +119,7 @@
|
|||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Color keyboard red on low HP
|
Color keyboard red on low HP
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.LowHpEnabled, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=CounterStrikeSettings.LowHpEnabled, Mode=TwoWay}"
|
||||||
Grid.Row="8" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="8" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
|
|||||||
@ -2,63 +2,92 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Artemis.ViewModels.Abstract;
|
using Screen = Caliburn.Micro.Screen;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.CounterStrike
|
namespace Artemis.Modules.Games.CounterStrike
|
||||||
{
|
{
|
||||||
public class CounterStrikeViewModel : GameViewModel
|
public class CounterStrikeViewModel : Screen
|
||||||
{
|
{
|
||||||
|
private CounterStrikeSettings _counterStrikeSettings;
|
||||||
|
|
||||||
public CounterStrikeViewModel(MainManager mainManager)
|
public CounterStrikeViewModel(MainManager mainManager)
|
||||||
{
|
{
|
||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
|
|
||||||
// Settings are loaded from file by class
|
// Settings are loaded from file by class
|
||||||
GameSettings = new CounterStrikeSettings();
|
CounterStrikeSettings = new CounterStrikeSettings();
|
||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
GameModel = new CounterStrikeModel(mainManager, (CounterStrikeSettings) GameSettings);
|
CounterStrikeModel = new CounterStrikeModel(mainManager, CounterStrikeSettings);
|
||||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
MainManager.EffectManager.EffectModels.Add(CounterStrikeModel);
|
||||||
PlaceConfigFile();
|
PlaceConfigFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CounterStrikeSettings CounterStrikeSettings
|
||||||
|
{
|
||||||
|
get { return _counterStrikeSettings; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Equals(value, _counterStrikeSettings)) return;
|
||||||
|
_counterStrikeSettings = value;
|
||||||
|
NotifyOfPropertyChange(() => CounterStrikeSettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CounterStrikeModel CounterStrikeModel { get; set; }
|
||||||
|
|
||||||
|
public MainManager MainManager { get; set; }
|
||||||
|
|
||||||
public static string Name => "CS:GO";
|
public static string Name => "CS:GO";
|
||||||
public string Content => "Counter-Strike: GO Content";
|
public string Content => "Counter-Strike: GO Content";
|
||||||
|
|
||||||
|
public void SaveSettings()
|
||||||
|
{
|
||||||
|
CounterStrikeSettings?.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetSettings()
|
||||||
|
{
|
||||||
|
// TODO: Confirmation dialog (Generic MVVM approach)
|
||||||
|
CounterStrikeSettings.ToDefault();
|
||||||
|
NotifyOfPropertyChange(() => CounterStrikeSettings);
|
||||||
|
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleEffect()
|
||||||
|
{
|
||||||
|
CounterStrikeModel.Enabled = _counterStrikeSettings.Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
public void BrowseDirectory()
|
public void BrowseDirectory()
|
||||||
{
|
{
|
||||||
var dialog = new FolderBrowserDialog {SelectedPath = ((CounterStrikeSettings) GameSettings).GameDirectory};
|
var dialog = new FolderBrowserDialog {SelectedPath = CounterStrikeSettings.GameDirectory};
|
||||||
var result = dialog.ShowDialog();
|
var result = dialog.ShowDialog();
|
||||||
if (result != DialogResult.OK)
|
if (result != DialogResult.OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
((CounterStrikeSettings) GameSettings).GameDirectory = dialog.SelectedPath;
|
CounterStrikeSettings.GameDirectory = dialog.SelectedPath;
|
||||||
NotifyOfPropertyChange(() => GameSettings);
|
NotifyOfPropertyChange(() => CounterStrikeSettings);
|
||||||
|
|
||||||
GameSettings.Save();
|
|
||||||
PlaceConfigFile();
|
PlaceConfigFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlaceConfigFile()
|
public void PlaceConfigFile()
|
||||||
{
|
{
|
||||||
if (((CounterStrikeSettings) GameSettings).GameDirectory == string.Empty)
|
if (CounterStrikeSettings.GameDirectory == string.Empty)
|
||||||
return;
|
return;
|
||||||
if (Directory.Exists(((CounterStrikeSettings) GameSettings).GameDirectory + "/csgo/cfg"))
|
if (Directory.Exists(CounterStrikeSettings.GameDirectory + "/csgo/cfg"))
|
||||||
{
|
{
|
||||||
var cfgFile = Resources.gamestateConfiguration.Replace("{{port}}",
|
var cfgFile = Resources.gamestateConfiguration.Replace("{{port}}",
|
||||||
MainManager.GameStateWebServer.Port.ToString());
|
MainManager.GameStateWebServer.Port.ToString());
|
||||||
File.WriteAllText(
|
File.WriteAllText(CounterStrikeSettings.GameDirectory + "/csgo/cfg/gamestate_integration_artemis.cfg",
|
||||||
((CounterStrikeSettings) GameSettings).GameDirectory + "/csgo/cfg/gamestate_integration_artemis.cfg",
|
|
||||||
cfgFile);
|
cfgFile);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainManager.DialogService.ShowErrorMessageBox("Please select a valid CS:GO directory\n\n" +
|
MessageBox.Show("Please select a valid CS:GO directory");
|
||||||
@"By default CS:GO is in \SteamApps\common\Counter-Strike Global Offensive");
|
CounterStrikeSettings.GameDirectory = string.Empty;
|
||||||
((CounterStrikeSettings) GameSettings).GameDirectory = string.Empty;
|
NotifyOfPropertyChange(() => CounterStrikeSettings);
|
||||||
NotifyOfPropertyChange(() => GameSettings);
|
|
||||||
|
|
||||||
GameSettings.Save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,15 +1,17 @@
|
|||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.ViewModels.Abstract;
|
using Caliburn.Micro;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.Dota2
|
namespace Artemis.Modules.Games.Dota2
|
||||||
{
|
{
|
||||||
public class Dota2ViewModel : GameViewModel
|
public class Dota2ViewModel : Screen
|
||||||
{
|
{
|
||||||
public Dota2ViewModel(MainManager mainManager)
|
public Dota2ViewModel(MainManager mainManager)
|
||||||
{
|
{
|
||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MainManager MainManager { get; set; }
|
||||||
|
|
||||||
public static string Name => "Dota 2 (NYI)";
|
public static string Name => "Dota 2 (NYI)";
|
||||||
public string Content => "Dota 2 Content";
|
public string Content => "Dota 2 Content";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?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">
|
||||||
|
|||||||
@ -49,8 +49,6 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
{
|
{
|
||||||
Initialized = false;
|
Initialized = false;
|
||||||
|
|
||||||
_contextualColor = Settings.ContextualColor;
|
|
||||||
|
|
||||||
_boostRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>
|
_boostRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>
|
||||||
{
|
{
|
||||||
ColorHelpers.ToDrawingColor(Settings.MainColor),
|
ColorHelpers.ToDrawingColor(Settings.MainColor),
|
||||||
@ -73,6 +71,7 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
if (_memory == null)
|
if (_memory == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ContextualColor = Settings.ContextualColor;
|
||||||
var offsets = _pointer.GameAddresses.First(ga => ga.Description == "Boost").ToString();
|
var offsets = _pointer.GameAddresses.First(ga => ga.Description == "Boost").ToString();
|
||||||
var boostAddress = _memory.GetAddress("\"RocketLeague.exe\"" + offsets);
|
var boostAddress = _memory.GetAddress("\"RocketLeague.exe\"" + offsets);
|
||||||
var boostFloat = _memory.ReadFloat(boostAddress)*100/3;
|
var boostFloat = _memory.ReadFloat(boostAddress)*100/3;
|
||||||
|
|||||||
@ -3,13 +3,14 @@ using Artemis.Models;
|
|||||||
|
|
||||||
namespace Artemis.Modules.Games.RocketLeague
|
namespace Artemis.Modules.Games.RocketLeague
|
||||||
{
|
{
|
||||||
public class RocketLeagueSettings : GameSettings
|
public class RocketLeagueSettings : EffectSettings
|
||||||
{
|
{
|
||||||
public RocketLeagueSettings()
|
public RocketLeagueSettings()
|
||||||
{
|
{
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Enabled { get; set; }
|
||||||
public Color MainColor { get; set; }
|
public Color MainColor { get; set; }
|
||||||
public Color SecondaryColor { get; set; }
|
public Color SecondaryColor { get; set; }
|
||||||
public bool ContextualColor { get; set; }
|
public bool ContextualColor { get; set; }
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<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"
|
||||||
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
IsChecked="{Binding Path=RocketLeagueSettings.Enabled, Mode=TwoWay}"
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
Main boost display color
|
Main boost display color
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<xctk:ColorPicker x:Name="MainColor"
|
<xctk:ColorPicker x:Name="MainColor"
|
||||||
SelectedColor="{Binding Path=GameSettings.MainColor, Mode=TwoWay}"
|
SelectedColor="{Binding Path=RocketLeagueSettings.MainColor, Mode=TwoWay}"
|
||||||
Grid.Row="1" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
Grid.Row="1" 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" />
|
||||||
|
|
||||||
@ -56,7 +56,7 @@
|
|||||||
Secondary boost display color
|
Secondary boost display color
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<xctk:ColorPicker x:Name="SecondaryColor"
|
<xctk:ColorPicker x:Name="SecondaryColor"
|
||||||
SelectedColor="{Binding Path=GameSettings.SecondaryColor, Mode=TwoWay}"
|
SelectedColor="{Binding Path=RocketLeagueSettings.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" />
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
Height="16" Margin="0,8">
|
Height="16" Margin="0,8">
|
||||||
Color bar according to boost amount
|
Color bar according to boost amount
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.ContextualColor, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=RocketLeagueSettings.ContextualColor, Mode=TwoWay}"
|
||||||
Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
@ -76,10 +76,9 @@
|
|||||||
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"
|
<TextBlock x:Name="VersionText" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
|
||||||
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">
|
||||||
|
|||||||
@ -1,14 +1,16 @@
|
|||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
|
using Artemis.Models;
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using Artemis.Utilities.Memory;
|
using Artemis.Utilities.Memory;
|
||||||
using Artemis.ViewModels.Abstract;
|
using Caliburn.Micro;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.RocketLeague
|
namespace Artemis.Modules.Games.RocketLeague
|
||||||
{
|
{
|
||||||
public class RocketLeagueViewModel : GameViewModel
|
public class RocketLeagueViewModel : Screen
|
||||||
{
|
{
|
||||||
|
private RocketLeagueSettings _rocketLeagueSettings;
|
||||||
private string _versionText;
|
private string _versionText;
|
||||||
|
|
||||||
public RocketLeagueViewModel(MainManager mainManager)
|
public RocketLeagueViewModel(MainManager mainManager)
|
||||||
@ -16,17 +18,15 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
|
|
||||||
// Settings are loaded from file by class
|
// Settings are loaded from file by class
|
||||||
GameSettings = new RocketLeagueSettings();
|
RocketLeagueSettings = new RocketLeagueSettings();
|
||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
GameModel = new RocketLeagueModel(mainManager, (RocketLeagueSettings) GameSettings);
|
RocketLeagueModel = new RocketLeagueModel(mainManager, RocketLeagueSettings);
|
||||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
MainManager.EffectManager.EffectModels.Add(RocketLeagueModel);
|
||||||
|
|
||||||
SetVersionText();
|
SetVersionText();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Name => "Rocket League";
|
|
||||||
|
|
||||||
public string VersionText
|
public string VersionText
|
||||||
{
|
{
|
||||||
get { return _versionText; }
|
get { return _versionText; }
|
||||||
@ -38,8 +38,22 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string Name => "Rocket League";
|
||||||
|
|
||||||
|
public MainManager MainManager { get; set; }
|
||||||
public RocketLeagueModel RocketLeagueModel { get; set; }
|
public RocketLeagueModel RocketLeagueModel { get; set; }
|
||||||
|
|
||||||
|
public RocketLeagueSettings RocketLeagueSettings
|
||||||
|
{
|
||||||
|
get { return _rocketLeagueSettings; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Equals(value, _rocketLeagueSettings)) return;
|
||||||
|
_rocketLeagueSettings = value;
|
||||||
|
NotifyOfPropertyChange(() => RocketLeagueSettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetVersionText()
|
private void SetVersionText()
|
||||||
{
|
{
|
||||||
if (!General.Default.EnablePointersUpdate)
|
if (!General.Default.EnablePointersUpdate)
|
||||||
@ -51,10 +65,32 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
|
|
||||||
Updater.GetPointers();
|
Updater.GetPointers();
|
||||||
var version = JsonConvert
|
var version = JsonConvert
|
||||||
.DeserializeObject<GamePointersCollection>(Offsets.Default.RocketLeague)
|
.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague)
|
||||||
.GameVersion;
|
.GameVersion;
|
||||||
VersionText = $"Note: Requires patch {version}. When a new patch is released Artemis downloads " +
|
VersionText = $"Note: Requires patch {version}. When a new patch is released Artemis downloads " +
|
||||||
"new pointers for the latest version (unless disabled in settings).";
|
"new pointers for the latest version (unless disabled in settings).";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SaveSettings()
|
||||||
|
{
|
||||||
|
if (RocketLeagueModel == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
RocketLeagueSettings.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetSettings()
|
||||||
|
{
|
||||||
|
// TODO: Confirmation dialog (Generic MVVM approach)
|
||||||
|
RocketLeagueSettings.ToDefault();
|
||||||
|
NotifyOfPropertyChange(() => RocketLeagueSettings);
|
||||||
|
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleEffect()
|
||||||
|
{
|
||||||
|
RocketLeagueModel.Enabled = _rocketLeagueSettings.Enabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,5 @@
|
|||||||
<?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">
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
namespace Artemis.Modules.Games.Witcher3
|
namespace Artemis.Modules.Games.Witcher3
|
||||||
{
|
{
|
||||||
public class Witcher3Settings : GameSettings
|
public class Witcher3Settings : EffectSettings
|
||||||
{
|
{
|
||||||
public Witcher3Settings()
|
public Witcher3Settings()
|
||||||
{
|
{
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Enabled { get; set; }
|
||||||
|
|
||||||
public sealed override void Load()
|
public sealed override void Load()
|
||||||
{
|
{
|
||||||
Enabled = Witcher3.Default.Enabled;
|
Enabled = Witcher3.Default.Enabled;
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<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"
|
||||||
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
IsChecked="{Binding Path=Witcher3Settings.Enabled, Mode=TwoWay}"
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@ -5,27 +5,65 @@ using System.Linq;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Artemis.ViewModels.Abstract;
|
using Screen = Caliburn.Micro.Screen;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.Witcher3
|
namespace Artemis.Modules.Games.Witcher3
|
||||||
{
|
{
|
||||||
public class Witcher3ViewModel : GameViewModel
|
public class Witcher3ViewModel : Screen
|
||||||
{
|
{
|
||||||
|
private Witcher3Settings _witcher3Settings;
|
||||||
|
|
||||||
public Witcher3ViewModel(MainManager mainManager)
|
public Witcher3ViewModel(MainManager mainManager)
|
||||||
{
|
{
|
||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
|
|
||||||
// Settings are loaded from file by class
|
// Settings are loaded from file by class
|
||||||
GameSettings = new Witcher3Settings();
|
Witcher3Settings = new Witcher3Settings();
|
||||||
|
|
||||||
// Create effect model and add it to MainManager
|
// Create effect model and add it to MainManager
|
||||||
GameModel = new Witcher3Model(mainManager, (Witcher3Settings) GameSettings);
|
Witcher3Model = new Witcher3Model(mainManager, Witcher3Settings);
|
||||||
MainManager.EffectManager.EffectModels.Add(GameModel);
|
MainManager.EffectManager.EffectModels.Add(Witcher3Model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Name => "The Witcher 3";
|
public static string Name => "The Witcher 3";
|
||||||
|
|
||||||
public async void AutoInstall()
|
public MainManager MainManager { get; set; }
|
||||||
|
public Witcher3Model Witcher3Model { get; set; }
|
||||||
|
|
||||||
|
public Witcher3Settings Witcher3Settings
|
||||||
|
{
|
||||||
|
get { return _witcher3Settings; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Equals(value, _witcher3Settings)) return;
|
||||||
|
_witcher3Settings = value;
|
||||||
|
NotifyOfPropertyChange(() => Witcher3Settings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveSettings()
|
||||||
|
{
|
||||||
|
if (Witcher3Model == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Witcher3Settings.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetSettings()
|
||||||
|
{
|
||||||
|
// TODO: Confirmation dialog (Generic MVVM approach)
|
||||||
|
Witcher3Settings.ToDefault();
|
||||||
|
NotifyOfPropertyChange(() => Witcher3Settings);
|
||||||
|
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleEffect()
|
||||||
|
{
|
||||||
|
Witcher3Model.Enabled = _witcher3Settings.Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AutoInstall()
|
||||||
{
|
{
|
||||||
// Request The Witcher 3 folder
|
// Request The Witcher 3 folder
|
||||||
var dialog = new FolderBrowserDialog
|
var dialog = new FolderBrowserDialog
|
||||||
@ -39,16 +77,15 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
// If the subfolder doesn't contain witcher3.exe, it's the wrong folder.
|
// If the subfolder doesn't contain witcher3.exe, it's the wrong folder.
|
||||||
if (!File.Exists(dialog.SelectedPath + @"\bin\x64\witcher3.exe"))
|
if (!File.Exists(dialog.SelectedPath + @"\bin\x64\witcher3.exe"))
|
||||||
{
|
{
|
||||||
var retry = await
|
var error = MessageBox.Show("That's not a valid Witcher 3 directory\n\n" +
|
||||||
MainManager.DialogService.ShowQuestionMessageBox("Installation error",
|
"Default directories:\n" +
|
||||||
"That's not a valid Witcher 3 directory\n\n" +
|
"Steam: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher 3\n" +
|
||||||
"Default directories:\n" +
|
"GOG: C:\\GOG Games\\The Witcher 3 Wild Hunt", "Installation error",
|
||||||
"Steam: \\SteamApps\\common\\The Witcher 3\n" +
|
MessageBoxButtons.RetryCancel);
|
||||||
"GOG: C:\\GOG Games\\The Witcher 3 Wild Hunt\n\n" +
|
if (error == DialogResult.Retry)
|
||||||
"Retry?");
|
|
||||||
if (retry.Value)
|
|
||||||
AutoInstall();
|
AutoInstall();
|
||||||
return;
|
else
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for any conflicting mods
|
// Look for any conflicting mods
|
||||||
@ -62,21 +99,17 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
// Don't trip over our own mod
|
// Don't trip over our own mod
|
||||||
if (!file.Contains("modArtemis"))
|
if (!file.Contains("modArtemis"))
|
||||||
{
|
{
|
||||||
var viewHelp = await
|
MessageBox.Show("Oh no, you have a conflicting mod!\n\n" +
|
||||||
MainManager.DialogService.ShowQuestionMessageBox("Conflicting mod found",
|
"Conflicting file: " + file.Remove(0, dialog.SelectedPath.Length) +
|
||||||
"Oh no, you have a conflicting mod!\n\n" +
|
"\n\nOnce you press OK you will be taken to an instructions page.",
|
||||||
"Conflicting file: " + file.Remove(0, dialog.SelectedPath.Length) +
|
"Conflicting mod found");
|
||||||
"\n\nWould you like to view instructions on how to manually install the mod?");
|
|
||||||
if (!viewHelp.Value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Put the mod in the documents folder instead
|
// Put the mod in the documents folder instead
|
||||||
// Create the directory structure
|
// Create the directory structure
|
||||||
var folder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis";
|
var folder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis";
|
||||||
if (
|
if (
|
||||||
!Directory.Exists(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player"))
|
!Directory.Exists(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player"))
|
||||||
Directory.CreateDirectory(folder +
|
Directory.CreateDirectory(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player");
|
||||||
@"\Witcher3\mods\modArtemis\content\scripts\game\player");
|
|
||||||
if (
|
if (
|
||||||
!Directory.Exists(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc"))
|
!Directory.Exists(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc"))
|
||||||
Directory.CreateDirectory(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc");
|
Directory.CreateDirectory(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc");
|
||||||
@ -89,6 +122,7 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
Resources.playerWitcherWs);
|
Resources.playerWitcherWs);
|
||||||
|
|
||||||
Process.Start(new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
|
Process.Start(new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,7 +140,7 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
File.WriteAllText(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player\playerWitcher.ws",
|
File.WriteAllText(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player\playerWitcher.ws",
|
||||||
Resources.playerWitcherWs);
|
Resources.playerWitcherWs);
|
||||||
|
|
||||||
MainManager.DialogService.ShowMessageBox("Success", "The mod was successfully installed!");
|
MessageBox.Show("The mod was successfully installed!", "Success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,5 @@
|
|||||||
<?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">
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
@ -24,13 +25,13 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
|||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
MainManager.KeyboardHook.KeyDownCallback -= KeyPressTask;
|
MainManager.KeyboardHook.Unsubscribe(HandleKeypress);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
// Listener won't start unless the effect is active
|
// Listener won't start unless the effect is active
|
||||||
MainManager.KeyboardHook.KeyDownCallback += KeyPressTask;
|
MainManager.KeyboardHook.Subscribe(HandleKeypress);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
@ -79,6 +80,11 @@ namespace Artemis.Modules.Overlays.VolumeDisplay
|
|||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleKeypress(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
Task.Factory.StartNew(() => KeyPressTask(e));
|
||||||
|
}
|
||||||
|
|
||||||
private void KeyPressTask(KeyEventArgs e)
|
private void KeyPressTask(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode != Keys.VolumeUp && e.KeyCode != Keys.VolumeDown)
|
if (e.KeyCode != Keys.VolumeUp && e.KeyCode != Keys.VolumeDown)
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
250
Artemis/Artemis/Properties/Resources.Designer.cs
generated
250
Artemis/Artemis/Properties/Resources.Designer.cs
generated
@ -1,66 +1,66 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.42000
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Artemis.Properties {
|
namespace Artemis.Properties {
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources {
|
internal class Resources {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal Resources() {
|
internal Resources() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Artemis.Properties.Resources", typeof(Resources).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Artemis.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-16"?>
|
/// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-16"?>
|
||||||
///<!-- Used by Artemis to get the active Sign -->
|
///<!-- Used by Artemis to get the active Sign -->
|
||||||
///<UserConfig>
|
///<UserConfig>
|
||||||
@ -69,25 +69,25 @@ namespace Artemis.Properties {
|
|||||||
/// <Var id="ActiveSign" displayName="ActiveSign" displayType="SLIDER:0:1:1000000"/>
|
/// <Var id="ActiveSign" displayName="ActiveSign" displayType="SLIDER:0:1:1000000"/>
|
||||||
/// </VisibleVars>
|
/// </VisibleVars>
|
||||||
/// </Group>
|
/// </Group>
|
||||||
///</UserConfig>.
|
///</UserConfig>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string artemisXml {
|
internal static string artemisXml {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("artemisXml", resourceCulture);
|
return ResourceManager.GetString("artemisXml", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap bow {
|
internal static System.Drawing.Bitmap bow {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("bow", resourceCulture);
|
object obj = ResourceManager.GetObject("bow", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to "Artemis"
|
/// Looks up a localized string similar to "Artemis"
|
||||||
///{
|
///{
|
||||||
/// "uri" "http://localhost:{{port}}/csgo_game_event"
|
/// "uri" "http://localhost:{{port}}/csgo_game_event"
|
||||||
@ -105,56 +105,36 @@ namespace Artemis.Properties {
|
|||||||
/// "player_weapons" "1"
|
/// "player_weapons" "1"
|
||||||
/// "player_match_stats" "1"
|
/// "player_match_stats" "1"
|
||||||
/// }
|
/// }
|
||||||
///}.
|
///}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string gamestateConfiguration {
|
internal static string gamestateConfiguration {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("gamestateConfiguration", resourceCulture);
|
return ResourceManager.GetString("gamestateConfiguration", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
/// Looks up a localized string similar to /***********************************************************************/
|
||||||
/// </summary>
|
////** © 2015 CD PROJEKT S.A. All rights reserved.
|
||||||
internal static System.Drawing.Icon logo {
|
////** THE WITCHER® is a trademark of CD PROJEKT S. A.
|
||||||
get {
|
////** The Witcher game is based on the prose of Andrzej Sapkowski.
|
||||||
object obj = ResourceManager.GetObject("logo", resourceCulture);
|
////***********************************************************************/
|
||||||
return ((System.Drawing.Icon)(obj));
|
///
|
||||||
}
|
///
|
||||||
}
|
///
|
||||||
|
///
|
||||||
/// <summary>
|
///statemachine class W3PlayerWitcher extends CR4Player
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
///{
|
||||||
/// </summary>
|
///
|
||||||
internal static System.Drawing.Icon logo_disabled {
|
/// private saved var craftingSchematics : array<name>;
|
||||||
get {
|
///
|
||||||
object obj = ResourceManager.GetObject("logo_disabled", resourceCulture);
|
///
|
||||||
return ((System.Drawing.Icon)(obj));
|
/// private saved var alchemyRecipes : array<name>; [rest of string was truncated]";.
|
||||||
}
|
/// </summary>
|
||||||
}
|
internal static string playerWitcherWs {
|
||||||
|
get {
|
||||||
/// <summary>
|
return ResourceManager.GetString("playerWitcherWs", resourceCulture);
|
||||||
/// Looks up a localized string similar to /***********************************************************************/
|
}
|
||||||
////** © 2015 CD PROJEKT S.A. All rights reserved.
|
}
|
||||||
////** THE WITCHER® is a trademark of CD PROJEKT S. A.
|
}
|
||||||
////** The Witcher game is based on the prose of Andrzej Sapkowski.
|
}
|
||||||
////***********************************************************************/
|
|
||||||
///
|
|
||||||
///
|
|
||||||
///
|
|
||||||
///
|
|
||||||
///statemachine class W3PlayerWitcher extends CR4Player
|
|
||||||
///{
|
|
||||||
///
|
|
||||||
/// private saved var craftingSchematics : array<name>;
|
|
||||||
///
|
|
||||||
///
|
|
||||||
/// private saved var alchemyRecipes : array<name>; [rest of string was truncated]";.
|
|
||||||
/// </summary>
|
|
||||||
internal static string playerWitcherWs {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("playerWitcherWs", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,139 +1,133 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="metadata">
|
<xsd:element name="metadata">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="data">
|
<xsd:element name="data">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
<resheader name="resmimetype">
|
<resheader name="resmimetype">
|
||||||
<value>text/microsoft-resx</value>
|
<value>text/microsoft-resx</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="version">
|
<resheader name="version">
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="artemisXml" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="artemisXml" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\resources\witcher3\artemis.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
<value>..\resources\witcher3\artemis.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="bow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="bow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\bow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\bow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="gamestateConfiguration" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<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>
|
<value>..\resources\counterstrike\gamestateconfiguration.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="playerWitcherWs" 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>
|
<value>..\resources\witcher3\playerwitcher.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
|
||||||
</data>
|
</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>
|
|
||||||
</root>
|
</root>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 361 KiB |
@ -1,48 +0,0 @@
|
|||||||
//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
|
|
||||||
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
//SOFTWARE.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Artemis.Services
|
|
||||||
{
|
|
||||||
public abstract class DialogService
|
|
||||||
{
|
|
||||||
public void ShowErrorMessageBox(Exception e)
|
|
||||||
{
|
|
||||||
ShowErrorMessageBox(e.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowErrorMessageBox(string message)
|
|
||||||
{
|
|
||||||
ShowMessageBox("Error", message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void ShowMessageBox(string title, string message);
|
|
||||||
|
|
||||||
public abstract bool ShowOpenDialog(out string path, string defaultExt, string filter, string initialDir = null);
|
|
||||||
|
|
||||||
public abstract Task<string> ShowInputDialog(string title, string message);
|
|
||||||
|
|
||||||
public abstract Task<bool?> ShowQuestionMessageBox(string title, string message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,143 +0,0 @@
|
|||||||
//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
|
|
||||||
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
//SOFTWARE.
|
|
||||||
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
|
||||||
using Artemis.ViewModels;
|
|
||||||
using Caliburn.Micro;
|
|
||||||
using MahApps.Metro.Controls;
|
|
||||||
using MahApps.Metro.Controls.Dialogs;
|
|
||||||
using Microsoft.Win32;
|
|
||||||
|
|
||||||
namespace Artemis.Services
|
|
||||||
{
|
|
||||||
public class MetroDialogService : DialogService
|
|
||||||
{
|
|
||||||
private readonly ShellViewModel _shellViewModel;
|
|
||||||
|
|
||||||
public MetroDialogService(ShellViewModel shellViewModel)
|
|
||||||
{
|
|
||||||
_shellViewModel = shellViewModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private MetroWindow GetActiveWindow()
|
|
||||||
{
|
|
||||||
MetroWindow window = null;
|
|
||||||
|
|
||||||
Execute.OnUIThread(() =>
|
|
||||||
{
|
|
||||||
window = Application.Current.Windows.OfType<MetroWindow>().FirstOrDefault(w => w.IsActive);
|
|
||||||
if (window == null)
|
|
||||||
{
|
|
||||||
window = Application.Current.Windows.OfType<MetroWindow>().FirstOrDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return window;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ShowMessageBox(string title, string message)
|
|
||||||
{
|
|
||||||
if (_shellViewModel.IsActive == false)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Execute.OnUIThread(() => GetActiveWindow().ShowMessageAsync(title, message));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async Task<bool?> ShowQuestionMessageBox(string title, string message)
|
|
||||||
{
|
|
||||||
if (_shellViewModel.IsActive == false)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var metroDialogSettings = new MetroDialogSettings {AffirmativeButtonText = "Yes", NegativeButtonText = "No"};
|
|
||||||
var result =
|
|
||||||
await
|
|
||||||
GetActiveWindow()
|
|
||||||
.ShowMessageAsync(title, message, MessageDialogStyle.AffirmativeAndNegative, metroDialogSettings);
|
|
||||||
switch (result)
|
|
||||||
{
|
|
||||||
case MessageDialogResult.Negative:
|
|
||||||
return false;
|
|
||||||
case MessageDialogResult.Affirmative:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task<string> ShowInputDialog(string title, string message)
|
|
||||||
{
|
|
||||||
if (_shellViewModel.IsActive == false)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return GetActiveWindow().ShowInputAsync(title, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool ShowOpenDialog(out string path, string defaultExt, string filter, string initialDir = null)
|
|
||||||
{
|
|
||||||
if (_shellViewModel.IsActive == false)
|
|
||||||
{
|
|
||||||
path = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool? res = null;
|
|
||||||
string lPath = null;
|
|
||||||
|
|
||||||
Execute.OnUIThread(() =>
|
|
||||||
{
|
|
||||||
var ofd = new OpenFileDialog
|
|
||||||
{
|
|
||||||
DefaultExt = defaultExt,
|
|
||||||
Filter = filter
|
|
||||||
};
|
|
||||||
|
|
||||||
if (initialDir != null)
|
|
||||||
{
|
|
||||||
ofd.InitialDirectory = initialDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Application.Current.MainWindow != null)
|
|
||||||
{
|
|
||||||
res = ofd.ShowDialog(Application.Current.MainWindow);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res = ofd.ShowDialog();
|
|
||||||
}
|
|
||||||
if (res == true)
|
|
||||||
{
|
|
||||||
lPath = ofd.FileName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
path = lPath;
|
|
||||||
|
|
||||||
return res.Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
220
Artemis/Artemis/Settings/General.Designer.cs
generated
220
Artemis/Artemis/Settings/General.Designer.cs
generated
@ -1,122 +1,98 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.42000
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Artemis.Settings {
|
namespace Artemis.Settings {
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||||
internal sealed partial class General : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class General : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static General defaultInstance = ((General)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new General())));
|
private static General defaultInstance = ((General)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new General())));
|
||||||
|
|
||||||
public static General Default {
|
public static General Default {
|
||||||
get {
|
get {
|
||||||
return defaultInstance;
|
return defaultInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("TypeWave")]
|
[global::System.Configuration.DefaultSettingValueAttribute("TypeWave")]
|
||||||
public string LastEffect {
|
public string LastEffect {
|
||||||
get {
|
get {
|
||||||
return ((string)(this["LastEffect"]));
|
return ((string)(this["LastEffect"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["LastEffect"] = value;
|
this["LastEffect"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
[global::System.Configuration.DefaultSettingValueAttribute("Logitech G910 RGB")]
|
||||||
public string LastKeyboard {
|
public string LastKeyboard {
|
||||||
get {
|
get {
|
||||||
return ((string)(this["LastKeyboard"]));
|
return ((string)(this["LastKeyboard"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["LastKeyboard"] = value;
|
this["LastKeyboard"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public bool EnablePointersUpdate {
|
public bool EnablePointersUpdate {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["EnablePointersUpdate"]));
|
return ((bool)(this["EnablePointersUpdate"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["EnablePointersUpdate"] = value;
|
this["EnablePointersUpdate"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("51364")]
|
[global::System.Configuration.DefaultSettingValueAttribute("51364")]
|
||||||
public int GamestatePort {
|
public int GamestatePort {
|
||||||
get {
|
get {
|
||||||
return ((int)(this["GamestatePort"]));
|
return ((int)(this["GamestatePort"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["GamestatePort"] = value;
|
this["GamestatePort"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public bool Autorun {
|
public bool Autorun {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["Autorun"]));
|
return ((bool)(this["Autorun"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["Autorun"] = value;
|
this["Autorun"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
public bool Suspended {
|
public bool Suspended {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["Suspended"]));
|
return ((bool)(this["Suspended"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["Suspended"] = value;
|
this["Suspended"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
}
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
|
||||||
public bool ShowOnStartup {
|
|
||||||
get {
|
|
||||||
return ((bool)(this["ShowOnStartup"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["ShowOnStartup"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
|
||||||
public bool CheckForUpdates {
|
|
||||||
get {
|
|
||||||
return ((bool)(this["CheckForUpdates"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["CheckForUpdates"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,30 +1,26 @@
|
|||||||
<?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.Settings" GeneratedClassName="General">
|
|
||||||
<Profiles />
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
||||||
<Settings>
|
GeneratedClassNamespace="Artemis.Settings" GeneratedClassName="General">
|
||||||
<Setting Name="LastEffect" Type="System.String" Scope="User">
|
<Profiles />
|
||||||
<Value Profile="(Default)">TypeWave</Value>
|
<Settings>
|
||||||
</Setting>
|
<Setting Name="LastEffect" Type="System.String" Scope="User">
|
||||||
<Setting Name="LastKeyboard" Type="System.String" Scope="User">
|
<Value Profile="(Default)">TypeWave</Value>
|
||||||
<Value Profile="(Default)" />
|
</Setting>
|
||||||
</Setting>
|
<Setting Name="LastKeyboard" Type="System.String" Scope="User">
|
||||||
<Setting Name="EnablePointersUpdate" Type="System.Boolean" Scope="User">
|
<Value Profile="(Default)">Logitech G910 RGB</Value>
|
||||||
<Value Profile="(Default)">True</Value>
|
</Setting>
|
||||||
</Setting>
|
<Setting Name="EnablePointersUpdate" Type="System.Boolean" Scope="User">
|
||||||
<Setting Name="GamestatePort" Type="System.Int32" Scope="User">
|
<Value Profile="(Default)">True</Value>
|
||||||
<Value Profile="(Default)">51364</Value>
|
</Setting>
|
||||||
</Setting>
|
<Setting Name="GamestatePort" Type="System.Int32" Scope="User">
|
||||||
<Setting Name="Autorun" Type="System.Boolean" Scope="User">
|
<Value Profile="(Default)">51364</Value>
|
||||||
<Value Profile="(Default)">False</Value>
|
</Setting>
|
||||||
</Setting>
|
<Setting Name="Autorun" Type="System.Boolean" Scope="User">
|
||||||
<Setting Name="Suspended" Type="System.Boolean" Scope="User">
|
<Value Profile="(Default)">True</Value>
|
||||||
<Value Profile="(Default)">False</Value>
|
</Setting>
|
||||||
</Setting>
|
<Setting Name="Suspended" Type="System.Boolean" Scope="User">
|
||||||
<Setting Name="ShowOnStartup" Type="System.Boolean" Scope="User">
|
<Value Profile="(Default)">False</Value>
|
||||||
<Value Profile="(Default)">True</Value>
|
</Setting>
|
||||||
</Setting>
|
</Settings>
|
||||||
<Setting Name="CheckForUpdates" Type="System.Boolean" Scope="User">
|
|
||||||
<Value Profile="(Default)">True</Value>
|
|
||||||
</Setting>
|
|
||||||
</Settings>
|
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
@ -38,26 +38,6 @@ namespace Artemis.Settings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CheckForUpdates
|
|
||||||
{
|
|
||||||
get { return General.Default.CheckForUpdates; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (General.Default.CheckForUpdates == value) return;
|
|
||||||
General.Default.CheckForUpdates = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ShowOnStartup
|
|
||||||
{
|
|
||||||
get { return General.Default.ShowOnStartup; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (General.Default.ShowOnStartup == value) return;
|
|
||||||
General.Default.ShowOnStartup = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ApplyGamestatePort()
|
private void ApplyGamestatePort()
|
||||||
{
|
{
|
||||||
// TODO: Restart Gamestate server with new port
|
// TODO: Restart Gamestate server with new port
|
||||||
@ -91,8 +71,6 @@ namespace Artemis.Settings
|
|||||||
GamestatePort = 51364;
|
GamestatePort = 51364;
|
||||||
EnablePointersUpdate = true;
|
EnablePointersUpdate = true;
|
||||||
Autorun = true;
|
Autorun = true;
|
||||||
CheckForUpdates = true;
|
|
||||||
ShowOnStartup = true;
|
|
||||||
|
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System.IO;
|
||||||
using System.IO;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
@ -31,19 +29,12 @@ namespace Artemis.Utilities.GameState
|
|||||||
if (Running)
|
if (Running)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try
|
_listener.Prefixes.Clear();
|
||||||
{
|
Port = General.Default.GamestatePort;
|
||||||
_listener.Prefixes.Clear();
|
_listener.Prefixes.Add($"http://localhost:{Port}/");
|
||||||
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.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
_listener.Start();
|
||||||
|
|
||||||
ThreadPool.QueueUserWorkItem(o =>
|
ThreadPool.QueueUserWorkItem(o =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -1,24 +1,34 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms;
|
using Gma.System.MouseKeyHook;
|
||||||
using VirtualInput;
|
|
||||||
|
|
||||||
namespace Artemis.Utilities.Keyboard
|
namespace Artemis.Utilities.Keyboard
|
||||||
{
|
{
|
||||||
public class KeyboardHook
|
public class KeyboardHook
|
||||||
{
|
{
|
||||||
public delegate void KeyDownCallbackHandler(KeyEventArgs e);
|
private IKeyboardMouseEvents _mGlobalHook;
|
||||||
|
public int Subscriptions { get; set; }
|
||||||
|
|
||||||
public KeyboardHook()
|
public void Subscribe(KeyEventHandler handleKeypress)
|
||||||
{
|
{
|
||||||
VirtualKeyboard.KeyDown += VirtualKeyboardOnKeyDown;
|
if (_mGlobalHook == null)
|
||||||
VirtualKeyboard.StartInterceptor();
|
_mGlobalHook = Hook.GlobalEvents();
|
||||||
|
|
||||||
|
_mGlobalHook.KeyDown += handleKeypress;
|
||||||
|
Subscriptions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VirtualKeyboardOnKeyDown(object sender, KeyEventArgs keyEventArgs)
|
public void Unsubscribe(KeyEventHandler handleKeypress)
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() => { KeyDownCallback?.Invoke(keyEventArgs); });
|
if (_mGlobalHook == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_mGlobalHook.KeyDown -= handleKeypress;
|
||||||
|
Subscriptions--;
|
||||||
|
|
||||||
|
if (Subscriptions >= 1)
|
||||||
|
return;
|
||||||
|
_mGlobalHook.Dispose();
|
||||||
|
_mGlobalHook = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public event KeyDownCallbackHandler KeyDownCallback;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,12 @@
|
|||||||
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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,10 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
||||||
using Artemis.Services;
|
using Artemis.Models;
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
using Artemis.Utilities.Memory;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
@ -14,27 +13,22 @@ namespace Artemis.Utilities
|
|||||||
{
|
{
|
||||||
public static class Updater
|
public static class Updater
|
||||||
{
|
{
|
||||||
public static int CurrentVersion = 102;
|
public static int CurrentVersion = 100;
|
||||||
|
|
||||||
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
public static void CheckForUpdate()
|
||||||
{
|
{
|
||||||
if (!General.Default.CheckForUpdates)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var newRelease = IsUpdateAvailable();
|
var newRelease = IsUpdateAvailable();
|
||||||
if (newRelease == null)
|
if (newRelease == null)
|
||||||
return null;
|
return;
|
||||||
|
|
||||||
var viewUpdate = await
|
var viewUpdate =
|
||||||
dialogService.ShowQuestionMessageBox("Update available",
|
MessageBox.Show(
|
||||||
$"A new version of Artemis is available, version {newRelease["tag_name"].Value<string>()}.\n" +
|
$"A new version of Artemis is available, version {newRelease["tag_name"].Value<string>()}.\n" +
|
||||||
"Do you wish to view the update on GitHub now?\n\n" +
|
"Do you wish to view the update on GitHub now?\n\n" +
|
||||||
"Note: You can disable update notifications in the settings menu");
|
"Note: You can disable update notifications in the settings menu", "Artemis - Update available",
|
||||||
|
MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||||
if (viewUpdate.Value)
|
if (viewUpdate == DialogResult.Yes)
|
||||||
Process.Start(new ProcessStartInfo(newRelease["html_url"].Value<string>()));
|
Process.Start(new ProcessStartInfo(newRelease["html_url"].Value<string>()));
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JObject IsUpdateAvailable()
|
public static JObject IsUpdateAvailable()
|
||||||
@ -86,7 +80,7 @@ namespace Artemis.Utilities
|
|||||||
"https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json?random=" + rand.Next());
|
"https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json?random=" + rand.Next());
|
||||||
|
|
||||||
// Get a list of pointers
|
// Get a list of pointers
|
||||||
var pointers = JsonConvert.DeserializeObject<List<GamePointersCollection>>(json);
|
var pointers = JsonConvert.DeserializeObject<List<GamePointersCollectionModel>>(json);
|
||||||
// Assign each pointer to the settings file
|
// Assign each pointer to the settings file
|
||||||
var rlPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "RocketLeague"));
|
var rlPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "RocketLeague"));
|
||||||
if (rlPointers != null)
|
if (rlPointers != null)
|
||||||
|
|||||||
@ -61,15 +61,9 @@ namespace Artemis.ViewModels.Abstract
|
|||||||
MainManager.EffectManager.ChangeEffect(EffectModel, true);
|
MainManager.EffectManager.ChangeEffect(EffectModel, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void ResetSettings()
|
public void ResetSettings()
|
||||||
{
|
{
|
||||||
var resetConfirm = await
|
// TODO: Confirmation dialog (Generic MVVM approach)
|
||||||
MainManager.DialogService.ShowQuestionMessageBox("Reset effect settings",
|
|
||||||
"Are you sure you wish to reset this effect's settings? \nAny changes you made will be lost.");
|
|
||||||
|
|
||||||
if (!resetConfirm.Value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
EffectSettings.ToDefault();
|
EffectSettings.ToDefault();
|
||||||
NotifyOfPropertyChange(() => EffectSettings);
|
NotifyOfPropertyChange(() => EffectSettings);
|
||||||
|
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
using Artemis.Managers;
|
|
||||||
using Artemis.Models;
|
|
||||||
using Caliburn.Micro;
|
|
||||||
|
|
||||||
namespace Artemis.ViewModels.Abstract
|
|
||||||
{
|
|
||||||
public abstract class GameViewModel : Screen
|
|
||||||
{
|
|
||||||
private GameSettings _gameSettings;
|
|
||||||
|
|
||||||
public GameModel GameModel { get; set; }
|
|
||||||
public MainManager MainManager { get; set; }
|
|
||||||
|
|
||||||
public GameSettings GameSettings
|
|
||||||
{
|
|
||||||
get { return _gameSettings; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (Equals(value, _gameSettings)) return;
|
|
||||||
_gameSettings = value;
|
|
||||||
NotifyOfPropertyChange(() => GameSettings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GameEnabled => MainManager.EffectManager.ActiveEffect == GameModel;
|
|
||||||
|
|
||||||
public void ToggleEffect()
|
|
||||||
{
|
|
||||||
GameModel.Enabled = GameSettings.Enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveSettings()
|
|
||||||
{
|
|
||||||
GameSettings?.Save();
|
|
||||||
if (!GameEnabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Restart the game if it's currently running to apply settings.
|
|
||||||
MainManager.EffectManager.ChangeEffect(GameModel, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async void ResetSettings()
|
|
||||||
{
|
|
||||||
var resetConfirm = await
|
|
||||||
MainManager.DialogService.ShowQuestionMessageBox("Reset effect settings",
|
|
||||||
"Are you sure you wish to reset this effect's settings? \nAny changes you made will be lost.");
|
|
||||||
|
|
||||||
if (!resetConfirm.Value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
GameSettings.ToDefault();
|
|
||||||
NotifyOfPropertyChange(() => GameSettings);
|
|
||||||
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,9 +8,8 @@ using MahApps.Metro.Controls;
|
|||||||
|
|
||||||
namespace Artemis.ViewModels.Flyouts
|
namespace Artemis.ViewModels.Flyouts
|
||||||
{
|
{
|
||||||
public class FlyoutSettingsViewModel : FlyoutBaseViewModel, IHandle<ToggleEnabled>, IHandle<ActiveEffectChanged>
|
public class FlyoutSettingsViewModel : FlyoutBaseViewModel, IHandle<ToggleEnabled>
|
||||||
{
|
{
|
||||||
private string _activeEffectName;
|
|
||||||
private bool _enabled;
|
private bool _enabled;
|
||||||
private GeneralSettings _generalSettings;
|
private GeneralSettings _generalSettings;
|
||||||
private string _selectedKeyboardProvider;
|
private string _selectedKeyboardProvider;
|
||||||
@ -39,15 +38,7 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
public MainManager MainManager { get; set; }
|
public MainManager MainManager { get; set; }
|
||||||
|
|
||||||
public BindableCollection<string> KeyboardProviders
|
public BindableCollection<string> KeyboardProviders
|
||||||
{
|
=> new BindableCollection<string>(MainManager.KeyboardManager.KeyboardProviders.Select(k => k.Name));
|
||||||
get
|
|
||||||
{
|
|
||||||
var collection = new BindableCollection<string>(MainManager.KeyboardManager.KeyboardProviders
|
|
||||||
.Select(k => k.Name));
|
|
||||||
collection.Insert(0, "None");
|
|
||||||
return collection;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string SelectedKeyboardProvider
|
public string SelectedKeyboardProvider
|
||||||
{
|
{
|
||||||
@ -61,8 +52,7 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
MainManager.KeyboardManager.ChangeKeyboard(
|
MainManager.KeyboardManager.ChangeKeyboard(
|
||||||
MainManager.KeyboardManager.KeyboardProviders.FirstOrDefault(
|
MainManager.KeyboardManager.KeyboardProviders.First(k => k.Name == _selectedKeyboardProvider));
|
||||||
k => k.Name == _selectedKeyboardProvider));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,23 +68,6 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ActiveEffectName
|
|
||||||
{
|
|
||||||
get { return _activeEffectName; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == _activeEffectName) return;
|
|
||||||
_activeEffectName = value;
|
|
||||||
NotifyOfPropertyChange(() => ActiveEffectName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Handle(ActiveEffectChanged message)
|
|
||||||
{
|
|
||||||
var effectDisplay = message.ActiveEffect.Length > 0 ? message.ActiveEffect : "none";
|
|
||||||
ActiveEffectName = $"Active effect: {effectDisplay}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Handle(ToggleEnabled message)
|
public void Handle(ToggleEnabled message)
|
||||||
{
|
{
|
||||||
NotifyOfPropertyChange(() => Enabled);
|
NotifyOfPropertyChange(() => Enabled);
|
||||||
@ -126,9 +99,7 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
|
|
||||||
protected override void HandleOpen()
|
protected override void HandleOpen()
|
||||||
{
|
{
|
||||||
SelectedKeyboardProvider = General.Default.LastKeyboard.Length > 0
|
SelectedKeyboardProvider = MainManager.KeyboardManager.ActiveKeyboard?.Name;
|
||||||
? General.Default.LastKeyboard
|
|
||||||
: "None";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Services;
|
|
||||||
using Artemis.ViewModels.Flyouts;
|
using Artemis.ViewModels.Flyouts;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
|
||||||
@ -15,10 +16,8 @@ namespace Artemis.ViewModels
|
|||||||
|
|
||||||
public ShellViewModel()
|
public ShellViewModel()
|
||||||
{
|
{
|
||||||
var dialogService = new MetroDialogService(this);
|
|
||||||
IEventAggregator events = new EventAggregator();
|
IEventAggregator events = new EventAggregator();
|
||||||
|
MainManager = new MainManager(events);
|
||||||
MainManager = new MainManager(events, dialogService);
|
|
||||||
DisplayName = "Artemis";
|
DisplayName = "Artemis";
|
||||||
|
|
||||||
_welcomeVm = new WelcomeViewModel {DisplayName = "Welcome"};
|
_welcomeVm = new WelcomeViewModel {DisplayName = "Welcome"};
|
||||||
@ -50,10 +49,5 @@ namespace Artemis.ViewModels
|
|||||||
{
|
{
|
||||||
Flyouts.First().IsOpen = !Flyouts.First().IsOpen;
|
Flyouts.First().IsOpen = !Flyouts.First().IsOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CloseSettings()
|
|
||||||
{
|
|
||||||
Flyouts.First().IsOpen = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,10 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Diagnostics;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
using Artemis.Events;
|
using Artemis.Events;
|
||||||
using Artemis.Properties;
|
|
||||||
using Artemis.Settings;
|
|
||||||
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
|
||||||
{
|
{
|
||||||
@ -13,10 +16,17 @@ namespace Artemis.ViewModels
|
|||||||
private readonly ShellViewModel _shellViewModel;
|
private readonly ShellViewModel _shellViewModel;
|
||||||
|
|
||||||
private readonly IWindowManager _windowManager;
|
private readonly IWindowManager _windowManager;
|
||||||
private string _activeIcon;
|
|
||||||
private bool _checkedForUpdate;
|
private bool _checkedForUpdate;
|
||||||
private bool _enabled;
|
private bool _enabled;
|
||||||
private string _toggleText;
|
private string _toggleText;
|
||||||
|
/*
|
||||||
|
* NOTE: In this sample the system tray view-model doesn't receive any notification
|
||||||
|
* when the other window gets closed by pressing the top right 'x'.
|
||||||
|
* Thus no property notification is invoked, and system tray context-menu appears
|
||||||
|
* out of sync, still allowing 'Hide' and disabling 'Show'.
|
||||||
|
* Given the purpose of the sample - integrating Caliburn.Micro with WPF NotifyIcon -
|
||||||
|
* syncing the two view-models is not of interest here.
|
||||||
|
* */
|
||||||
|
|
||||||
public SystemTrayViewModel(IWindowManager windowManager, ShellViewModel shellViewModel)
|
public SystemTrayViewModel(IWindowManager windowManager, ShellViewModel shellViewModel)
|
||||||
{
|
{
|
||||||
@ -25,10 +35,8 @@ namespace Artemis.ViewModels
|
|||||||
_shellViewModel.MainManager.Events.Subscribe(this);
|
_shellViewModel.MainManager.Events.Subscribe(this);
|
||||||
_shellViewModel.MainManager.EnableProgram();
|
_shellViewModel.MainManager.EnableProgram();
|
||||||
_checkedForUpdate = false;
|
_checkedForUpdate = false;
|
||||||
//ActiveIcon = "../logo.ico";
|
|
||||||
|
|
||||||
if (General.Default.ShowOnStartup)
|
// TODO: Check if show on startup is enabled, if so, show window.
|
||||||
ShowWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanShowWindow => !_shellViewModel.IsActive;
|
public bool CanShowWindow => !_shellViewModel.IsActive;
|
||||||
@ -44,21 +52,10 @@ namespace Artemis.ViewModels
|
|||||||
_enabled = value;
|
_enabled = value;
|
||||||
|
|
||||||
ToggleText = _enabled ? "Disable Artemis" : "Enable Artemis";
|
ToggleText = _enabled ? "Disable Artemis" : "Enable Artemis";
|
||||||
ActiveIcon = _enabled ? "../Resources/logo.ico" : "../Resources/logo-disabled.ico";
|
|
||||||
NotifyOfPropertyChange(() => Enabled);
|
NotifyOfPropertyChange(() => Enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ActiveIcon
|
|
||||||
{
|
|
||||||
get { return _activeIcon; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_activeIcon = value;
|
|
||||||
NotifyOfPropertyChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ToggleText
|
public string ToggleText
|
||||||
{
|
{
|
||||||
get { return _toggleText; }
|
get { return _toggleText; }
|
||||||
@ -96,17 +93,18 @@ namespace Artemis.ViewModels
|
|||||||
if (!CanShowWindow)
|
if (!CanShowWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!_checkedForUpdate)
|
||||||
|
{
|
||||||
|
_checkedForUpdate = true;
|
||||||
|
var updateTask = new Task(Updater.CheckForUpdate);
|
||||||
|
updateTask.Start();
|
||||||
|
}
|
||||||
|
|
||||||
// manually show the next window view-model
|
// manually show the next window view-model
|
||||||
_windowManager.ShowWindow(_shellViewModel);
|
_windowManager.ShowWindow(_shellViewModel);
|
||||||
|
|
||||||
NotifyOfPropertyChange(() => CanShowWindow);
|
NotifyOfPropertyChange(() => CanShowWindow);
|
||||||
NotifyOfPropertyChange(() => CanHideWindow);
|
NotifyOfPropertyChange(() => CanHideWindow);
|
||||||
|
|
||||||
if (_checkedForUpdate)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_checkedForUpdate = true;
|
|
||||||
Updater.CheckForUpdate(_shellViewModel.MainManager.DialogService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="600" d:DesignWidth="300"
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
Width="300">
|
Width="300">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||||
@ -24,8 +24,6 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@ -34,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"
|
||||||
@ -43,52 +41,38 @@
|
|||||||
IsChecked="{Binding Path=GeneralSettings.Autorun, Mode=TwoWay}"
|
IsChecked="{Binding Path=GeneralSettings.Autorun, Mode=TwoWay}"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
|
||||||
|
|
||||||
<!-- Show on startup -->
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
|
||||||
Content="Show on startup:" />
|
|
||||||
<controls:ToggleSwitch Grid.Row="2" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
|
||||||
IsChecked="{Binding Path=GeneralSettings.ShowOnStartup, Mode=TwoWay}"
|
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" />
|
|
||||||
|
|
||||||
<!-- Keyboard selection -->
|
<!-- Keyboard selection -->
|
||||||
<Label Grid.Row="3" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
<Label Grid.Row="2" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Content="Keyboard:" />
|
Content="Keyboard:" />
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1" x:Name="KeyboardProviders" Margin="10" VerticalAlignment="Center"
|
<ComboBox Grid.Row="2" Grid.Column="1" x:Name="KeyboardProviders" Margin="10" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Width="140" />
|
Width="140" />
|
||||||
<!-- TODO: Ugly -->
|
<!-- TODO: Ugly -->
|
||||||
|
|
||||||
<!-- Gamestate port -->
|
<!-- Gamestate port -->
|
||||||
<Label Grid.Row="4" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
<Label Grid.Row="3" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Content="Gamestate server port:" />
|
Content="Gamestate server port:" />
|
||||||
<controls:NumericUpDown Grid.Row="4" Grid.Column="1" Margin="10" VerticalAlignment="Center"
|
<controls:NumericUpDown Grid.Row="3" Grid.Column="1" Margin="10" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right" Width="120"
|
HorizontalAlignment="Right" Width="120"
|
||||||
Value="{Binding Path=GeneralSettings.GamestatePort, Mode=TwoWay}" />
|
Value="{Binding Path=GeneralSettings.GamestatePort, Mode=TwoWay}" />
|
||||||
|
|
||||||
<!-- Updates check -->
|
|
||||||
<Label Grid.Row="5" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
|
||||||
Content="Check for updates:" />
|
|
||||||
<controls:ToggleSwitch Grid.Row="5" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
|
|
||||||
IsChecked="{Binding Path=GeneralSettings.CheckForUpdates, Mode=TwoWay}" />
|
|
||||||
|
|
||||||
<!-- Update pointers -->
|
<!-- Update pointers -->
|
||||||
<Label Grid.Row="6" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
<Label Grid.Row="4" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Content="Download pointers:" />
|
Content="Download pointers:" />
|
||||||
<controls:ToggleSwitch Grid.Row="6" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
<controls:ToggleSwitch Grid.Row="4" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
|
||||||
IsChecked="{Binding Path=GeneralSettings.EnablePointersUpdate, Mode=TwoWay}" />
|
IsChecked="{Binding Path=GeneralSettings.EnablePointersUpdate, Mode=TwoWay}" />
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<Button Grid.Row="7" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
|
<Button Grid.Row="5" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left" Width="120"
|
VerticalAlignment="Center" HorizontalAlignment="Left" Width="120"
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
<Button Grid.Row="7" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes"
|
<Button Grid.Row="5" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120"
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
|
||||||
<!-- Version -->
|
<!-- Version -->
|
||||||
<Grid Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
|
<Grid Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
@ -97,14 +81,11 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Artemis 1.0.1" VerticalAlignment="Center"
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.0.2" VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
<Button Grid.Row="1" Grid.Column="1" Focusable="False"
|
<Button Grid.Row="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
|
||||||
Style="{StaticResource AccentedSquareButtonStyle}"
|
|
||||||
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
|
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
|
||||||
Content="View on GitHub" Margin="5,0,0,0" VerticalAlignment="Center"
|
Content="View on GitHub" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||||
HorizontalAlignment="Right" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -5,12 +5,10 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
|
|
||||||
dialogs:DialogParticipation.Register="{Binding RelativeSource={RelativeSource Self}, Path=DataContext}"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Artemis" Height="670" Width="690"
|
Title="Artemis" Height="670" Width="690"
|
||||||
MinWidth="500" MinHeight="400"
|
MinWidth="500" MinHeight="400"
|
||||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico">
|
GlowBrush="{DynamicResource AccentColorBrush}" Icon="/Artemis;component/logo.ico">
|
||||||
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
||||||
<Controls:MetroWindow.IconTemplate>
|
<Controls:MetroWindow.IconTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -64,7 +62,7 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
||||||
</Grid.Resources>
|
</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">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding DisplayName}" />
|
<TextBlock Text="{Binding DisplayName}" />
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<!-- the application main system tray icon -->
|
<!-- the application main system tray icon -->
|
||||||
<tb:TaskbarIcon x:Key="SystemTrayIcon"
|
<tb:TaskbarIcon x:Key="SystemTrayIcon"
|
||||||
IconSource="{Binding Path=ActiveIcon, Mode=OneWay}"
|
IconSource="../logo.ico"
|
||||||
ToolTipText="Artemis"
|
ToolTipText="Artemis"
|
||||||
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
|
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
|
||||||
ContextMenu="{StaticResource MainSysTrayMenu}" />
|
ContextMenu="{StaticResource MainSysTrayMenu}" />
|
||||||
|
|||||||
@ -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 />
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
5956
Artemis/ArtemisSetup/ArtemisSetup.isl
Normal file
5956
Artemis/ArtemisSetup/ArtemisSetup.isl
Normal file
File diff suppressed because it is too large
Load Diff
31
Artemis/ArtemisSetup/ArtemisSetup.isproj
Normal file
31
Artemis/ArtemisSetup/ArtemisSetup.isproj
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Select a Product Configuration -->
|
||||||
|
<InstallShieldProductConfiguration>Express</InstallShieldProductConfiguration>
|
||||||
|
<!-- Select a Visual Studio Configuration / InstallShield Release -->
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<InstallShieldRelease>$(Configuration)</InstallShieldRelease>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- The InstallShieldProject item selects the project to build -->
|
||||||
|
<InstallShieldProject Include="$(MSBuildProjectDirectory)\$(MSBuildProjectName).isl"/>
|
||||||
|
<!-- The InstallShieldReleaseFlags sets Release Flags -->
|
||||||
|
<!--<InstallShieldReleaseFlags Include=""/>-->
|
||||||
|
<!-- The InstallShieldMergeModulePath specifies what directories are
|
||||||
|
searched for Merge Modules -->
|
||||||
|
<!--<InstallShieldMergeModulePath Include=""/>-->
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- The ProjectReference items refer to any Visual Studio solutions you want to automatically probe for Project Output Groups. -->
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- The TaggedOutputs items allow you to explicitly add extra files to output groups. Each item must include both Name and OutputGroup, as well as TargetPath metadata values. -->
|
||||||
|
<!--<TaggedOutputs Include="C:\My Test Exe.exe">
|
||||||
|
<Name>My Test Project</Name>
|
||||||
|
<OutputGroup>Primary output</OutputGroup>
|
||||||
|
<TargetPath>My Test Exe.exe</TargetPath>
|
||||||
|
</TaggedOutputs> -->
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildExtensionsPath32)\InstallShield\2015Limited\InstallShield.targets"/>
|
||||||
|
</Project>
|
||||||
Loading…
x
Reference in New Issue
Block a user