CompareProgressControl.xaml.cs 706 B

1234567891011121314151617181920212223242526272829
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace ComPDFKit.Controls.Comparison
  4. {
  5. public partial class CompareProgressControl : UserControl
  6. {
  7. public event RoutedEventHandler CloseClick;
  8. public CompareProgressControl()
  9. {
  10. InitializeComponent();
  11. }
  12. public void SetValue(int value)
  13. {
  14. CompareProgressBar.Value = value;
  15. }
  16. public void SetValue(double value)
  17. {
  18. CompareProgressBar.Value = (int)(value * 100);
  19. }
  20. private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
  21. {
  22. CloseClick?.Invoke(this, null);
  23. }
  24. }
  25. }