forked from tesonet/windows-party
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* extended the logging operation to framework * tweaked some graphical elements around (login field borders when focused, logout button icon) * figured out how to reset password field w/o framework throwing a hissy fit (thanks, logging) * added a KeyPress binds for login form fields (you can now press enter to login)
- Loading branch information
Showing
13 changed files
with
120 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/windows-party/windows-party/Helpers/FrameworkLogger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Caliburn.Micro; | ||
using System; | ||
|
||
namespace windows_party.Helpers | ||
{ | ||
/** | ||
* Framework-level logging idea from | ||
* https://buksbaum.us/2010/08/08/how-to-do-logging-with-caliburn.micro/ | ||
*/ | ||
|
||
class FrameworkLogger : ILog | ||
{ | ||
#region Logger | ||
private readonly NLog.Logger Logger; | ||
#endregion | ||
|
||
#region constructor/destructor | ||
public FrameworkLogger(Type type) | ||
{ | ||
Logger = NLog.LogManager.GetLogger(type.Name); | ||
} | ||
#endregion | ||
|
||
#region logging handlers | ||
public void Error(Exception exception) => Logger.Error(exception, exception.Message); | ||
|
||
public void Warn(string format, params object[] args) => Logger.Warn(format, args); | ||
|
||
// ILog does not have "Debug" level messages, so everything non-essential gets dumped into Info, redirect it properly | ||
public void Info(string format, params object[] args) => Logger.Debug(format, args); | ||
#endregion | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/windows-party/windows-party/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters