6 changed files with 179 additions and 5 deletions
@ -0,0 +1,124 @@ |
|||
<Window x:Class="formula_manage.Windows.Machine" |
|||
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:local="clr-namespace:formula_manage.Windows" |
|||
mc:Ignorable="d" |
|||
Title="MAC_SET" Height="720" Width="1100" |
|||
BorderBrush="White" Background="#FFE0E0E0"> |
|||
<Grid> |
|||
<!--设备表--> |
|||
<DataGrid x:Name="DataGridMac" MouseDoubleClick="DataGridMac_MouseDoubleClick" SelectionMode="Single" AlternationCount="2" IsReadOnly="True" |
|||
Margin="15,15,15,150" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" MinColumnWidth="30" |
|||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC" |
|||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" |
|||
CanUserResizeRows="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" |
|||
CanUserResizeColumns="False" CanUserSortColumns="False" HeadersVisibility ="Column"> |
|||
<DataGrid.RowStyle > |
|||
<Style TargetType="{x:Type DataGridRow}"> |
|||
<Style.Triggers> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|||
<Setter Property="Background" Value="#FFFFFFFF" /> |
|||
</Trigger> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|||
<Setter Property="Background" Value="#FFF0F0F0" /> |
|||
</Trigger> |
|||
<Trigger Property="IsMouseOver" Value="False"> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.RowStyle> |
|||
<DataGrid.CellStyle> |
|||
<Style TargetType="DataGridCell"> |
|||
<Setter Property="BorderThickness" Value="0"/> |
|||
<Setter Property="MinWidth" Value="20"/> |
|||
<Style.Triggers> |
|||
<Trigger Property="IsSelected" Value="True"> |
|||
<Setter Property="Background" Value="#FFC0C0C0"/> |
|||
<Setter Property="BorderBrush" Value="#FFC0C0C0"/> |
|||
<Setter Property="Foreground" Value="#000000"/> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.CellStyle> |
|||
<DataGrid.Columns> |
|||
<!--列信息绑定--> |
|||
<DataGridTemplateColumn Header=" 序号" Width="50" MinWidth="10" IsReadOnly="True"> |
|||
<DataGridTemplateColumn.CellTemplate> |
|||
<DataTemplate> |
|||
<TextBlock FontSize="15" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock> |
|||
</DataTemplate> |
|||
</DataGridTemplateColumn.CellTemplate> |
|||
</DataGridTemplateColumn> |
|||
<DataGridTextColumn Header="机台名称" Binding="{Binding Name}" Width="130" FontSize="15" MaxWidth="130" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="机组" Binding="{Binding MacGroup}" Width="100" FontSize="15" MaxWidth="100" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="载量(KG)" Binding="{Binding Capacity}" Width="100" FontSize="15" MaxWidth="100" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="容量(L)" Binding="{Binding Volume}" Width="100" FontSize="15" MaxWidth="100" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="染色方式" Binding="{Binding Industry}" Width="100" FontSize="15" MaxWidth="100" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="类型" Binding="{Binding Categories}" Width="100" FontSize="15" MaxWidth="100" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="备注" Binding="{Binding Note}" Width="600" FontSize="15" MinWidth="100" CanUserReorder="False"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
<!--机台名--> |
|||
<TextBox x:Name="mac_Name" HorizontalAlignment="Left" Height="30" Margin="105,0,0,100" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="22" MaxLines="1" MaxLength="50" /> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,100" TextWrapping="Wrap" Text="机台名称" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="20"/> |
|||
<!--机组--> |
|||
<TextBox x:Name="mac_MacGroup" HorizontalAlignment="Left" Height="30" Margin="275,0,0,100" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="22" MaxLines="1" MaxLength="50"/> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="225,0,0,100" TextWrapping="Wrap" Text="机组" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="20"/> |
|||
<!--染色方式--> |
|||
<ComboBox x:Name="mac_Industry" HorizontalAlignment="Left" Height="30" Margin="435,0,0,100" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True"> |
|||
<ComboBoxItem Content="浸染"></ComboBoxItem> |
|||
<ComboBoxItem Content="连染"></ComboBoxItem> |
|||
<ComboBoxItem Content="印染"></ComboBoxItem> |
|||
</ComboBox> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="390,0,0,100" TextWrapping="Wrap" Text="方式" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="20"/> |
|||
<!--类型--> |
|||
<ComboBox x:Name="mac_Categories" HorizontalAlignment="Left" Height="30" Margin="600,0,0,100" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True"> |
|||
<ComboBoxItem Content="溢流"></ComboBoxItem> |
|||
<ComboBoxItem Content="气流"></ComboBoxItem> |
|||
<ComboBoxItem Content="轧染"></ComboBoxItem> |
|||
<ComboBoxItem Content="卷染"></ComboBoxItem> |
|||
<ComboBoxItem Content="喷染"></ComboBoxItem> |
|||
<ComboBoxItem Content="筒纱"></ComboBoxItem> |
|||
<ComboBoxItem Content="成衣"></ComboBoxItem> |
|||
</ComboBox> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="550,0,0,100" TextWrapping="Wrap" Text="类型" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="20"/> |
|||
<!--载量--> |
|||
<TextBox x:Name="mac_Capacity" HorizontalAlignment="Left" Height="30" Margin="105,0,0,50" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="22" MaxLines="1" MaxLength="25" |
|||
InputMethod.IsInputMethodEnabled="False"/> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,50" TextWrapping="Wrap" Text="载量" |
|||
VerticalAlignment="Bottom" Width="80" FontSize="20"/> |
|||
<!--容量--> |
|||
<TextBox x:Name="mac_Volume" HorizontalAlignment="Left" Height="30" Margin="275,0,0,50" Text="" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="22" MaxLines="1" MaxLength="25" |
|||
InputMethod.IsInputMethodEnabled="False"/> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="225,0,0,50" TextWrapping="Wrap" Text="容量" |
|||
VerticalAlignment="Bottom" Width="80" FontSize="20"/> |
|||
<!--备注--> |
|||
<TextBox x:Name="mac_Note" HorizontalAlignment="Left" Height="30" Margin="435,0,0,50" |
|||
VerticalAlignment="Bottom" Width="265" FontSize="22" MaxLines="1"/> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="390,0,0,50" TextWrapping="Wrap" Text="备注" |
|||
VerticalAlignment="Bottom" Width="50" FontSize="20"/> |
|||
|
|||
<!--存储按钮--> |
|||
<Button Content="存储" HorizontalAlignment="Left" Height="50" Margin="795,0,0,60" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="30" Background="#FFEFEFEF" BorderBrush="White" |
|||
Click="Button_Preservation"> |
|||
</Button> |
|||
<!--删除按钮--> |
|||
<Button Content="删除" HorizontalAlignment="Left" Height="50" Margin="935,0,0,60" |
|||
VerticalAlignment="Bottom" Width="100" FontSize="30" Background="#FFEFEFEF" BorderBrush="White" |
|||
Click="Button_Delete"> |
|||
</Button> |
|||
</Grid> |
|||
</Window> |
|||
@ -0,0 +1,40 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace formula_manage.Windows |
|||
{ |
|||
/// <summary>
|
|||
/// Machine.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class Machine : Window |
|||
{ |
|||
public Machine() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void DataGridMac_MouseDoubleClick(object sender, MouseButtonEventArgs e)//数据表双击事件
|
|||
{ |
|||
} |
|||
|
|||
private async void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
|||
{ |
|||
|
|||
} |
|||
|
|||
private async void Button_Delete(object sender, RoutedEventArgs e)//删除按钮事件
|
|||
{ |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue