mirror of
https://github.com/Stone-Red-Code/Markdowser.git
synced 2026-09-04 00:56:13 +02:00
Small UI improvements
This commit is contained in:
@@ -49,7 +49,7 @@ internal partial class HtmlProcessor : IContentProcessor
|
||||
{
|
||||
_ = html.AppendLine(await streamReader.ReadLineAsync());
|
||||
|
||||
progress.Report(new ProcessingProgress(contentStream.Position, length));
|
||||
progress.Report(new ProcessingProgress(Encoding.Default.GetByteCount(html.ToString()), length, "Downloading HTML...", true));
|
||||
}
|
||||
|
||||
HtmlDocument htmlDoc = new HtmlDocument();
|
||||
@@ -68,7 +68,7 @@ internal partial class HtmlProcessor : IContentProcessor
|
||||
|
||||
foreach (string line in lines)
|
||||
{
|
||||
progress.Report(new ProcessingProgress(lines.Length, currentLine));
|
||||
progress.Report(new ProcessingProgress(currentLine, lines.Length, "Processing markdown..."));
|
||||
currentLine++;
|
||||
|
||||
string trimmedLine = line.Trim();
|
||||
|
||||
@@ -381,9 +381,6 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
|
||||
private void UpdateProgress(ProcessingProgress progress)
|
||||
{
|
||||
Progress = progress.Current;
|
||||
ProgressMax = progress.Total;
|
||||
|
||||
if (progress.IsBytes)
|
||||
{
|
||||
ProgressText = $"{progress.Message} ({{1:0}}%) {BytesToString.Convert((long)Progress)}/{BytesToString.Convert((long)ProgressMax)}";
|
||||
@@ -392,6 +389,9 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
ProgressText = $"{progress.Message} ({{1:0}}%) {{0}}/{{3}}";
|
||||
}
|
||||
|
||||
ProgressMax = progress.Total;
|
||||
Progress = progress.Current;
|
||||
}
|
||||
|
||||
private void UrlChanged(object? sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user