WinEquipmentMaintainRuleDetailAddOrEdit.xaml
3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<win:BaseWindow
x:Class="HHECS.WinClient.View.EquipmentInfo.WinEquipmentMaintainRuleDetailAddOrEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:win="clr-namespace:HHECS.WinCommon.Win;assembly=HHECS.WinCommon"
xmlns:local="clr-namespace:HHECS.WinClient.View.EquipmentInfo"
xmlns:valuerules="clr-namespace:HHECS.WinCommon.ValueRules;assembly=HHECS.WinCommon"
Title="{Binding Title}"
Height="230"
Width="400"
d:DataContext="{d:DesignInstance Type=local:EquipmentMaintainRuleDetailAddOrEditVM}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
mc:Ignorable="d">
<Window.Resources>
<Style x:Key="sp" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="20,10"/>
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Width" Value="270"/>
</Style>
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="Width" Value="270"/>
</Style>
</Window.Resources>
<Grid x:Name="GridMain">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Style="{StaticResource sp}">
<TextBlock Text="规则编码:"/>
<TextBox Text="{Binding EquipmentMaintainRule.Code}" Background="LightGray" IsReadOnly="True"/>
</StackPanel>
<StackPanel Grid.Row="1" Style="{StaticResource sp}">
<TextBlock Text="操作名称:"/>
<ComboBox ItemsSource="{Binding EquipmentMaintainOperations}" DisplayMemberPath="Key" SelectedValuePath="Value">
<ComboBox.SelectedValue>
<Binding Path="EquipmentMaintainRuleDetail.EquipmentMaintainOperationId">
<Binding.ValidationRules>
<valuerules:StringNotNullSpaceRule/>
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedValue>
</ComboBox>
</StackPanel>
<StackPanel Grid.Row="2" Style="{StaticResource sp}">
<TextBlock Text="时间表达式:"/>
<TextBox>
<TextBox.Text>
<Binding Path="EquipmentMaintainRuleDetail.Corn">
<Binding.ValidationRules>
<valuerules:StringNotNullSpaceRule/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" Style="{StaticResource sp}">
<Button x:Name="BtnClear" Content="清空" Click="BtnClear_Click" Visibility="{Binding Visibility}" Margin="0,0,10,0"/>
<Button x:Name="BtnSave" Content="保存" Click="BtnSave_Click" IsEnabled="{Binding Enable}" Margin="0,0,10,0"/>
<Button x:Name="BtnCancel" Content="取消" Click="BtnCancel_Click"/>
</StackPanel>
</Grid>
</win:BaseWindow>