Skip to content

Commit

Permalink
add UILogger
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Jul 16, 2019
1 parent b24944f commit 9d8564d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion HiProtobuf/HiProtobuf.UI/HiProtobuf.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<Compile Include="HiProtobuf.Designer.cs">
<DependentUpon>HiProtobuf.cs</DependentUpon>
</Compile>
<Compile Include="Logger.cs" />
<Compile Include="UILogger.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Config.cs" />
Expand Down
6 changes: 3 additions & 3 deletions HiProtobuf/HiProtobuf.UI/HiProtobuf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ private void Form1_Load(object sender, EventArgs e)
{
Log.OnInfo += (x) =>
{
textBox6.Text = Logger.Log;
textBox6.Text = UILogger.Log;
};
Log.OnWarning += (x) =>
{
textBox6.Text = Logger.Log;
textBox6.Text = UILogger.Log;
};
Log.OnError += (x) =>
{
textBox6.Text = Logger.Log;
textBox6.Text = UILogger.Log;
};
}

Expand Down
2 changes: 1 addition & 1 deletion HiProtobuf/HiProtobuf.UI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static class Program
[STAThread]
static void Main()
{
Log.LogHandler = new Logger();
Log.LogHandler = new UILogger();
Config.Load();

Application.EnableVisualStyles();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace HiProtobuf.UI
{
internal class Logger : ILogHandler
internal class UILogger : ILogHandler
{
public static string Log;
public void Info(params object[] args)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
383484a4a7e44ecca0734a0b472c7dcc2c786ad4
f846fb7a7bf7a73a430d5062da41f61fb8bef54d
Empty file.

0 comments on commit 9d8564d

Please sign in to comment.