-
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.
- Loading branch information
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace DeFRaG_Helper | ||
{ | ||
internal class MessageHelper | ||
{ | ||
//method to show message in MainWindow showmessage method | ||
public static void ShowMessage(string message) | ||
{ | ||
App.Current.Dispatcher.Invoke(() => { MainWindow.Instance.ShowMessage(message); }); | ||
SimpleLogger.Log(message); | ||
} | ||
public static void ShowMessageAsync(string message) | ||
{ | ||
App.Current.Dispatcher.Invoke(() => { MainWindow.Instance.ShowMessage(message); }); | ||
SimpleLogger.Log(message); | ||
} | ||
|
||
public static void LogMessage(string message) | ||
{ | ||
SimpleLogger.Log(message); | ||
} | ||
|
||
public static async Task LogMessageAsync(string message) | ||
{ | ||
await SimpleLogger.LogAsync(message); | ||
} | ||
|
||
public static void LogException(Exception ex) | ||
{ | ||
SimpleLogger.Log($"Exception: {ex.Message}, {ex.StackTrace}"); | ||
} | ||
|
||
public static async Task LogExceptionAsync(Exception ex) | ||
{ | ||
await SimpleLogger.LogAsync($"Exception: {ex.Message}, {ex.StackTrace}"); | ||
} | ||
|
||
public static void VerboseLog(string message) | ||
{ | ||
SimpleLogger.Log($"Verbose: {message}"); | ||
} | ||
public static async Task VerboseLogAsync(string message) | ||
{ | ||
await SimpleLogger.LogAsync($"Verbose: {message}"); | ||
} | ||
} | ||
} |
File renamed without changes.