| | |
| | | xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI" |
| | | xmlns:pw="https://opensource.panuon.com/wpf" |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:dp="clr-namespace:HMI.UI;assembly=HMI.UI" |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | Background="{StaticResource WorkspaceBackground}" |
| | | Loaded="PluginControl_Loaded" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <pu:StyleDictionary Includes="TreeView" /> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | |
| | | <uic:PathImageConverter x:Key="path2Image"/> |
| | | <uic:DataGridRowNumberConverter x:Key="rowNumber"/> |
| | | </ResourceDictionary> |
| | | </UserControl.Resources> |
| | | <Border Style="{StaticResource CardBoarder}"> |
| | | <Grid dp:GridHelper.Space="10"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | |
| | | <Grid> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="7*"/> |
| | | <ColumnDefinition Width="3*"/> |
| | | </Grid.ColumnDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="7*"/> |
| | | <ColumnDefinition Width="3*"/> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <Border Style="{StaticResource CardBoarder}" Margin="0,0,2,0"> |
| | | <StackPanel> |
| | | <DockPanel Margin="0,0,0,10"> |
| | | <Button DockPanel.Dock="Right" pu:ButtonHelper.Icon="" Style="{StaticResource DangerButton}">删除</Button> |
| | | <Button DockPanel.Dock="Right" Style="{StaticResource PrimaryButton}" |
| | | pu:IconHelper.FontFamily="{StaticResource iconfont}" |
| | | pu:ButtonHelper.Icon="" Margin="0,0,10,0" x:Name="refreshBtn" Click="Button_Click">刷新</Button> |
| | | <Button DockPanel.Dock="Right" Style="{StaticResource PrimaryButton}" |
| | | pu:IconHelper.FontFamily="{StaticResource iconfont}" |
| | | pu:ButtonHelper.Icon="" Margin="0,0,10,0" x:Name="addBtn" Click="Button_Click">新增</Button> |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="菜单列表"/> |
| | | </DockPanel> |
| | | <DockPanel Grid.ColumnSpan="2"> |
| | | <StackPanel DockPanel.Dock="Right" Style="{StaticResource ButtonGroup}"> |
| | | <Button Style="{StaticResource AddBtn}" x:Name="addBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource EditBtn}" x:Name="editBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource RfhBtn}" x:Name="rfhBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource DelBtn}" x:Name="delBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | <TextBlock Style="{StaticResource TitleBox}" Text="{DynamicResource Dv.Title}"/> |
| | | </DockPanel> |
| | | |
| | | <DataGrid Grid.Column="1" x:Name="table" Style="{StaticResource DefaultDataGrid}" ItemsSource="{Binding DataSource}"> |
| | | <!--<Grid> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition/> |
| | | </Grid.ColumnDefinitions> |
| | | </Grid>--> |
| | | <StackPanel Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Style="{StaticResource ButtonGroup}"> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="{StaticResource ContentFontSize2}" |
| | | Text="{DynamicResource Dv.SelectItem}"/> |
| | | <ComboBox x:Name="programInput" |
| | | MinWidth="180" |
| | | SelectionChanged="programInput_SelectionChanged"/> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="{StaticResource ContentFontSize2}" |
| | | Text="{DynamicResource App.StartTime}"/> |
| | | <pu:DateTimePicker Style="{StaticResource TimePicker}" SelectedDateTime="{x:Null}" x:Name="startTimeInput"/> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="{StaticResource ContentFontSize2}" |
| | | Text="{DynamicResource App.EndTime}"/> |
| | | <pu:DateTimePicker Style="{StaticResource TimePicker}" SelectedDateTime="{x:Null}" x:Name="endTimeInput"/> |
| | | |
| | | |
| | | <Button Style="{StaticResource QueryBtn}" |
| | | x:Name="srhBtn" Click="Button_Click"/> |
| | | |
| | | <Button Style="{StaticResource ResetBtn}" |
| | | x:Name="resetBtn" Click="Button_Click"/> |
| | | |
| | | <Button Style="{StaticResource ExportBtn}" |
| | | x:Name="exportBtn" Click="Button_Click"/> |
| | | |
| | | <!--<Menu x:Name="anyBtn" Style="{StaticResource CommonMenu}"> |
| | | <MenuItem Header="分析"> |
| | | <MenuItem Header="CPK" Click="MenuItem_Click"/> |
| | | <MenuItem Header="RandR" /> |
| | | </MenuItem> |
| | | </Menu>--> |
| | | |
| | | </StackPanel> |
| | | |
| | | <DockPanel Grid.Row="2" Grid.ColumnSpan="2" Margin="0,10,0,0"> |
| | | <pu:Drawer DockPanel.Dock="Left" x:Name="DrwMenu" MinWidth="35" MaxWidth="400" |
| | | Padding="0" |
| | | ShadowColor="{x:Null}" |
| | | AnimationDuration="0" BorderThickness="2,0,0,2" BorderBrush="{StaticResource CommonBoarder}"> |
| | | <Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition Width="Auto"/> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <Border Grid.ColumnSpan="2" BorderThickness="2" BorderBrush="{StaticResource CommonBoarder}" Background="{StaticResource VerBar}"> |
| | | <DockPanel Height="35"> |
| | | <ToggleButton x:Name="drawerBtn" BorderThickness="0" |
| | | DockPanel.Dock="Right" |
| | | Background="Transparent" |
| | | Width="35" Height="35" HorizontalAlignment="Right" |
| | | RenderTransformOrigin="0.5,0.5" |
| | | Foreground="{StaticResource PrimaryColorContract}" |
| | | FontFamily="{StaticResource iconfont}" |
| | | Content="" IsChecked="{Binding IsOpen, ElementName=DrwMenu, Mode=TwoWay}"> |
| | | <ToggleButton.Style> |
| | | <Style TargetType="ToggleButton" BasedOn="{StaticResource CommonToggle}"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="False"> |
| | | <Setter Property="RenderTransform"> |
| | | <Setter.Value> |
| | | <RotateTransform Angle="-90"/> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="True"> |
| | | <Setter Property="Background" Value="Red"/> |
| | | <Setter Property="RenderTransform"> |
| | | <Setter.Value> |
| | | <RotateTransform Angle="90"/> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </DataTrigger> |
| | | <Trigger Property="IsChecked" Value="True"> |
| | | <Setter Property="Background" Value="Red"/> |
| | | </Trigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </ToggleButton.Style> |
| | | </ToggleButton> |
| | | |
| | | <TextBlock Text="{DynamicResource Dv.Advanced}" FontSize="16" |
| | | Foreground="{StaticResource PrimaryColorContract}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Center"/> |
| | | </DockPanel> |
| | | </Border> |
| | | |
| | | |
| | | <Grid Grid.Row="1"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition/> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <!--<DockPanel Margin="10,10,10,0" Grid.ColumnSpan="2"> |
| | | <Label Content="{DynamicResource Dv.SelectItem}"/> |
| | | <ComboBox Grid.Column="1" x:Name="programInput" SelectionChanged="programInput_SelectionChanged"/> |
| | | </DockPanel>--> |
| | | |
| | | <DataGrid Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource DefaultDataGrid}" |
| | | IsReadOnly="False" |
| | | SelectionMode="Single" |
| | | BorderThickness="0" |
| | | ItemsSource="{Binding Datas}"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="#" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding Key}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Dv.Field}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTemplateColumn Width="*"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource Dv.Condition}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Condition}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | <DataGridTemplateColumn.CellEditingTemplate> |
| | | <DataTemplate> |
| | | <ComboBox SelectedValue="{Binding Condition}" |
| | | SelectedValuePath="Content" > |
| | | <ComboBoxItem Content="="/> |
| | | <ComboBoxItem Content="<"/> |
| | | <ComboBoxItem Content=">"/> |
| | | <ComboBoxItem Content="<="/> |
| | | <ComboBoxItem Content=">="/> |
| | | </ComboBox> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellEditingTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn Width="*" Binding="{Binding Value}" > |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Dv.Value}"/> |
| | | </DataGridTextColumn.Header> |
| | | <DataGridTextColumn.HeaderTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <TextBlock Text="*" Foreground="Red" /> |
| | | <ContentControl Content="{Binding }"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTextColumn.HeaderTemplate> |
| | | </DataGridTextColumn> |
| | | </DataGrid.Columns> |
| | | |
| | | </DataGrid> |
| | | </Grid> |
| | | |
| | | <Label Grid.Row="1" Grid.Column="1" Width="100" Height="34" |
| | | VerticalContentAlignment="Center" |
| | | HorizontalContentAlignment="Center" |
| | | Content="{DynamicResource Dv.Advanced}" |
| | | FontSize="16"> |
| | | <Label.LayoutTransform> |
| | | <RotateTransform CenterX="25" CenterY="25" Angle="270"/> |
| | | </Label.LayoutTransform> |
| | | |
| | | <Label.Style> |
| | | <Style TargetType="Label"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu,Mode=OneWay}" Value="True"> |
| | | <Setter Property="Visibility" Value="Collapsed"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="False"> |
| | | <Setter Property="Visibility" Value="Visible"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Label.Style> |
| | | </Label> |
| | | </Grid> |
| | | </pu:Drawer> |
| | | |
| | | <DataGrid BorderThickness="2" BorderBrush="{StaticResource CommonBoarder}" x:Name="dataTable" |
| | | Style="{StaticResource DefaultDataGrid}" |
| | | SelectionUnit="CellOrRowHeader" |
| | | SelectionMode="Extended" |
| | | pu:DataGridHelper.CellSelectedBackground="{StaticResource PrimaryColor}" |
| | | PreviewMouseLeftButtonDown="dataTable_PreviewMouseLeftButtonDown"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" IsChecked="{Binding Selected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTemplateColumn Header="#" CanUserResize="False"> |
| | | <DataGridTemplateColumn Header="#" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTextColumn Binding="{Binding Code}" Header="菜单编号" /> |
| | | <DataGridTextColumn Binding="{Binding Name}" Header="菜单名称" /> |
| | | <DataGridTextColumn Binding="{Binding Level}" Header="等级" /> |
| | | <DataGridTextColumn Binding="{Binding Type}" Header="类型" /> |
| | | <DataGridTextColumn Binding="{Binding Name}" Header="菜单名称" /> |
| | | <DataGridTextColumn Binding="{Binding ParentCode}" Header="父菜单编号" /> |
| | | <DataGridTextColumn Binding="{Binding ParentName}" Header="父菜单名称" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding DllPath}" Header="Dll路径" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding ClassName}" Header="类名" /> |
| | | <DataGridTemplateColumn Header="操作" Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Button x:Name="editBtn" Style="{StaticResource LinkButton}" |
| | | Margin="0,0,10,0" |
| | | Click="Button_Click" |
| | | DataContext="{Binding }">编辑</Button> |
| | | <Button x:Name="delBtn" Style="{StaticResource DangerLinkButton}" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click">删除</Button> |
| | | </StackPanel> |
| | | |
| | | <DataTemplate.Triggers> |
| | | <DataTrigger Binding="{Binding Path=IsMouseOver, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | Value="True"> |
| | | <Setter TargetName="editBtn" Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Path=IsSelected, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | Value="True"> |
| | | <Setter TargetName="editBtn" Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </StackPanel> |
| | | </Border> |
| | | |
| | | <Border Grid.Column="1" Style="{StaticResource CardBoarder}" Margin="2,0,0,0"> |
| | | <StackPanel> |
| | | <DockPanel Margin="0,0,0,10" > |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="菜单结构"/> |
| | | </DockPanel> |
| | | |
| | | <TreeView x:Name="treeViewer" Style="{StaticResource DefaultTreeView}" ItemsSource="{Binding TreeDataSource}"> |
| | | <TreeView.ItemTemplate> |
| | | <HierarchicalDataTemplate ItemsSource="{Binding Children}"> |
| | | <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> |
| | | <Image Width="{StaticResource ContentFontSize}" Height="{StaticResource ContentFontSize}" Margin="5" |
| | | Source="{Binding IconPath,Converter={StaticResource path2Image},Mode=OneWay}"/> |
| | | <TextBlock VerticalAlignment="Center" FontSize="{StaticResource ContentFontSize}" Text="{Binding Name}"/> |
| | | </StackPanel> |
| | | </HierarchicalDataTemplate> |
| | | </TreeView.ItemTemplate> |
| | | </TreeView> |
| | | </StackPanel> |
| | | </Border> |
| | | </Grid> |
| | | </DockPanel> |
| | | </Grid> |
| | | </Border> |
| | | </hb:PluginControl> |