123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- using CollaborativePlatformMain.CADStartUtil;
- using CollaborativePlatformMain.DFEntity.MessageSubUtil;
- using System;
- using System.Collections.Generic;
- 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.MessageSubPage
- {
- /// <summary>
- /// FullProfessionPage.xaml 的交互逻辑
- /// </summary>
- public partial class FullProfessionPage : Page
- {
- /// <summary>
- /// 父级窗体
- /// </summary>
- public HomepageForm HomepageForm;
- public FullProfessionPage(HomepageForm homepageForm)
- {
- InitializeComponent();
- HomepageForm = homepageForm;
- }
- private void tr_threemodel_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
- {
- int a = 1;
- }
- /// <summary>
- /// 建筑-鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tb_arch_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- // 创建新的列定义
- ColumnDefinition colDef1 = new ColumnDefinition();
- colDef1.Width = new GridLength(3, GridUnitType.Star);
- ColumnDefinition colDef2 = new ColumnDefinition();
- colDef2.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef3 = new ColumnDefinition();
- colDef3.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef4 = new ColumnDefinition();
- colDef4.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef5 = new ColumnDefinition();
- colDef5.Width = new GridLength(1, GridUnitType.Star);
- // 清除旧的列定义
- gridName.ColumnDefinitions.Clear();
- // 添加到Grid中
- gridName.ColumnDefinitions.Add(colDef1);
- gridName.ColumnDefinitions.Add(colDef2);
- gridName.ColumnDefinitions.Add(colDef3);
- gridName.ColumnDefinitions.Add(colDef4);
- gridName.ColumnDefinitions.Add(colDef5);
- }
- /// <summary>
- /// 结构-鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tb_stru_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- // 创建新的列定义
- ColumnDefinition colDef1 = new ColumnDefinition();
- colDef1.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef2 = new ColumnDefinition();
- colDef2.Width = new GridLength(3, GridUnitType.Star);
- ColumnDefinition colDef3 = new ColumnDefinition();
- colDef3.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef4 = new ColumnDefinition();
- colDef4.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef5 = new ColumnDefinition();
- colDef5.Width = new GridLength(1, GridUnitType.Star);
- // 清除旧的列定义
- gridName.ColumnDefinitions.Clear();
- // 添加到Grid中
- gridName.ColumnDefinitions.Add(colDef1);
- gridName.ColumnDefinitions.Add(colDef2);
- gridName.ColumnDefinitions.Add(colDef3);
- gridName.ColumnDefinitions.Add(colDef4);
- gridName.ColumnDefinitions.Add(colDef5);
- }
- /// <summary>
- /// 给排水-鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tb_water_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- // 创建新的列定义
- ColumnDefinition colDef1 = new ColumnDefinition();
- colDef1.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef2 = new ColumnDefinition();
- colDef2.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef3 = new ColumnDefinition();
- colDef3.Width = new GridLength(3, GridUnitType.Star);
- ColumnDefinition colDef4 = new ColumnDefinition();
- colDef4.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef5 = new ColumnDefinition();
- colDef5.Width = new GridLength(1, GridUnitType.Star);
- // 清除旧的列定义
- gridName.ColumnDefinitions.Clear();
- // 添加到Grid中
- gridName.ColumnDefinitions.Add(colDef1);
- gridName.ColumnDefinitions.Add(colDef2);
- gridName.ColumnDefinitions.Add(colDef3);
- gridName.ColumnDefinitions.Add(colDef4);
- gridName.ColumnDefinitions.Add(colDef5);
- }
- /// <summary>
- /// 暖通-鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tb_warm_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- // 创建新的列定义
- ColumnDefinition colDef1 = new ColumnDefinition();
- colDef1.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef2 = new ColumnDefinition();
- colDef2.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef3 = new ColumnDefinition();
- colDef3.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef4 = new ColumnDefinition();
- colDef4.Width = new GridLength(3, GridUnitType.Star);
- ColumnDefinition colDef5 = new ColumnDefinition();
- colDef5.Width = new GridLength(1, GridUnitType.Star);
- // 清除旧的列定义
- gridName.ColumnDefinitions.Clear();
- // 添加到Grid中
- gridName.ColumnDefinitions.Add(colDef1);
- gridName.ColumnDefinitions.Add(colDef2);
- gridName.ColumnDefinitions.Add(colDef3);
- gridName.ColumnDefinitions.Add(colDef4);
- gridName.ColumnDefinitions.Add(colDef5);
- }
- /// <summary>
- /// 电气-鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void tb_ele_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- // 创建新的列定义
- ColumnDefinition colDef1 = new ColumnDefinition();
- colDef1.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef2 = new ColumnDefinition();
- colDef2.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef3 = new ColumnDefinition();
- colDef3.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef4 = new ColumnDefinition();
- colDef4.Width = new GridLength(1, GridUnitType.Star);
- ColumnDefinition colDef5 = new ColumnDefinition();
- colDef5.Width = new GridLength(3, GridUnitType.Star);
- // 清除旧的列定义
- gridName.ColumnDefinitions.Clear();
- // 添加到Grid中
- gridName.ColumnDefinitions.Add(colDef1);
- gridName.ColumnDefinitions.Add(colDef2);
- gridName.ColumnDefinitions.Add(colDef3);
- gridName.ColumnDefinitions.Add(colDef4);
- gridName.ColumnDefinitions.Add(colDef5);
- }
- /// <summary>
- /// 点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void cb_Check_Checked(object sender, RoutedEventArgs e)
- {
- }
- /// <summary>
- /// 鼠标点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Label_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- Label label = sender as Label;
- if (label == null) return;
- OperatEntity operatEntity = label.DataContext as OperatEntity;
- if (operatEntity == null) return;
- if (operatEntity.DrawPath != null && operatEntity.DrawPath != "")
- {
- OpenDrawPathData openDrawPathData = new OpenDrawPathData(true, operatEntity.DrawPath);
- StartCADUtil.StartCADMath(false, openDrawPathData);
- }
- }
- }
- }
|