终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

159 rindas
7.0 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="450"
  12. Height="350"
  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="30" />
  81. <RowDefinition Height="25" />
  82. </Grid.RowDefinitions>
  83. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  84. <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding ParName, StringFormat={}{0}:}" />
  85. <TextBox
  86. Height="30"
  87. BorderBrush="DeepSkyBlue"
  88. BorderThickness="1"
  89. Style="{StaticResource InputTextboxStyle}"
  90. Text="{Binding ParValue}"
  91. Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityReverseConverter}}" />
  92. <ComboBox
  93. Width="155"
  94. Height="30"
  95. BorderBrush="DeepSkyBlue"
  96. BorderThickness="1"
  97. DisplayMemberPath="Name"
  98. FontSize="18"
  99. IsEditable="False" ScrollViewer.VerticalScrollBarVisibility="Auto"
  100. ItemsSource="{Binding ComboBoxItemsSource}"
  101. Text="{Binding ParValue}"
  102. Visibility="{Binding IsUseComboBox, Converter={StaticResource Bool2VisibilityConverter}}">
  103. <!--<ComboBox.Resources>
  104. <converter:MyDataTemplateSelector
  105. x:Key="TemplateSelector"
  106. ClassTemplate="{StaticResource ClassTemplate}"
  107. IntTemplate="{StaticResource IntTemplate}" />
  108. </ComboBox.Resources>
  109. <ComboBox.ItemTemplateSelector>
  110. <StaticResource ResourceKey="TemplateSelector" />
  111. </ComboBox.ItemTemplateSelector>-->
  112. </ComboBox>
  113. <TextBlock
  114. Margin="5,0"
  115. HorizontalAlignment="Left"
  116. Style="{StaticResource TextBlockStyle}"
  117. Text="{Binding ParUnit}" />
  118. </StackPanel>
  119. <TextBlock
  120. Grid.Row="1"
  121. HorizontalAlignment="Left"
  122. FontSize="12"
  123. Foreground="#7DC3D5"
  124. Style="{StaticResource TextBlockStyle}"
  125. Text="{Binding ParDescribe, StringFormat=备注:{0}}" />
  126. </Grid>
  127. </DataTemplate>
  128. </ListView.ItemTemplate>
  129. </ListView>
  130. <!--#endregion-->
  131. <!--#region 底部按钮栏-->
  132. <Grid Grid.Row="3">
  133. <Button
  134. Width="100"
  135. Height="35"
  136. Margin="50,0"
  137. HorizontalAlignment="Left"
  138. Command="{Binding SaveParamCommand}"
  139. Content="保存参数" />
  140. <Button
  141. Width="100"
  142. Height="35"
  143. Margin="50,0"
  144. HorizontalAlignment="Right"
  145. Click="Button_Click"
  146. Content="取消并关闭" />
  147. </Grid>
  148. <!--#endregion-->
  149. </Grid>
  150. </Border>
  151. </Window>