UploadDrawingForm.xaml.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using CollaborativePlatformMain.DFEntity;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Shapes;
  16. namespace CollaborativePlatformMain.Form
  17. {
  18. /// <summary>
  19. /// UploadDrawingForm.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class UploadDrawingForm : Window
  22. {
  23. private ObservableCollection<TreeViewBind> TreeViews = new ObservableCollection<TreeViewBind>();
  24. public UploadDrawingForm(ObservableCollection<TreeViewBind> treeViews)
  25. {
  26. InitializeComponent();
  27. cb_range.ItemsSource = new List<string> { "全图对比", "指定图层对比" };
  28. TreeViews = treeViews;
  29. }
  30. private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
  31. {
  32. RadioButton radioButton = sender as RadioButton;
  33. if (radioButton.Content.Equals("是"))
  34. {
  35. sp_contrast.Visibility = Visibility.Visible;
  36. }
  37. else
  38. {
  39. sp_contrast.Visibility = Visibility.Collapsed;
  40. }
  41. }
  42. public List<string> str = new List<string>();
  43. private void Button_Click(object sender, RoutedEventArgs e)
  44. {
  45. string name = tb_dwgName.Text;
  46. string dbname = tb_dwg2Name.Text;
  47. TreeViewBind treeViewBind = new TreeViewBind(name, new List<TreeViewBind>() { new TreeViewBind("原图纸"), new TreeViewBind(dbname + "对比图") });
  48. for (int i = 0; i < TreeViews.Count; i++)
  49. {
  50. if (TreeViews[i].Name.Equals("项目002"))
  51. {
  52. TreeViews[i].Children.Add(treeViewBind);
  53. }
  54. }
  55. this.Close();
  56. }
  57. }
  58. }