AddCertificationDialog.xaml.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace Compdfkit_Tools.DigitalSignature.AddCertificationControl
  15. {
  16. /// <summary>
  17. /// AddCertificationDialog.xaml 的交互逻辑
  18. /// </summary>
  19. public partial class AddCertificationDialog : Window
  20. {
  21. private AddCertificationControl addCertificationControl = null;
  22. private AddCustomCertificationControl addCustomCertificationControl = null;
  23. public AddCertificationDialog()
  24. {
  25. InitializeComponent();
  26. addCertificationControl = new AddCertificationControl();
  27. BodyBd.Child = addCertificationControl;
  28. }
  29. private void Window_Loaded(object sender, RoutedEventArgs e)
  30. {
  31. addCertificationControl.ContinueEvent += AddCertificationControl_ContinueEvent;
  32. }
  33. private void Window_Unloaded(object sender, RoutedEventArgs e)
  34. {
  35. addCertificationControl.ContinueEvent -= AddCertificationControl_ContinueEvent;
  36. }
  37. private void AddCertificationControl_ContinueEvent(object sender, EventArgs e)
  38. {
  39. addCustomCertificationControl = new AddCustomCertificationControl();
  40. BodyBd.Child = addCustomCertificationControl;
  41. this.Height = addCustomCertificationControl.Height + 35;
  42. this.Width = addCustomCertificationControl.Width + 20;
  43. }
  44. }
  45. }