|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <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="500"
- Height="500"
- 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="40" />
- <RowDefinition Height="25" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="130" />
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <!--<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">-->
- <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding ParName, StringFormat={}{0}:}" Grid.Column="0" HorizontalAlignment="Left"/>
- <TextBox Grid.Column="1"
- Height="40" Width="200" FontSize="24"
- BorderBrush="DeepSkyBlue"
- BorderThickness="1"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding ParValue}"
- Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityReverseConverter}}" />
- <ComboBox Grid.Column="1"
- Width="200"
- Height="40"
- BorderBrush="DeepSkyBlue"
- BorderThickness="1"
- DisplayMemberPath="Name"
- FontSize="24"
- 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 Grid.Column="2"
- Margin="5,0"
- HorizontalAlignment="Left"
- Style="{StaticResource TextBlockStyle}"
- Text="{Binding ParUnit}" />
- <!--</StackPanel>-->
- <TextBlock Grid.ColumnSpan="3"
- 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>
|