Skip to content

Commit

Permalink
Resharper code cleanup pass of HearthCap.Core project
Browse files Browse the repository at this point in the history
  • Loading branch information
remcoros committed Aug 29, 2015
1 parent 10dcb41 commit 9c38cf5
Show file tree
Hide file tree
Showing 55 changed files with 1,389 additions and 1,115 deletions.
442 changes: 212 additions & 230 deletions HearthCap.Core/GameCapture/AutoCaptureEngine.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion HearthCap.Core/GameCapture/CaptureMethod.cs
Expand Up @@ -8,4 +8,4 @@ public enum CaptureMethod
BitBlt, BitBlt,
Log Log
} }
} }
12 changes: 6 additions & 6 deletions HearthCap.Core/GameCapture/EngineEvent.cs
@@ -1,20 +1,20 @@
using System;

namespace HearthCap.Core.GameCapture namespace HearthCap.Core.GameCapture
{ {
using System;

public class EngineEvent public class EngineEvent
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:System.Object"/> class. /// Initializes a new instance of the <see cref="T:System.Object" /> class.
/// </summary> /// </summary>
public EngineEvent(string message) public EngineEvent(string message)
{ {
this.Message = message; Message = message;
this.Date = DateTime.Now; Date = DateTime.Now;
} }


public string Message { get; set; } public string Message { get; set; }


public DateTime Date { get; set; } public DateTime Date { get; set; }
} }
} }
Expand Up @@ -7,13 +7,13 @@ public class IncompatibleHooksFound : EngineEvent
public string Description { get; set; } public string Description { get; set; }


/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:System.Object"/> class. /// Initializes a new instance of the <see cref="T:System.Object" /> class.
/// </summary> /// </summary>
public IncompatibleHooksFound(string hookName, string description) public IncompatibleHooksFound(string hookName, string description)
: base("Incompatible hook found: " + hookName) : base("Incompatible hook found: " + hookName)
{ {
this.HookName = hookName; HookName = hookName;
this.Description = description; Description = description;
} }
} }
} }
4 changes: 2 additions & 2 deletions HearthCap.Core/GameCapture/EngineEvents/WindowFound.cs
Expand Up @@ -3,11 +3,11 @@
public class WindowFound : EngineEvent public class WindowFound : EngineEvent
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:System.Object"/> class. /// Initializes a new instance of the <see cref="T:System.Object" /> class.
/// </summary> /// </summary>
public WindowFound() public WindowFound()
: base("Window found.") : base("Window found.")
{ {
} }
} }
} }
2 changes: 1 addition & 1 deletion HearthCap.Core/GameCapture/EngineEvents/WindowMinimized.cs
Expand Up @@ -7,4 +7,4 @@ public WindowMinimized()
{ {
} }
} }
} }
2 changes: 1 addition & 1 deletion HearthCap.Core/GameCapture/EngineEvents/WindowNotFound.cs
Expand Up @@ -7,4 +7,4 @@ public WindowNotFound()
{ {
} }
} }
} }
8 changes: 4 additions & 4 deletions HearthCap.Core/GameCapture/EngineSwitchEventArgs.cs
@@ -1,11 +1,11 @@
namespace HearthCap.Core.GameCapture using System;
{
using System;


namespace HearthCap.Core.GameCapture
{
public class EngineSwitchEventArgs : EventArgs public class EngineSwitchEventArgs : EventArgs
{ {
public bool? FullscreenSupport { get; set; } public bool? FullscreenSupport { get; set; }


public bool? BackgroundCaptureSupport { get; set; } public bool? BackgroundCaptureSupport { get; set; }
} }
} }
Expand Up @@ -4,4 +4,4 @@ public class RequestArenaDeckScreenshot
{ {
public bool Cancel { get; set; } public bool Cancel { get; set; }
} }
} }
Expand Up @@ -4,4 +4,4 @@ public class RequestDeckScreenshot
{ {
public bool Cancel { get; set; } public bool Cancel { get; set; }
} }
} }
3 changes: 1 addition & 2 deletions HearthCap.Core/GameCapture/HS/Commands/ResetCurrentGame.cs
Expand Up @@ -2,6 +2,5 @@
{ {
public class ResetCurrentGame public class ResetCurrentGame
{ {

} }
} }
10 changes: 5 additions & 5 deletions HearthCap.Core/GameCapture/HS/Events/ArenaDeckScreenshotTaken.cs
@@ -1,14 +1,14 @@
namespace HearthCap.Core.GameCapture.HS.Events using System.Drawing;
{
using System.Drawing;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class ArenaDeckScreenshotTaken public class ArenaDeckScreenshotTaken
{ {
public Bitmap Image { get; protected set; } public Bitmap Image { get; protected set; }


public ArenaDeckScreenshotTaken(Bitmap image) public ArenaDeckScreenshotTaken(Bitmap image)
{ {
this.Image = image; Image = image;
} }
} }
} }
6 changes: 3 additions & 3 deletions HearthCap.Core/GameCapture/HS/Events/ArenaDrafting.cs
@@ -1,12 +1,12 @@
using HearthCap.Core.GameCapture.HS.Events;

namespace HearthCap.Core.GameCapture.HS namespace HearthCap.Core.GameCapture.HS
{ {
using HearthCap.Core.GameCapture.HS.Events;

public class ArenaDrafting : GameEvent public class ArenaDrafting : GameEvent
{ {
public ArenaDrafting() public ArenaDrafting()
: base("Arena: drafting cards") : base("Arena: drafting cards")
{ {
} }
} }
} }
4 changes: 2 additions & 2 deletions HearthCap.Core/GameCapture/HS/Events/ArenaHeroDetected.cs
Expand Up @@ -5,9 +5,9 @@ public class ArenaHeroDetected : GameEvent
public ArenaHeroDetected(string hero) public ArenaHeroDetected(string hero)
: base("hero detected: " + hero) : base("hero detected: " + hero)
{ {
this.Hero = hero; Hero = hero;
} }


public string Hero { get; protected set; } public string Hero { get; protected set; }
} }
} }
4 changes: 2 additions & 2 deletions HearthCap.Core/GameCapture/HS/Events/ArenaLossesDetected.cs
Expand Up @@ -8,7 +8,7 @@ public ArenaLossesDetected(int losses)
: base("Losses: " + losses) : base("Losses: " + losses)


{ {
this.Losses = losses; Losses = losses;
} }
} }
} }
18 changes: 9 additions & 9 deletions HearthCap.Core/GameCapture/HS/Events/ArenaSessionEnded.cs
@@ -1,7 +1,7 @@
namespace HearthCap.Core.GameCapture.HS.Events using System;
{
using System;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class ArenaSessionEnded : GameEvent public class ArenaSessionEnded : GameEvent
{ {
public DateTime Started { get; set; } public DateTime Started { get; set; }
Expand All @@ -17,11 +17,11 @@ public class ArenaSessionEnded : GameEvent
public ArenaSessionEnded(DateTime started, DateTime ended, string heroKey, int wins, int losses) public ArenaSessionEnded(DateTime started, DateTime ended, string heroKey, int wins, int losses)
: base("Arena ended") : base("Arena ended")
{ {
this.Started = started; Started = started;
this.Ended = ended; Ended = ended;
this.HeroKey = heroKey; HeroKey = heroKey;
this.Wins = wins; Wins = wins;
this.Losses = losses; Losses = losses;
} }
} }
} }
16 changes: 8 additions & 8 deletions HearthCap.Core/GameCapture/HS/Events/ArenaSessionStarted.cs
@@ -1,7 +1,7 @@
namespace HearthCap.Core.GameCapture.HS.Events using System;
{
using System;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class ArenaSessionStarted : GameEvent public class ArenaSessionStarted : GameEvent
{ {
public DateTime Started { get; set; } public DateTime Started { get; set; }
Expand All @@ -15,10 +15,10 @@ public class ArenaSessionStarted : GameEvent
public ArenaSessionStarted(DateTime started, string heroKey, int wins, int losses) public ArenaSessionStarted(DateTime started, string heroKey, int wins, int losses)
: base("Arena started") : base("Arena started")
{ {
this.Started = started; Started = started;
this.HeroKey = heroKey; HeroKey = heroKey;
this.Wins = wins; Wins = wins;
this.Losses = losses; Losses = losses;
} }
} }
} }
4 changes: 2 additions & 2 deletions HearthCap.Core/GameCapture/HS/Events/ArenaWinsDetected.cs
Expand Up @@ -7,7 +7,7 @@ public class ArenaWinsDetected : GameEvent
public ArenaWinsDetected(int arenaWins) public ArenaWinsDetected(int arenaWins)
: base("Wins: " + arenaWins) : base("Wins: " + arenaWins)
{ {
this.Wins = arenaWins; Wins = arenaWins;
} }
} }
} }
4 changes: 2 additions & 2 deletions HearthCap.Core/GameCapture/HS/Events/CoinDetected.cs
Expand Up @@ -6,9 +6,9 @@ public class CoinDetected : GameEvent
public CoinDetected(bool goFirst) public CoinDetected(bool goFirst)
: base("Coin detected: " + (goFirst ? "gofirst" : "gosecond")) : base("Coin detected: " + (goFirst ? "gofirst" : "gosecond"))
{ {
this.GoFirst = goFirst; GoFirst = goFirst;
} }


public bool GoFirst { get; protected set; } public bool GoFirst { get; protected set; }
} }
} }
6 changes: 3 additions & 3 deletions HearthCap.Core/GameCapture/HS/Events/DeckDetected.cs
Expand Up @@ -5,9 +5,9 @@ public class DeckDetected : GameEvent
public string Key { get; protected set; } public string Key { get; protected set; }


public DeckDetected(string key) public DeckDetected(string key)
:base("Deck detected: " + key) : base("Deck detected: " + key)
{ {
this.Key = key; Key = key;
} }
} }
} }
10 changes: 5 additions & 5 deletions HearthCap.Core/GameCapture/HS/Events/DeckScreenshotTaken.cs
@@ -1,14 +1,14 @@
namespace HearthCap.Core.GameCapture.HS.Events using System.Drawing;
{
using System.Drawing;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class DeckScreenshotTaken public class DeckScreenshotTaken
{ {
public Bitmap Image { get; protected set; } public Bitmap Image { get; protected set; }


public DeckScreenshotTaken(Bitmap image) public DeckScreenshotTaken(Bitmap image)
{ {
this.Image = image; Image = image;
} }
} }
} }
9 changes: 4 additions & 5 deletions HearthCap.Core/GameCapture/HS/Events/GameEnded.cs
@@ -1,9 +1,8 @@
using System;
using HearthCap.Data;

namespace HearthCap.Core.GameCapture.HS.Events namespace HearthCap.Core.GameCapture.HS.Events
{ {
using System;

using HearthCap.Data;

/// <summary>The game ended.</summary> /// <summary>The game ended.</summary>
public class GameEnded : GameEvent public class GameEnded : GameEvent
{ {
Expand Down Expand Up @@ -32,4 +31,4 @@ public GameEnded()
{ {
} }
} }
} }
14 changes: 7 additions & 7 deletions HearthCap.Core/GameCapture/HS/Events/GameEvent.cs
@@ -1,17 +1,17 @@
namespace HearthCap.Core.GameCapture.HS.Events using System;
{
using System;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class GameEvent public class GameEvent
{ {
public GameEvent(string message) public GameEvent(string message)
{ {
this.Date = DateTime.Now; Date = DateTime.Now;
this.Message = message; Message = message;
} }

public DateTime Date { get; set; } public DateTime Date { get; set; }


public string Message { get; set; } public string Message { get; set; }
} }
} }
12 changes: 6 additions & 6 deletions HearthCap.Core/GameCapture/HS/Events/GameModeChanged.cs
@@ -1,7 +1,7 @@
namespace HearthCap.Core.GameCapture.HS.Events using HearthCap.Data;
{
using HearthCap.Data;


namespace HearthCap.Core.GameCapture.HS.Events
{
public class GameModeChanged : GameEvent public class GameModeChanged : GameEvent
{ {
public GameMode OldGameMode { get; protected set; } public GameMode OldGameMode { get; protected set; }
Expand All @@ -11,8 +11,8 @@ public class GameModeChanged : GameEvent
public GameModeChanged(GameMode oldGameMode, GameMode gameMode) public GameModeChanged(GameMode oldGameMode, GameMode gameMode)
: base(string.Format("Mode changed from {0} to {1}.", oldGameMode, gameMode)) : base(string.Format("Mode changed from {0} to {1}.", oldGameMode, gameMode))
{ {
this.OldGameMode = oldGameMode; OldGameMode = oldGameMode;
this.GameMode = gameMode; GameMode = gameMode;
} }
} }
} }

0 comments on commit 9c38cf5

Please sign in to comment.