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
{
///
/// SeconToolLibraryPage.xaml 的交互逻辑
///
public partial class SeconToolLibraryPage : Page
{
///
/// 块子功能
///
public List BlockDatas = new List();
///
/// 对比子功能
///
public List ContrastDatas = new List();
///
/// 二维子功能
///
public List TwoDimDatas = new List();
///
/// 文字子功能
///
public List TextDatas = new List();
public SeconToolLibraryPage()
{
InitializeComponent();
}
///
/// 窗体初始化
///
///
///
private void Window_Loaded(object sender, RoutedEventArgs e)
{
ToolFunctionEntity toolFunctionEntity1 = new ToolFunctionEntity("快速建块", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity2 = new ToolFunctionEntity("块分解", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity3 = new ToolFunctionEntity("块基点更改", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity4 = new ToolFunctionEntity("修改块颜色", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity11 = new ToolFunctionEntity("修改块名称", @"/Image/folderImage.png", false);
BlockDatas = new List() { toolFunctionEntity1, toolFunctionEntity2, toolFunctionEntity3, toolFunctionEntity4, toolFunctionEntity11 };
ToolFunctionEntity toolFunctionEntity5 = new ToolFunctionEntity("图纸对比", @"/Image/folderImage.png", false);
ContrastDatas = new List() { toolFunctionEntity5 };
ToolFunctionEntity toolFunctionEntity6 = new ToolFunctionEntity("二维审查", @"/Image/folderImage.png", false);
TwoDimDatas = new List() { toolFunctionEntity6 };
ToolFunctionEntity toolFunctionEntity7 = new ToolFunctionEntity("文字替换", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity8 = new ToolFunctionEntity("文字搜索", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity9 = new ToolFunctionEntity("文字合并", @"/Image/folderImage.png", false);
ToolFunctionEntity toolFunctionEntity10 = new ToolFunctionEntity("文字样式补充", @"/Image/folderImage.png", false);
TextDatas = new List() { toolFunctionEntity7, toolFunctionEntity8, toolFunctionEntity9, toolFunctionEntity10 };
}
///
/// 块处理
///
///
///
private void bt_bock_Click(object sender, RoutedEventArgs e)
{
sv_legend.ItemsSource = null;
sv_legend.ItemsSource = BlockDatas;
}
///
/// 图纸对比
///
///
///
private void bt_Comparison_Click(object sender, RoutedEventArgs e)
{
sv_legend.ItemsSource = null;
sv_legend.ItemsSource = ContrastDatas;
}
///
/// 二维审查
///
///
///
private void bt_twoReview_Click(object sender, RoutedEventArgs e)
{
sv_legend.ItemsSource = null;
sv_legend.ItemsSource = TwoDimDatas;
}
///
/// 文字处理
///
///
///
private void bt_text_Click(object sender, RoutedEventArgs e)
{
sv_legend.ItemsSource = null;
sv_legend.ItemsSource = TextDatas;
}
public SuspensionForm BaseForm = null;
///
/// 添加漂浮工具
///
///
///
private void bt_addTools(object sender, RoutedEventArgs e)
{
List allToolEntitys = new List();
allToolEntitys.AddRange(BlockDatas.Where(x => x.IsCheck));
allToolEntitys.AddRange(ContrastDatas.Where(x => x.IsCheck));
allToolEntitys.AddRange(TwoDimDatas.Where(x => x.IsCheck));
allToolEntitys.AddRange(TextDatas.Where(x => x.IsCheck));
if (BaseForm != null)
{
BaseForm.SetToolEntity(allToolEntitys);
}
else
{
BaseForm = new SuspensionForm(this, allToolEntitys);
BaseForm.Show();
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
}
private void CheckBox_Click(object sender, RoutedEventArgs e)
{
}
private void StackPanel_MouseDown(object sender, MouseButtonEventArgs e)
{
}
}
}