|
- <Window
- x:Class="BPASmartClient.MorkCL.View.EditFunctionParamView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Behavior="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:converter="clr-namespace:BPASmartClient.MorkCL.Converter"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
- Title="EditFunctionView"
- Width="450"
- Height="350"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
- <Window.DataContext>
- <vm:EditFunctionParamViewModel />
- </Window.DataContext>
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" />
- <converter:Bool2VisibilityReverseConverter x:Key="Bool2VisibilityReverseConverter" />
- <DataTemplate x:Key="IntTemplate">
- <TextBlock Text="{Binding}" />
- </DataTemplate>
- <DataTemplate x:Key="ClassTemplate">
- <TextBlock Text="{Binding Name}" />
- </DataTemplate>
- </ResourceDictionary>
- </Window.Resources>
- <Border
- Name="br"
- BorderBrush="#0CADF5"
- BorderThickness="0">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/biankuang_.png" />
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="50" />
- <RowDefinition Height="1*" />
- <RowDefinition Height="50" />
- </Grid.RowDefinitions>
- <!--#region 标题栏-->
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="DeepSkyBlue"
- Text="配方功能参数编辑" />
- <!--#endregion-->
-
- <!--#region 操作栏-->
- <Border
- Grid.Row="1"
- BorderBrush="#3099E5"
- BorderThickness="1">
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="18"
- Foreground="DeepSkyBlue"
- Text="{Binding FuncName, StringFormat={}{0} 参数设置}" />
- </Border>
- <!--#endregion-->
-
- <!--#region 内容-->
- <ListView
- Grid.Row="2"
- Margin="5"
- Background="Transparent"
- ItemsSource="{Binding FuncPars}">
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="25" />
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding ParName, StringFormat={}{0}:}" />
- <TextBox
- Height="30"
- BorderBrush="DeepSkyBlue"
- BorderThickness="1"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding ParValue}"
- Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityReverseConverter}}" />
- <ComboBox
- Width="155"
- Height="30"
- BorderBrush="DeepSkyBlue"
- BorderThickness="1"
- DisplayMemberPath="Name"
- FontSize="18"
- IsEditable="False" ScrollViewer.VerticalScrollBarVisibility="Auto"
- ItemsSource="{Binding ComboBoxItemsSource}"
- Text="{Binding ParValue}"
- Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityConverter}}">
- <!--<ComboBox.Resources>
- <converter:MyDataTemplateSelector
- x:Key="TemplateSelector"
- ClassTemplate="{StaticResource ClassTemplate}"
- IntTemplate="{StaticResource IntTemplate}" />
-
- </ComboBox.Resources>
- <ComboBox.ItemTemplateSelector>
- <StaticResource ResourceKey="TemplateSelector" />
- </ComboBox.ItemTemplateSelector>-->
-
- </ComboBox>
- <TextBlock
- Margin="5,0"
- HorizontalAlignment="Left"
- Style="{StaticResource TextBlockStyle}"
- Text="{Binding ParUnit}" />
- </StackPanel>
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Left"
- FontSize="12"
- Foreground="#7DC3D5"
- Style="{StaticResource TextBlockStyle}"
- Text="{Binding ParDescribe, StringFormat=备注:{0}}" />
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- <!--#endregion-->
-
- <!--#region 底部按钮栏-->
- <Grid Grid.Row="3">
- <Button
- Width="100"
- Height="35"
- Margin="50,0"
- HorizontalAlignment="Left"
- Command="{Binding SaveParamCommand}"
- Content="保存参数" />
-
- <Button
- Width="100"
- Height="35"
- Margin="50,0"
- HorizontalAlignment="Right"
- Click="Button_Click"
- Content="取消并关闭" />
- </Grid>
-
- <!--#endregion-->
- </Grid>
- </Border>
- </Window>
|