You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
8.5 KiB
XML

<UserControl x:Class="Admin.Core.Wpf.View.FaultAppPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mu="clr-namespace:Admin.Core.Wpf.ConvertTo"
mc:Ignorable="d"
Background="#F0F7FF"
MinHeight="600" MinWidth="980" Height="665" Width="1100">
<UserControl.Resources>
<mu:MultiFaultAppConverter x:Key="multiFaultAppConverter"></mu:MultiFaultAppConverter>
</UserControl.Resources>
<materialDesign:DialogHost>
<materialDesign:DrawerHost>
<StackPanel Margin="0 20 0 0" VerticalAlignment="Top" HorizontalAlignment="Center">
<Grid x:Name="FieldsLineUpGrid"
HorizontalAlignment="Center"
TextElement.FontSize="{Binding Value, ElementName=FontSizeSlider}">
<Grid.Resources>
<Style x:Key="StyleHeader"
TargetType="TextBlock"
BasedOn="{StaticResource MaterialDesignCaptionTextBlock}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="10,0" />
<Setter Property="Opacity" Value="0.56" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="FieldHeader"
TargetType="TextBlock"
BasedOn="{StaticResource MaterialDesignCaptionTextBlock}">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,6" />
<Setter Property="Opacity" Value="0.56" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style x:Key="NotAvailable"
TargetType="TextBlock"
BasedOn="{StaticResource MaterialDesignCaptionTextBlock}">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Opacity" Value="0.24" />
<Setter Property="Text" Value="N/A" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="3*" />
<RowDefinition Height="3*" />
<RowDefinition Height="3*" />
<RowDefinition Height="3*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition MinWidth="100" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="设备编码:" />
<TextBox Grid.Row="0" x:Name="No" Grid.Column="1" Style="{x:Null}" Width="200" IsReadOnly="True" Text="{Binding No}" />
<TextBlock Grid.Row="1"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="设备名称:" />
<ComboBox
Grid.Row="1"
x:Name="Name"
Grid.Column="1"
Style="{x:Null}"
Width="200"
SelectedItem="{Binding SelectedEquipment}"
ItemsSource="{Binding EquipmentList,Mode=TwoWay}"
SelectedIndex="0"
SelectedValuePath="ID"
DisplayMemberPath="Name"
>
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem" >
<Setter Property="IsEnabled" Value="True" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<TextBlock Grid.Row="2"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="设备类型:" />
<TextBox Grid.Row="2" x:Name="EquipmentType" Grid.Column="1" Style="{x:Null}" Width="200" IsReadOnly="True" Text="{Binding EquipmentType}"/>
<TextBlock Grid.Row="3"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="设备位置:" />
<TextBox Grid.Row="3" x:Name="Address" Grid.Column="1" Style="{x:Null}" Width="200" />
<TextBlock Grid.Row="4"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="故障发生时间:" />
<DatePicker Grid.Row="4" x:Name="TimeOfOccurrence" Grid.Column="1" Style="{x:Null}" Width="200" />
<TextBlock Grid.Row="5"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="报修人:" />
<TextBox Grid.Row="5" x:Name="RepairApplicant" Grid.Column="1" Style="{x:Null}" Width="200" />
<TextBlock Grid.Row="6"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="报修人手机:" />
<TextBox Grid.Row="6" x:Name="Phone" Grid.Column="1" Style="{x:Null}" Width="200" />
<TextBlock Grid.Row="7"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="故障描述:" />
<TextBox Grid.Row="7" x:Name="Description" Grid.Column="1" Style="{x:Null}" Width="200" Height="100" TextWrapping ="Wrap"
VerticalScrollBarVisibility="Auto" />
<TextBlock Grid.Row="8"
Grid.Column="0"
Style="{StaticResource StyleHeader}"
Text="" />
<Button Grid.Row="8"
Grid.Column="1"
Margin="0 5"
Content="提交申请"
x:Name="btnSave"
Command="{Binding Path=SaveToData}"
Style="{StaticResource MaterialDesignRaisedButton}" >
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource multiFaultAppConverter}">
<Binding ElementName="Name" Path="Text"/>
<Binding ElementName="No" Path="Text"/>
<Binding ElementName="EquipmentType" Path="Text"/>
<Binding ElementName="Address" Path="Text"/>
<Binding ElementName="TimeOfOccurrence" Path="Text"/>
<Binding ElementName="RepairApplicant" Path="Text"/>
<Binding ElementName="Phone" Path="Text"/>
<Binding ElementName="Description" Path="Text"/>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
</StackPanel>
</materialDesign:DrawerHost>
</materialDesign:DialogHost>
</UserControl>