123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Windows;
- namespace AIPractice.LabellerServer.WPF
- {
- /// <summary>
- /// Interaction logic for UpdateDatabaseWindow.xaml
- /// </summary>
- public partial class UpdateDatabaseWindow : Window
- {
- public double Progress
- {
- get => ProgressBar.Value;
- set => ProgressBar.Value = value;
- }
- public UpdateDatabaseWindow(bool showProgress = true)
- {
- InitializeComponent();
- if (!showProgress)
- {
- UpdateInfo.Visibility = Visibility.Collapsed;
- ProgressBar.Visibility = Visibility.Collapsed;
- WaitingBox.Visibility = Visibility.Visible;
- Waiting.StartWaitingSpinner();
- }
- else
- {
- UpdateInfo.Visibility = Visibility.Visible;
- ProgressBar.Visibility = Visibility.Visible;
- WaitingBox.Visibility = Visibility.Collapsed;
- }
- }
- public void SetUpdatedCount(int count, int total)
- {
- UpdateInfo.Text = $"更新中...{(int) Progress}%, 已更新数目:{count}, 总计:{total}";
- }
- }
- }
|