ExportForm.xaml.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using InABox.Wpf;
  2. using System;
  3. using System.Windows;
  4. using System.Windows.Controls;
  5. namespace PRSDesktop.Forms.Export
  6. {
  7. /// <summary>
  8. /// Interaction logic for ExportForm.xaml
  9. /// </summary>
  10. public partial class ExportForm : ThemableWindow
  11. {
  12. private readonly ExportGrid Columns;
  13. public ExportForm(Type type)
  14. {
  15. InitializeComponent();
  16. Columns = new ExportGrid(type)
  17. {
  18. HorizontalAlignment = HorizontalAlignment.Stretch,
  19. VerticalAlignment = VerticalAlignment.Stretch,
  20. Margin = new Thickness(5)
  21. };
  22. grid.Children.Add(Columns);
  23. Columns.SetValue(Grid.RowProperty, 0);
  24. Columns.SetValue(Grid.ColumnProperty, 0);
  25. Columns.SetValue(Grid.ColumnSpanProperty, 3);
  26. }
  27. private void Window_Loaded(object sender, RoutedEventArgs e)
  28. {
  29. Columns.Refresh(true, true);
  30. }
  31. private void OKButton_Click(object sender, RoutedEventArgs e)
  32. {
  33. DialogResult = true;
  34. Close();
  35. }
  36. private void CancelButton_Click(object sender, RoutedEventArgs e)
  37. {
  38. DialogResult = false;
  39. Close();
  40. }
  41. }
  42. }