|
|
@@ -0,0 +1,470 @@
|
|
|
+<UserControl x:Class="YSAI.Tool.Wpf.views.DaHttp"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
|
|
|
+ xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
|
|
|
+ xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:pt="http://propertytools.org/wpf"
|
|
|
+ xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
|
|
|
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
|
|
|
+ Background="{DynamicResource ContentBackgroundPicture}">
|
|
|
+ <UserControl.DataContext>
|
|
|
+ <c:DaHttpController />
|
|
|
+ </UserControl.DataContext>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!--资源加载-->
|
|
|
+ <UserControl.Resources>
|
|
|
+ <ResourceDictionary>
|
|
|
+ <Style TargetType="ToolTip">
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
|
|
|
+ </Style>
|
|
|
+ <cs:CheckConverter x:Key="CheckConverter" />
|
|
|
+ <ResourceDictionary.MergedDictionaries>
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ComboBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Button.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_DataGrid.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Border.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TbaControl.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ScrollViewer.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_GroupBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TextBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_CheckBox.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_RadioButton.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_DatePicker.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ContextMenu.xaml" />
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TreeView.xaml" />
|
|
|
+ </ResourceDictionary.MergedDictionaries>
|
|
|
+ </ResourceDictionary>
|
|
|
+ </UserControl.Resources>
|
|
|
+
|
|
|
+ <Border Background="#F0F2F0" Width="auto" Height="auto" CornerRadius="{DynamicResource WindowCornerRadius}" Margin="50">
|
|
|
+ <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0" >
|
|
|
+ <GroupBox.Header>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Grid Background="Transparent">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Tool}" Width="14" />
|
|
|
+ <TextBlock Text="{Binding ToolTitle}" FontSize="13" Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </GroupBox.Header>
|
|
|
+ <!--基础数据与功能区域-->
|
|
|
+ <Grid >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="auto"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <ToggleButton Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-28,3,0" ToolTip="节点信息浏览[隐藏/显示]" Panel.ZIndex="3" IsChecked="{Binding NodeBrowseIsChecked}">
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="Unchecked">
|
|
|
+ <mvvm:EventCommand Command="{Binding ToggleButton_Unchecked}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
+ <mvvm:EventCommand Command="{Binding ToggleButton_Checked}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ <ToggleButton.Template>
|
|
|
+ <ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
+ <Image x:Name="image" Source="{DynamicResource ZommOff}" Stretch="Fill" Width="15" Height="15" />
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter Property="Source" TargetName="image" Value="{DynamicResource ZommOn}"/>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </ToggleButton.Template>
|
|
|
+ <ToggleButton.Triggers>
|
|
|
+ <EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <DoubleAnimation Storyboard.TargetName="nodeBrowse" Storyboard.TargetProperty="MinWidth" From="1150" To="0" Duration="0:0:0.7"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ <EventTrigger RoutedEvent="ToggleButton.Checked">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <DoubleAnimation Storyboard.TargetName="nodeBrowse" Storyboard.TargetProperty="MinWidth" From="0" To="1150" Duration="0:0:0.7"/>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ </ToggleButton.Triggers>
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+ <!--基础数据-->
|
|
|
+ <Grid Grid.Column="0" x:Name="propertyGrid" Margin="0,0,3,0" Width="550">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <!--导入导出-->
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
|
|
|
+ <btn:ButtonControl
|
|
|
+ Width="80"
|
|
|
+ Command="{Binding IncBasics}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Inc}"
|
|
|
+ Content="导入"
|
|
|
+ BorderThickness="1,0,0,0" />
|
|
|
+ <btn:ButtonControl
|
|
|
+ Width="80"
|
|
|
+ Command="{Binding ExpBasics}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Exp}"
|
|
|
+ Content="导出"
|
|
|
+ BorderThickness="1,0,0,0" />
|
|
|
+ </StackPanel>
|
|
|
+ <!--属性表格-->
|
|
|
+ <Grid Grid.Row="1" Panel.ZIndex="1">
|
|
|
+ <Grid.Resources>
|
|
|
+ <ResourceDictionary>
|
|
|
+ <Style TargetType="{x:Type Label}" >
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Left"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource DefaultComboBox}" >
|
|
|
+ <Setter Property="Height" Value="25"/>
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
+ <Setter Property="helpers:Style_ComboBox.CornerRadius" Value="{DynamicResource WindowCornerRadius}"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="{x:Type pt:TextBoxEx}" BasedOn="{StaticResource TextBoxStyle2}">
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}"/>
|
|
|
+
|
|
|
+ <Style TargetType="ContentControl" >
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="Expander">
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}"/>
|
|
|
+
|
|
|
+
|
|
|
+ <Style TargetType="GroupBox" BasedOn="{StaticResource GroupBoxTab}"/>
|
|
|
+
|
|
|
+
|
|
|
+ <DataTemplate x:Key="HeaderTemplate">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource ConfigBase}" Width="14" />
|
|
|
+ <TextBlock Text="{Binding}" FontSize="13" Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+
|
|
|
+ </ResourceDictionary>
|
|
|
+ </Grid.Resources>
|
|
|
+ <pt:PropertyGrid Margin="1,-4,1,0"
|
|
|
+SelectedObject="{Binding BasicsData}"
|
|
|
+TabVisibility="VisibleIfMoreThanOne"
|
|
|
+TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!--功能模块与信息-->
|
|
|
+ <Grid Grid.Column="1" >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <ToggleButton Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,8,0,0" ToolTip="基础数据[隐藏/显示]" Panel.ZIndex="3" IsChecked="{Binding BasicsData_ToggleButtonIsChecked}">
|
|
|
+ <ToggleButton.Template>
|
|
|
+ <ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
+ <Image x:Name="image" Source="{DynamicResource GoLeft_Two}" Stretch="Fill" Width="15" Height="15" />
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter Property="Source" TargetName="image" Value="{DynamicResource GoRight_Two}"/>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </ToggleButton.Template>
|
|
|
+ <ToggleButton.Triggers>
|
|
|
+ <EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <DoubleAnimation Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Width" From="0" To="550" Duration="0:0:0.7"/>
|
|
|
+ <ThicknessAnimationUsingKeyFrames Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Margin" BeginTime="00:00:00">
|
|
|
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0" />
|
|
|
+ <SplineThicknessKeyFrame KeyTime="00:00:0.7" Value="0,0,3,0" />
|
|
|
+ </ThicknessAnimationUsingKeyFrames>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ <EventTrigger RoutedEvent="ToggleButton.Checked">
|
|
|
+ <BeginStoryboard>
|
|
|
+ <Storyboard>
|
|
|
+ <DoubleAnimation Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Width" From="550" To="0" Duration="0:0:0.7"/>
|
|
|
+ <ThicknessAnimationUsingKeyFrames Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Margin" BeginTime="00:00:00">
|
|
|
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0,0,3,0" />
|
|
|
+ <SplineThicknessKeyFrame KeyTime="00:00:0.7" Value="0" />
|
|
|
+ </ThicknessAnimationUsingKeyFrames>
|
|
|
+ </Storyboard>
|
|
|
+ </BeginStoryboard>
|
|
|
+ </EventTrigger>
|
|
|
+ </ToggleButton.Triggers>
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+ <!--功能模块-->
|
|
|
+ <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0" Grid.Row="0">
|
|
|
+ <GroupBox.Header>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Grid Background="transparent">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Function}" Width="14" />
|
|
|
+ <TextBlock Text="功能" FontSize="13" Margin="0,0,10,0" Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </GroupBox.Header>
|
|
|
+ <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <!--Start / Stop-->
|
|
|
+ <Grid Grid.Row="0" Grid.Column="1" Margin="0,-40,0,0">
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
|
|
|
+ <btn:ButtonControl Grid.Column="5" Width="80" Command="{Binding Request}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
|
|
|
+ IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Request}"
|
|
|
+ Content="请求"/>
|
|
|
+
|
|
|
+ <btn:ButtonControl Grid.Column="6" Width="80" Command="{Binding AddNodes}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
|
|
|
+ IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Add}"
|
|
|
+ Content="添加"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <!--发送区域-->
|
|
|
+ <Grid Grid.Row="1" Grid.Column="1">
|
|
|
+ <Grid Margin="7">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <ComboBox Grid.ColumnSpan="2" Style="{StaticResource ComboBoxStyle}" Background="{DynamicResource WindowContentBackground}" VerticalAlignment="Center" Margin="0,0,0,10"
|
|
|
+ ItemsSource="{Binding ComboBoxData}"
|
|
|
+ DisplayMemberPath="Key"
|
|
|
+ SelectedItem="{Binding ComboBoxSelectedData}"
|
|
|
+ SelectedValue="Value"
|
|
|
+ helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+
|
|
|
+ <ComboBox Grid.Column="0" Grid.Row="1" Style="{StaticResource ComboBoxStyle}" Background="{DynamicResource WindowContentBackground}" VerticalAlignment="Center"
|
|
|
+ ItemsSource="{Binding ComboBoxServerName}"
|
|
|
+ DisplayMemberPath="Key"
|
|
|
+ SelectedItem="{Binding ComboBoxSelectedServerName}"
|
|
|
+ SelectedValue="Value"
|
|
|
+ helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+
|
|
|
+ <txt:TextBoxControl Grid.Column="0" Grid.Row="2" Margin="0,10,0,0" FontSize="13" HorizontalContentAlignment="Center" VerticalAlignment="Center" Text="{Binding DotAddress}"
|
|
|
+ SelectedColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource Address}"
|
|
|
+ HintColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ ShowIcon="True"
|
|
|
+ Hint="地址名"
|
|
|
+ CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+
|
|
|
+
|
|
|
+ <txt:TextBoxControl Grid.Column="1" Grid.Row="1" FontSize="13" Margin="10,0,0,0" HorizontalContentAlignment="Center" Text="{Binding GroupName}"
|
|
|
+ SelectedColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource GroupName}"
|
|
|
+ HintColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ ShowIcon="True"
|
|
|
+ Hint="组名"
|
|
|
+ CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+
|
|
|
+ <txt:TextBoxControl Grid.Column="1" Grid.Row="2" Margin="10,10,0,0" FontSize="13" HorizontalContentAlignment="Center" VerticalAlignment="Center" Text="{Binding WriteInData}"
|
|
|
+ SelectedColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+ BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+ Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+ Icon="{DynamicResource WriteIn}"
|
|
|
+ HintColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+ ShowIcon="True"
|
|
|
+ Hint="写入数据"
|
|
|
+ CornerRadius="{DynamicResource WindowCornerRadius}" />
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
|
|
|
+ </GroupBox>
|
|
|
+ <!--信息-->
|
|
|
+ <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0,5,0,0" Grid.Row="1">
|
|
|
+ <GroupBox.Header>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Info}" Width="14" />
|
|
|
+ <TextBlock Text="信息" FontSize="13" Margin="0,0,10,0" Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"/>
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </GroupBox.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" Margin="0,-40,0,0">
|
|
|
+ <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
|
|
+ <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}" Style="{StaticResource RadioButtonStyle}" Content="Hex" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
|
|
+ <btn:ButtonControl Width="80" Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
|
|
|
+IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
|
|
|
+BorderBrush="{DynamicResource Control.Border.Color}"
|
|
|
+IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
|
|
|
+Foreground="{DynamicResource Font.Content.Foreground}"
|
|
|
+Icon="{DynamicResource Clear}"
|
|
|
+Content="清空"/>
|
|
|
+ </StackPanel>
|
|
|
+ <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}" FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Text="{Binding Info}" >
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="TextChanged">
|
|
|
+ <mvvm:EventCommand Command="{Binding Info_TextChanged}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ </TextBox>
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
|
|
|
+
|
|
|
+ <!--节点浏览-->
|
|
|
+ <Grid Grid.Column="2" Width="0" x:Name="nodeBrowse">
|
|
|
+ <GroupBox Style="{StaticResource GroupBoxTab}" Margin="4,0,0,0">
|
|
|
+ <GroupBox.Header>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Grid Background="transparent">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Menu}" Width="14" />
|
|
|
+ <TextBlock Text="节点信息浏览" FontSize="13" Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </GroupBox.Header>
|
|
|
+ <DataGrid ColumnHeaderHeight="20" RowHeight="15" ItemsSource="{Binding NodeMessage}" Grid.Row="0" FontSize="13" SelectedItem="{Binding NodeMessageSelectedItem}" BorderThickness="0">
|
|
|
+ <!--右键菜单-->
|
|
|
+ <DataGrid.ContextMenu>
|
|
|
+ <ContextMenu VerticalContentAlignment="Center" FontSize="13">
|
|
|
+ <MenuItem Header="订阅所有地址" Foreground="{DynamicResource Font.Content.Foreground}">
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="Click">
|
|
|
+ <mvvm:EventCommand Command="{Binding ContextMenu_Subscribe}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Image Source="{DynamicResource Subscribe}" Width="15" Height="15" VerticalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ <MenuItem Header="取消订阅所有地址" Foreground="{DynamicResource Font.Content.Foreground}">
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="Click">
|
|
|
+ <mvvm:EventCommand Command="{Binding ContextMenu_UnSubscribe}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Image Source="{DynamicResource UnSubscribe}" Width="15" Height="15" VerticalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ </ContextMenu>
|
|
|
+ </DataGrid.ContextMenu>
|
|
|
+ <!--双击-->
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="SelectedCellsChanged">
|
|
|
+ <mvvm:EventCommand Command="{Binding DataGrid_SelectedCellsChanged}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTextColumn Header="序号" Width="50" Binding="{Binding Index}" />
|
|
|
+ <DataGridTextColumn Header="地址" Width="*" Binding="{Binding Address}" />
|
|
|
+ <DataGridTextColumn Header="值" Width="150" Binding="{Binding Value}" />
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </GroupBox>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+
|
|
|
+ <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
|
|
|
+
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+ </Border>
|
|
|
+</UserControl>
|