终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

164 regels
7.4 KiB

  1. <Window
  2. x:Class="BPASmartClient.MorkCL.View.EditFunctionParamView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:Behavior="http://schemas.microsoft.com/xaml/behaviors"
  6. xmlns:converter="clr-namespace:BPASmartClient.MorkCL.Converter"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
  10. Title="EditFunctionView"
  11. Width="500"
  12. Height="500"
  13. AllowsTransparency="True"
  14. Background="{x:Null}"
  15. Topmost="True"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.DataContext>
  20. <vm:EditFunctionParamViewModel />
  21. </Window.DataContext>
  22. <Window.Resources>
  23. <ResourceDictionary>
  24. <ResourceDictionary.MergedDictionaries>
  25. <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
  26. </ResourceDictionary.MergedDictionaries>
  27. <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" />
  28. <converter:Bool2VisibilityReverseConverter x:Key="Bool2VisibilityReverseConverter" />
  29. <DataTemplate x:Key="IntTemplate">
  30. <TextBlock Text="{Binding}" />
  31. </DataTemplate>
  32. <DataTemplate x:Key="ClassTemplate">
  33. <TextBlock Text="{Binding Name}" />
  34. </DataTemplate>
  35. </ResourceDictionary>
  36. </Window.Resources>
  37. <Border
  38. Name="br"
  39. BorderBrush="#0CADF5"
  40. BorderThickness="0">
  41. <Border.Background>
  42. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/biankuang_.png" />
  43. </Border.Background>
  44. <Grid>
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="50" />
  47. <RowDefinition Height="50" />
  48. <RowDefinition Height="1*" />
  49. <RowDefinition Height="50" />
  50. </Grid.RowDefinitions>
  51. <!--#region 标题栏-->
  52. <TextBlock
  53. HorizontalAlignment="Center"
  54. VerticalAlignment="Center"
  55. Foreground="DeepSkyBlue"
  56. Text="配方功能参数编辑" />
  57. <!--#endregion-->
  58. <!--#region 操作栏-->
  59. <Border
  60. Grid.Row="1"
  61. BorderBrush="#3099E5"
  62. BorderThickness="1">
  63. <TextBlock
  64. HorizontalAlignment="Center"
  65. FontSize="18"
  66. Foreground="DeepSkyBlue"
  67. Text="{Binding FuncName, StringFormat={}{0} 参数设置}" />
  68. </Border>
  69. <!--#endregion-->
  70. <!--#region 内容-->
  71. <ListView
  72. Grid.Row="2"
  73. Margin="5"
  74. Background="Transparent"
  75. ItemsSource="{Binding FuncPars}">
  76. <ListView.ItemTemplate>
  77. <DataTemplate>
  78. <Grid>
  79. <Grid.RowDefinitions>
  80. <RowDefinition Height="40" />
  81. <RowDefinition Height="25" />
  82. </Grid.RowDefinitions>
  83. <Grid.ColumnDefinitions>
  84. <ColumnDefinition Width="130" />
  85. <ColumnDefinition Width="1*" />
  86. <ColumnDefinition Width="auto" />
  87. </Grid.ColumnDefinitions>
  88. <!--<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">-->
  89. <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding ParName, StringFormat={}{0}:}" Grid.Column="0" HorizontalAlignment="Left"/>
  90. <TextBox Grid.Column="1"
  91. Height="40" Width="200" FontSize="24"
  92. BorderBrush="DeepSkyBlue"
  93. BorderThickness="1"
  94. Style="{StaticResource InputTextboxStyle}"
  95. Text="{Binding ParValue}"
  96. Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityReverseConverter}}" />
  97. <ComboBox Grid.Column="1"
  98. Width="200"
  99. Height="40"
  100. BorderBrush="DeepSkyBlue"
  101. BorderThickness="1"
  102. DisplayMemberPath="Name"
  103. FontSize="24"
  104. IsEditable="False" ScrollViewer.VerticalScrollBarVisibility="Auto"
  105. ItemsSource="{Binding ComboBoxItemsSource}"
  106. Text="{Binding ParValue}"
  107. Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityConverter}}">
  108. <!--<ComboBox.Resources>
  109. <converter:MyDataTemplateSelector
  110. x:Key="TemplateSelector"
  111. ClassTemplate="{StaticResource ClassTemplate}"
  112. IntTemplate="{StaticResource IntTemplate}" />
  113. </ComboBox.Resources>
  114. <ComboBox.ItemTemplateSelector>
  115. <StaticResource ResourceKey="TemplateSelector" />
  116. </ComboBox.ItemTemplateSelector>-->
  117. </ComboBox>
  118. <TextBlock Grid.Column="2"
  119. Margin="5,0"
  120. HorizontalAlignment="Left"
  121. Style="{StaticResource TextBlockStyle}"
  122. Text="{Binding ParUnit}" />
  123. <!--</StackPanel>-->
  124. <TextBlock Grid.ColumnSpan="3"
  125. Grid.Row="1"
  126. HorizontalAlignment="Left"
  127. FontSize="12"
  128. Foreground="#7DC3D5"
  129. Style="{StaticResource TextBlockStyle}"
  130. Text="{Binding ParDescribe, StringFormat=备注:{0}}" />
  131. </Grid>
  132. </DataTemplate>
  133. </ListView.ItemTemplate>
  134. </ListView>
  135. <!--#endregion-->
  136. <!--#region 底部按钮栏-->
  137. <Grid Grid.Row="3">
  138. <Button
  139. Width="100"
  140. Height="35"
  141. Margin="50,0"
  142. HorizontalAlignment="Left"
  143. Command="{Binding SaveParamCommand}"
  144. Content="保存参数" />
  145. <Button
  146. Width="100"
  147. Height="35"
  148. Margin="50,0"
  149. HorizontalAlignment="Right"
  150. Click="Button_Click"
  151. Content="取消并关闭" />
  152. </Grid>
  153. <!--#endregion-->
  154. </Grid>
  155. </Border>
  156. </Window>