1
0
Fork 0

feat: 메인 창 사이드바에 변환 진행 표시 패널 추가

ProcessQueueButton 위에 ProcessingProgressPanel:
- 현재 변환 중인 파일명 (이름만, ellipsis 처리)
- N / Total 카운터
- 0~100% ProgressBar (Index + FileProgress 기준 누적)
- % 텍스트

ShowProcessingProgress(total) → 변환 시작 시 표시,
UpdateProcessingProgress(p) → reporter 콜백에서 실시간 갱신,
HideProcessingProgress() → finally에서 숨김
This commit is contained in:
Yun Chan 2026-05-07 16:37:54 +09:00
parent 2633a928c1
commit ae897ea043
2 changed files with 63 additions and 0 deletions

View file

@ -515,6 +515,7 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
_cts = new CancellationTokenSource();
UpdateProcessQueueButton();
ShowProcessingProgress(snapshot.Count);
var engine = ((App)Application.Current).Engine;
var options = BuildOptions();
@ -527,6 +528,7 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
else if (i == p.Index) snapshot[i].SetState($"{(int)(p.FileProgress * 100)}%");
else snapshot[i].SetState("queued");
}
UpdateProcessingProgress(p);
});
try
@ -573,10 +575,41 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
UpdateProcessQueueButton();
UpdateActiveQueueVisibility();
ApplyAppDataStats();
HideProcessingProgress();
if (_activeQueue.Count == 0) ShowTab("Past");
}
}
private void ShowProcessingProgress(int totalCount)
{
if (ProcessingProgressPanel is null) return;
ProcessingProgressPanel.Visibility = Visibility.Visible;
ProcessingProgressBar.Value = 0;
ProcessingPercentLabel.Text = "0%";
ProcessingCountLabel.Text = $"0 / {totalCount}";
ProcessingFileLabel.Text = "준비 중…";
}
private void UpdateProcessingProgress(ConvertProgress p)
{
if (ProcessingProgressPanel is null) return;
var total = Math.Max(1, p.Total);
var overall = ((p.Index + p.FileProgress) / total) * 100.0;
overall = Math.Clamp(overall, 0, 100);
ProcessingProgressBar.Value = overall;
ProcessingPercentLabel.Text = $"{overall:0.#}%";
ProcessingCountLabel.Text = $"{Math.Min(p.Index + 1, p.Total)} / {p.Total}";
ProcessingFileLabel.Text = string.IsNullOrEmpty(p.CurrentPath)
? "처리 중…"
: Path.GetFileName(p.CurrentPath);
}
private void HideProcessingProgress()
{
if (ProcessingProgressPanel is null) return;
ProcessingProgressPanel.Visibility = Visibility.Collapsed;
}
// ============== History ==============
private void AddToHistory(HistoryEntry entry)