feat: 메인 창 사이드바에 변환 진행 표시 패널 추가
ProcessQueueButton 위에 ProcessingProgressPanel: - 현재 변환 중인 파일명 (이름만, ellipsis 처리) - N / Total 카운터 - 0~100% ProgressBar (Index + FileProgress 기준 누적) - % 텍스트 ShowProcessingProgress(total) → 변환 시작 시 표시, UpdateProcessingProgress(p) → reporter 콜백에서 실시간 갱신, HideProcessingProgress() → finally에서 숨김
This commit is contained in:
parent
2633a928c1
commit
ae897ea043
2 changed files with 63 additions and 0 deletions
|
|
@ -233,6 +233,36 @@
|
||||||
<TextBlock x:Name="CapabilityStatusText" Margin="0,0,0,12"
|
<TextBlock x:Name="CapabilityStatusText" Margin="0,0,0,12"
|
||||||
Style="{StaticResource FsCaptionStyle}"
|
Style="{StaticResource FsCaptionStyle}"
|
||||||
TextWrapping="Wrap" Visibility="Collapsed"/>
|
TextWrapping="Wrap" Visibility="Collapsed"/>
|
||||||
|
|
||||||
|
<!-- Conversion progress (shown only while processing) -->
|
||||||
|
<StackPanel x:Name="ProcessingProgressPanel" Margin="0,0,0,12"
|
||||||
|
Visibility="Collapsed">
|
||||||
|
<Grid Margin="0,0,0,6">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock x:Name="ProcessingFileLabel"
|
||||||
|
Style="{StaticResource FsCaptionStyle}"
|
||||||
|
Foreground="{StaticResource FsTextPrimary}"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="처리 중…"/>
|
||||||
|
<TextBlock x:Name="ProcessingCountLabel" Grid.Column="1"
|
||||||
|
Margin="8,0,0,0"
|
||||||
|
FontFamily="{StaticResource FsFontMono}" FontSize="11"
|
||||||
|
Foreground="{StaticResource FsAccentBlue}"
|
||||||
|
Text="0 / 0"/>
|
||||||
|
</Grid>
|
||||||
|
<ProgressBar x:Name="ProcessingProgressBar"
|
||||||
|
Height="6" Minimum="0" Maximum="100" Value="0"/>
|
||||||
|
<TextBlock x:Name="ProcessingPercentLabel"
|
||||||
|
Margin="0,4,0,0"
|
||||||
|
FontFamily="{StaticResource FsFontMono}" FontSize="10"
|
||||||
|
Foreground="{StaticResource FsTextSecondary}"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="0%"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<Button x:Name="ProcessQueueButton"
|
<Button x:Name="ProcessQueueButton"
|
||||||
Content="Idle — drop files to begin"
|
Content="Idle — drop files to begin"
|
||||||
Style="{StaticResource FsPrimaryButtonStyle}"
|
Style="{StaticResource FsPrimaryButtonStyle}"
|
||||||
|
|
|
||||||
|
|
@ -515,6 +515,7 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
|
||||||
|
|
||||||
_cts = new CancellationTokenSource();
|
_cts = new CancellationTokenSource();
|
||||||
UpdateProcessQueueButton();
|
UpdateProcessQueueButton();
|
||||||
|
ShowProcessingProgress(snapshot.Count);
|
||||||
|
|
||||||
var engine = ((App)Application.Current).Engine;
|
var engine = ((App)Application.Current).Engine;
|
||||||
var options = BuildOptions();
|
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 if (i == p.Index) snapshot[i].SetState($"{(int)(p.FileProgress * 100)}%");
|
||||||
else snapshot[i].SetState("queued");
|
else snapshot[i].SetState("queued");
|
||||||
}
|
}
|
||||||
|
UpdateProcessingProgress(p);
|
||||||
});
|
});
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -573,10 +575,41 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
|
||||||
UpdateProcessQueueButton();
|
UpdateProcessQueueButton();
|
||||||
UpdateActiveQueueVisibility();
|
UpdateActiveQueueVisibility();
|
||||||
ApplyAppDataStats();
|
ApplyAppDataStats();
|
||||||
|
HideProcessingProgress();
|
||||||
if (_activeQueue.Count == 0) ShowTab("Past");
|
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 ==============
|
// ============== History ==============
|
||||||
|
|
||||||
private void AddToHistory(HistoryEntry entry)
|
private void AddToHistory(HistoryEntry entry)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue