sc 2 years ago
committed by 忱 沈
parent
commit
223a40ce5f
  1. 8
      MainWindow.xaml
  2. 14
      MainWindow.xaml.cs

8
MainWindow.xaml

@ -39,8 +39,8 @@
<MenuItem Header="_统计" FontSize="16"/> <MenuItem Header="_统计" FontSize="16"/>
</MenuItem> </MenuItem>
</Menu> </Menu>
<Button Content="新工单" HorizontalAlignment="Left" Margin="335,35,0,0" Height="30" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" FontSize="20" Click="Button_Click" Focusable ="False"/> <Button Content="新工单" HorizontalAlignment="Left" Margin="335,35,0,0" Height="30" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" FontSize="20" Click="Button_NewOrder" Focusable ="False"/>
<Button Content="预设工艺" HorizontalAlignment="Left" Margin="300,70,0,0" Height="30" VerticalAlignment="Top" Width="105" Background="#FFF9F9F9" FontSize="20" Focusable ="False" Click="Button_Click_3"/> <Button Content="预设工艺" HorizontalAlignment="Left" Margin="300,70,0,0" Height="30" VerticalAlignment="Top" Width="105" Background="#FFF9F9F9" FontSize="20" Focusable ="False" Click="Button_Technology"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,35,0,0" TextWrapping="Wrap" Text="物料单号:" VerticalAlignment="Top" Width="90" FontSize="20" Background="WhiteSmoke"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="5,35,0,0" TextWrapping="Wrap" Text="物料单号:" VerticalAlignment="Top" Width="90" FontSize="20" Background="WhiteSmoke"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,70,0,0" TextWrapping="Wrap" Text="执行工艺:" VerticalAlignment="Top" Width="90" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="5,70,0,0" TextWrapping="Wrap" Text="执行工艺:" VerticalAlignment="Top" Width="90" FontSize="20"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="5,105,0,0" TextWrapping="Wrap" Text="机台:" VerticalAlignment="Top" Width="90" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="5,105,0,0" TextWrapping="Wrap" Text="机台:" VerticalAlignment="Top" Width="90" FontSize="20"/>
@ -57,8 +57,8 @@
<Button Content="..." HorizontalAlignment="Left" Margin="370,40,0,0" Height="30" VerticalAlignment="Top" Width="30" Background="#FFF9F9F9" FontSize="20" Focusable ="False"/> <Button Content="..." HorizontalAlignment="Left" Margin="370,40,0,0" Height="30" VerticalAlignment="Top" Width="30" Background="#FFF9F9F9" FontSize="20" Focusable ="False"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="0,5,0,0" TextWrapping="Wrap" Text="步序:" VerticalAlignment="Top" Width="70" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="0,5,0,0" TextWrapping="Wrap" Text="步序:" VerticalAlignment="Top" Width="70" FontSize="20"/>
<TextBox x:Name="Procedures_P" HorizontalAlignment="Left" Height="30" Margin="90,5,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Top" Width="50" FontSize="20" MaxLines="1" MaxLength="3" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False"/> <TextBox x:Name="Procedures_P" HorizontalAlignment="Left" Height="30" Margin="90,5,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Top" Width="50" FontSize="20" MaxLines="1" MaxLength="3" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False"/>
<Button Content="+" HorizontalAlignment="Left" Height="15" Width="20" Margin="140,5,0,0" VerticalAlignment="Top" FontSize="10" Background="#FFF1F1F1" BorderBrush="#FFC5C5C5" Padding="0,0,0,0" IsTabStop="False" Click="Button_Click_1" Focusable ="False"/> <Button Content="+" HorizontalAlignment="Left" Height="15" Width="20" Margin="140,5,0,0" VerticalAlignment="Top" FontSize="10" Background="#FFF1F1F1" BorderBrush="#FFC5C5C5" Padding="0,0,0,0" IsTabStop="False" Click="Button_StepUp" Focusable ="False"/>
<Button Content="-" HorizontalAlignment="Left" Height="15" Width="20" Margin="140,20,0,0" VerticalAlignment="Top" FontSize="10" Background="#FFF1F1F1" BorderBrush="#FFC5C5C5" Padding="0,0,0,0" IsTabStop="False" Click="Button_Click_2" Focusable ="False"/> <Button Content="-" HorizontalAlignment="Left" Height="15" Width="20" Margin="140,20,0,0" VerticalAlignment="Top" FontSize="10" Background="#FFF1F1F1" BorderBrush="#FFC5C5C5" Padding="0,0,0,0" IsTabStop="False" Click="Button_StepDow" Focusable ="False"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="170,5,0,0" TextWrapping="Wrap" Text="流程:" VerticalAlignment="Top" Width="70" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="170,5,0,0" TextWrapping="Wrap" Text="流程:" VerticalAlignment="Top" Width="70" FontSize="20"/>
<ComboBox HorizontalAlignment="Left" Height="30" Margin="220,5,0,0" Text="" VerticalAlignment="Top" Width="180" FontSize="20" IsEditable="True" Focusable ="False"/> <ComboBox HorizontalAlignment="Left" Height="30" Margin="220,5,0,0" Text="" VerticalAlignment="Top" Width="180" FontSize="20" IsEditable="True" Focusable ="False"/>
<TextBlock HorizontalAlignment="Left" Height="35" Margin="0,40,0,0" TextWrapping="Wrap" Text="配方代码:" VerticalAlignment="Top" Width="90" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="35" Margin="0,40,0,0" TextWrapping="Wrap" Text="配方代码:" VerticalAlignment="Top" Width="90" FontSize="20"/>

14
MainWindow.xaml.cs

@ -111,7 +111,7 @@ namespace formula_manage
} }
private void Button_Click(object sender, RoutedEventArgs e) private void Button_NewOrder(object sender, RoutedEventArgs e)
{ {
Number.Text = Prepose + System.DateTime.Now.ToString("yyyyMMddHHmmss"); ; Number.Text = Prepose + System.DateTime.Now.ToString("yyyyMMddHHmmss"); ;
} }
@ -132,24 +132,24 @@ namespace formula_manage
} }
private void Button_Click_1(object sender, RoutedEventArgs e) private void Button_StepUp(object sender, RoutedEventArgs e)
{ {
int I = int.Parse(Procedures_N.Text); int I = int.Parse(Procedures_N.Text);
int P = int.Parse(Procedures_P.Text); int P = int.Parse(Procedures_P.Text);
if (P < I) Procedures_P.Text = (P + 1).ToString(); if (P < I) Procedures_P.Text = (P + 1).ToString();
} }
private void Button_Click_2(object sender, RoutedEventArgs e) private void Button_StepDow(object sender, RoutedEventArgs e)
{ {
int P = int.Parse(Procedures_P.Text); int P = int.Parse(Procedures_P.Text);
if (P > 1) Procedures_P.Text = (P - 1).ToString(); if (P > 1) Procedures_P.Text = (P - 1).ToString();
} }
private void Button_Click_3(object sender, RoutedEventArgs e) private void Button_Technology(object sender, RoutedEventArgs e)
{ {
Window Deputy = new Window(); //支持导航预设工艺窗口 // Window Deputy = new Window(); //支持导航预设工艺窗口
Deputy.Content = new View.ViewProcess(); // Deputy.Content = new View.ViewProcess();
Deputy.Show(); //打开窗口 // Deputy.Show(); //打开窗口
} }
} }
} }

Loading…
Cancel
Save