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

Fixed crash on WebServer start failure for #200

Added Sombra (and Ana) for #201
This commit is contained in:
SpoinkyNL 2016-11-20 10:13:59 +01:00
parent 1330b547d7
commit 590d6991fe
4 changed files with 17 additions and 10 deletions

View File

@ -46,6 +46,8 @@ namespace Artemis.Modules.Games.Overwatch
Lúcio,
Mercy,
Symmetra,
Zenyatta
Zenyatta,
Ana,
Sombra
}
}

View File

@ -10,14 +10,16 @@ using Artemis.Profiles.Layers.Models;
using Artemis.Services;
using Artemis.Utilities;
using Artemis.Utilities.DataReaders;
using Artemis.ViewModels;
using Microsoft.Win32;
namespace Artemis.Modules.Games.Overwatch
{
public class OverwatchModel : GameModel
{
private readonly PipeServer _pipeServer;
private readonly DebugViewModel _debugViewModel;
private readonly MetroDialogService _dialogService;
private readonly PipeServer _pipeServer;
private DateTime _characterChange;
private string _lastMessage;
// Using sticky values on these since they can cause flickering
@ -27,11 +29,13 @@ namespace Artemis.Modules.Games.Overwatch
private DateTime _ultimateReady;
private DateTime _ultimateUsed;
public OverwatchModel(DeviceManager deviceManager, PipeServer pipeServer, MetroDialogService dialogService)
public OverwatchModel(DeviceManager deviceManager, PipeServer pipeServer, MetroDialogService dialogService,
DebugViewModel debugViewModel)
: base(deviceManager, SettingsProvider.Load<OverwatchSettings>(), new OverwatchDataModel())
{
_pipeServer = pipeServer;
_dialogService = dialogService;
_debugViewModel = debugViewModel;
Name = "Overwatch";
ProcessName = "Overwatch";
Scale = 4;
@ -70,7 +74,9 @@ namespace Artemis.Modules.Games.Overwatch
new CharacterColor {Character = OverwatchCharacter.Lúcio, Color = Color.FromRgb(34, 142, 2)},
new CharacterColor {Character = OverwatchCharacter.Mercy, Color = Color.FromRgb(243, 226, 106)},
new CharacterColor {Character = OverwatchCharacter.Symmetra, Color = Color.FromRgb(46, 116, 148)},
new CharacterColor {Character = OverwatchCharacter.Zenyatta, Color = Color.FromRgb(248, 218, 26)}
new CharacterColor {Character = OverwatchCharacter.Zenyatta, Color = Color.FromRgb(248, 218, 26)},
new CharacterColor {Character = OverwatchCharacter.Ana, Color = Color.FromRgb(16, 36, 87)},
new CharacterColor {Character = OverwatchCharacter.Sombra, Color = Color.FromRgb(20, 5, 101)}
};
}
@ -127,8 +133,7 @@ namespace Artemis.Modules.Games.Overwatch
if (colors == null)
return;
// TODO: Get the debug viewmodel and update the color array
//_events.PublishOnUIThread(new RazerColorArrayChanged(colors));
_debugViewModel.UpdateRazerDisplay(colors);
// Determine general game state
ParseGameSate(gameDataModel, colors);

View File

@ -53,8 +53,8 @@ using System.Windows;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.2")]
[assembly: AssemblyFileVersion("1.5.0.2")]
[assembly: AssemblyVersion("1.5.0.4")]
[assembly: AssemblyFileVersion("1.5.0.4")]
[assembly: InternalsVisibleTo("Artemis.Tests")]
[assembly: InternalsVisibleTo("Artemis.Explorables")]

View File

@ -49,9 +49,9 @@ namespace Artemis.Utilities.GameState
{
_listener.Start();
}
catch (HttpListenerException e)
catch (Exception e)
{
_logger.Error(e, "Couldn't start the webserver on port {0}.", Port);
_logger.Error(e, "Couldn't start the webserver on port {0}. Try selecting a different port", Port);
Running = false;
return;
}