Skip to content

Commit

Permalink
API.LogEvents.OnLogLine
Browse files Browse the repository at this point in the history
  • Loading branch information
Epix37 committed Aug 22, 2015
1 parent 0d35d50 commit d244f36
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Hearthstone Deck Tracker/API/LogEvents.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Hearthstone_Deck_Tracker.API
{
public class LogEvents
{
public static readonly ActionList<string> OnLogLine = new ActionList<string>();
}
}
1 change: 1 addition & 0 deletions Hearthstone Deck Tracker/Hearthstone Deck Tracker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<Compile Include="API\ActionList.cs" />
<Compile Include="API\DeckManagerEvents.cs" />
<Compile Include="API\GameEvents.cs" />
<Compile Include="API\LogEvents.cs" />
<Compile Include="API\Overlay.cs" />
<Compile Include="Controls\Card.xaml.cs">
<DependentUpon>Card.xaml</DependentUpon>
Expand Down
4 changes: 4 additions & 0 deletions Hearthstone Deck Tracker/HsLogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using Hearthstone_Deck_Tracker.Enums;
using Hearthstone_Deck_Tracker.Enums.Hearthstone;
using Hearthstone_Deck_Tracker.Hearthstone;
Expand Down Expand Up @@ -308,7 +309,10 @@ private void Analyze(string log)
_currentOffset += logLine.Length + 1;

if(logLine.StartsWith("["))
{
Game.AddHSLogLine(logLine);
API.LogEvents.OnLogLine.Execute(logLine);
}

#region [Power]

Expand Down

0 comments on commit d244f36

Please sign in to comment.