1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using CollaborativePlatformMain.DFEntity;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace CollaborativePlatformMain.Form
- {
- /// <summary>
- /// UploadDrawingForm.xaml 的交互逻辑
- /// </summary>
- public partial class UploadDrawingForm : Window
- {
- private ObservableCollection<TreeViewBind> TreeViews = new ObservableCollection<TreeViewBind>();
- public UploadDrawingForm(ObservableCollection<TreeViewBind> treeViews)
- {
- InitializeComponent();
- cb_range.ItemsSource = new List<string> { "全图对比", "指定图层对比" };
- TreeViews = treeViews;
- }
- private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
- {
- RadioButton radioButton = sender as RadioButton;
- if (radioButton.Content.Equals("是"))
- {
- sp_contrast.Visibility = Visibility.Visible;
- }
- else
- {
- sp_contrast.Visibility = Visibility.Collapsed;
- }
- }
- public List<string> str = new List<string>();
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- string name = tb_dwgName.Text;
- string dbname = tb_dwg2Name.Text;
- TreeViewBind treeViewBind = new TreeViewBind(name, new List<TreeViewBind>() { new TreeViewBind("原图纸"), new TreeViewBind(dbname + "对比图") });
- for (int i = 0; i < TreeViews.Count; i++)
- {
- if (TreeViews[i].Name.Equals("项目002"))
- {
- TreeViews[i].Children.Add(treeViewBind);
- }
- }
- this.Close();
- }
- }
- }
|