Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
380165b4d6
6 files changed
+178
-4
No files matched your search
+4
-1
@@ -28,6 +28,8 @@ namespace formula_manage
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
DataTable STUFFdataTable = new DataTable(); //建立STUFF缓存
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
int ID_N = 1;
|
int ID_N = 1;
|
||||||
@@ -161,7 +163,8 @@ namespace formula_manage
|
|||||||
|
|
||||||
private void MAC_SET(object sender, RoutedEventArgs e)
|
private void MAC_SET(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Windows.Machine mac = new Windows.Machine();
|
||||||
|
mac.ShowDialog();//实例化并置顶打开设置窗口
|
||||||
}
|
}
|
||||||
|
|
||||||
private void STUFF(object sender, RoutedEventArgs e)
|
private void STUFF(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -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)//删除按钮事件
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-2
@@ -7,7 +7,8 @@
|
|||||||
xmlns:ConvertMoels="clr-namespace:formula_manage.ConvertMoels"
|
xmlns:ConvertMoels="clr-namespace:formula_manage.ConvertMoels"
|
||||||
xmlns:viewmodel="clr-namespace:formula_manage.ViewModel"
|
xmlns:viewmodel="clr-namespace:formula_manage.ViewModel"
|
||||||
mc:Ignorable="d" Loaded="Stuff_Loaded"
|
mc:Ignorable="d" Loaded="Stuff_Loaded"
|
||||||
Title="Stuff" Height="720" Width="1100" BorderBrush="White" Background="#FFE0E0E0">
|
Title="Stuff" Height="720" Width="1100" MaxHeight="720" MaxWidth="1100" MinHeight="720" MinWidth="1100"
|
||||||
|
BorderBrush="White" Background="#FFE0E0E0">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<!--引入转换器-->
|
<!--引入转换器-->
|
||||||
<ConvertMoels:ColorSQLConvert x:Key="ColorSQLConvert"/>
|
<ConvertMoels:ColorSQLConvert x:Key="ColorSQLConvert"/>
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<!--原料表-->
|
<!--原料表-->
|
||||||
<DataGrid x:Name="DataGridStuff" MouseDoubleClick="DataGridStuff_MouseDoubleClick" SelectionMode="Single" AlternationCount="2" IsReadOnly="True"
|
<DataGrid x:Name="DataGridStuff" MouseDoubleClick="DataGridStuff_MouseDoubleClick" SelectionMode="Single" AlternationCount="2" IsReadOnly="True"
|
||||||
HorizontalAlignment="Left" Margin="15,15,0,150" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" MinColumnWidth="30"
|
HorizontalAlignment="Left" Margin="15,15,0,150" d:ItemsSource="{d:SampleData ItemCount=500}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
||||||
CanUserResizeRows="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
|
CanUserResizeRows="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ namespace formula_manage.Windows
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Button_Delete(object sender, RoutedEventArgs e)//删除按钮事件
|
private async void Button_Delete(object sender, RoutedEventArgs e)//删除按钮事件
|
||||||
|
|||||||
@@ -141,6 +141,9 @@
|
|||||||
<Compile Include="Windows\APP_set.xaml.cs">
|
<Compile Include="Windows\APP_set.xaml.cs">
|
||||||
<DependentUpon>APP_set.xaml</DependentUpon>
|
<DependentUpon>APP_set.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Windows\Machine.xaml.cs">
|
||||||
|
<DependentUpon>Machine.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Windows\Sql.xaml.cs">
|
<Compile Include="Windows\Sql.xaml.cs">
|
||||||
<DependentUpon>Sql.xaml</DependentUpon>
|
<DependentUpon>Sql.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -185,6 +188,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Windows\Machine.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Windows\Sql.xaml">
|
<Page Include="Windows\Sql.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
Reference in new issue
Block a user