| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- <UserControl
- x:Class="SHJX.Service.Librarys.setting.OtherControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SHJX.Service.Librarys.setting"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
- x:Name="otherSetting"
- d:DesignHeight="800"
- d:DesignWidth="800"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/Panuon.UI.Silver;component/Control.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <!--#region 下面这段代码不用,不能变成Uniform的样式-->
- <Style x:Key="ItemContainerStyle" TargetType="{x:Type ListViewItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <Border
- x:Name="Bd"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter TargetName="Bd" Property="Background" Value="Transparent" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- endregion -->
- <!--#region 速度控件DataTemplate-->
- <DataTemplate x:Key="SpeedTemplate">
- <Viewbox Margin="3,0">
- <Grid>
- <GroupBox
- Name="gb_speed"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:GroupBoxHelper.CornerRadius="8"
- pu:GroupBoxHelper.IsSplitLineVisible="True"
- pu:GroupBoxHelper.ShadowColor="#66CCCC"
- BorderBrush="#99CCCC"
- FontSize="12"
- Foreground="#99CCCC"
- Header="{Binding Description}"
- Tag="{Binding NodeId}">
- <UniformGrid Columns="1" Rows="4">
- <StackPanel
- Margin="0,2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="5,0"
- VerticalAlignment="Center"
- Text="速 度:" />
- <TextBox
- x:Name="txt_speed"
- Width="60"
- Height="25"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:TextBoxHelper.CornerRadius="10"
- pu:TextBoxHelper.FocusedBorderBrush="#99CCCC"
- pu:TextBoxHelper.FocusedShadowColor="#99CCCC"
- BorderBrush="#99CCCC"
- Cursor="IBeam"
- Foreground="#99CCCC"
- Text="{Binding Speed, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel
- Margin="0,2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="5,0"
- VerticalAlignment="Center"
- Text="加速度:" />
- <TextBox
- x:Name="txt_acspeed"
- Width="60"
- Height="25"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:TextBoxHelper.CornerRadius="10"
- pu:TextBoxHelper.FocusedBorderBrush="#99CCCC"
- pu:TextBoxHelper.FocusedShadowColor="#99CCCC"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Text="{Binding AcSpeed, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel
- Margin="0,2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="5,0"
- VerticalAlignment="Center"
- Text="减速度:" />
- <TextBox
- x:Name="txt_despeed"
- Width="60"
- Height="25"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:TextBoxHelper.CornerRadius="10"
- pu:TextBoxHelper.FocusedBorderBrush="#99CCCC"
- pu:TextBoxHelper.FocusedShadowColor="#99CCCC"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Text="{Binding DeSpeed, Mode=TwoWay}" />
- </StackPanel>
- <Button
- Name="btn_speedsetting"
- Width="50"
- Height="25"
- Margin="5,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- pu:ButtonHelper.CornerRadius="10"
- pu:ButtonHelper.HoverBrush="#66CCCC"
- Background="#99CCCC"
- Command="{Binding ElementName=otherSetting, Path=DataContext.SettingSpeedCommand}"
- Content="更新"
- Cursor="Hand"
- Foreground="White">
- <Button.CommandParameter>
- <Binding ElementName="gb_speed" Path="Tag" />
- </Button.CommandParameter>
- </Button>
- </UniformGrid>
- </GroupBox>
- </Grid>
- </Viewbox>
- </DataTemplate>
- <!--#endregion-->
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition Height="1.5*"/>
- <RowDefinition Height="6.2*" />
- </Grid.RowDefinitions>
- <Grid
- Grid.Row="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <GroupBox
- Grid.Row="3"
- Width="700"
- Height="80"
- Margin="0,5,0,5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:GroupBoxHelper.CornerRadius="8"
- pu:GroupBoxHelper.IsSplitLineVisible="True"
- pu:GroupBoxHelper.ShadowColor="#66CCCC"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Header="模板路径">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Height="30"
- MinWidth="0"
- Margin="0,10,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- Foreground="#99CCCC"
- Text="{Binding TemplateFilePath}" />
- <Button
- Width="80"
- Height="25"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:ButtonHelper.CornerRadius="8"
- pu:ButtonHelper.HoverBrush="#66CCCC"
- Background="#99CCCC"
- Command="{Binding OptTemplatePathCommand}"
- Content="选择目录"
- Cursor="Hand"
- FontFamily="{StaticResource FontAwesome}"
- Foreground="White" />
- </StackPanel>
- </GroupBox>
- </Grid>
- <Grid
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <GroupBox
- Grid.Row="3"
- Width="700"
- Height="105"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:GroupBoxHelper.CornerRadius="8"
- pu:GroupBoxHelper.IsSplitLineVisible="True"
- pu:GroupBoxHelper.ShadowColor="#66CCCC"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Header="导出结果存放路径">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <RadioButton
- pu:RadioButtonHelper.CheckedBackground="#6452A4"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Content="Excel"
- GroupName="exportType"
- IsChecked="{Binding ExportTypeByExcel}" />
- <RadioButton
- Margin="10,0,0,0"
- pu:RadioButtonHelper.CheckedBackground="#6452A4"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Content="Word"
- GroupName="exportType"
- IsChecked="{Binding ExportTypeByWord}" />
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Horizontal">
- <TextBlock
- Height="30"
- MinWidth="0"
- Margin="0,10,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- Foreground="#99CCCC"
- Text="{Binding SampleResultFilePath}" />
- <Button
- Width="80"
- Height="25"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:ButtonHelper.CornerRadius="8"
- pu:ButtonHelper.HoverBrush="#66CCCC"
- Background="#99CCCC"
- Command="{Binding OptSampleResultPathCommand}"
- Content="选择目录"
- Cursor="Hand"
- FontFamily="{StaticResource FontAwesome}"
- Foreground="White" />
- </StackPanel>
- </Grid>
- </GroupBox>
- </Grid>
- <Grid
- Grid.Row="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <GroupBox
- Grid.Row="3"
- Width="700"
- Height="460"
- Margin="0,5,0,5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- pu:GroupBoxHelper.CornerRadius="8"
- pu:GroupBoxHelper.IsSplitLineVisible="True"
- pu:GroupBoxHelper.ShadowColor="#66CCCC"
- BorderBrush="#99CCCC"
- Foreground="#99CCCC"
- Header="速度设置">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="1*" />
- <RowDefinition Height="8*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="0"
- Margin="5,0"
- VerticalAlignment="Center"
- Background="#99CCCC">
- <CheckBox
- Height="30"
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- pu:CheckBoxHelper.BoxHeight="16"
- pu:CheckBoxHelper.BoxWidth="24"
- pu:CheckBoxHelper.CheckBoxStyle="Switch"
- pu:CheckBoxHelper.CheckedBackground="#99CCCC"
- BorderBrush="White"
- Content="连接成功后自动设置速度"
- Cursor="Hand"
- FontSize="14"
- Foreground="White"
- IsChecked="{Binding AutoWriteSpeed}" />
- </StackPanel>
- <ListView
- Grid.Row="1"
- Width="680"
- Background="Transparent"
- BorderBrush="Transparent"
- ItemContainerStyle="{StaticResource ItemContainerStyle}"
- ItemTemplate="{StaticResource ResourceKey=SpeedTemplate}"
- ItemsSource="{Binding SpeedInfos}">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="5" Rows="2" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- </ListView>
- </Grid>
- </GroupBox>
- </Grid>
- </Grid>
- </UserControl>
|