This commit is contained in:
mashed-potatoes 2020-07-22 03:42:10 +05:00
parent 2c9c30013b
commit 62b6ad7979
3 changed files with 15 additions and 17 deletions

View file

@ -30,7 +30,7 @@ namespace PotatoNV_next.Controls
progressBarRowDefinition.Height = new GridLength(ShowProgressBar ? 16 : 0);
}
private void AppendLine(LogEventArgs e)
private void AppendLine(Log.LogEventArgs e)
{
if (!Dispatcher.CheckAccess())
{
@ -40,7 +40,7 @@ namespace PotatoNV_next.Controls
logBox.AppendText(e.Message);
}
private void OnProgress(ProgressEventArgs progressEventArgs)
private void OnProgress(Log.ProgressEventArgs progressEventArgs)
{
if (!Dispatcher.CheckAccess())
{

View file

@ -144,7 +144,6 @@ namespace PotatoNV_next
try
{
if (args.TargetMode == UsbController.Device.DMode.DownloadVCOM)
{
Log.Info("--> Flashing bootloader");

View file

@ -5,6 +5,19 @@ namespace PotatoNV_next.Utils
{
public class Log
{
public class LogEventArgs : EventArgs
{
public string Message { get; set; }
public Status Status { get; set; }
}
public class ProgressEventArgs : EventArgs
{
public int? Value { get; set; }
public int? MaxValue { get; set; }
public bool ShowBar { get; set; }
}
public static bool PrintDebug { get; set; } = false;
private static StringBuilder builder = new StringBuilder();
@ -96,18 +109,4 @@ namespace PotatoNV_next.Utils
return builder.ToString();
}
}
public class LogEventArgs : EventArgs
{
public string Message { get; set; }
public Log.Status Status { get; set; }
}
public class ProgressEventArgs : EventArgs
{
public int? Value { get; set; }
public int? MaxValue { get; set; }
public bool ShowBar { get; set; }
}
}