8 changed files with 193 additions and 25 deletions
@ -0,0 +1,52 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SetSealBoxWindow" |
|||
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:BBWY.Client.Views.SealBox" |
|||
mc:Ignorable="d" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
|
|||
WindowStartupLocation="CenterScreen" |
|||
|
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
CloseButtonVisibility ="Collapsed" Width="378" Height="219" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="39"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="36"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="封箱数量" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1"> |
|||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center"> |
|||
<StackPanel Orientation="Horizontal" Margin="0 41 0 0"> |
|||
<TextBlock Text="封箱数:" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBox x:Name="tbSealBoxCount" Width="200" |
|||
Height="25"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="打印机:" /> |
|||
<ComboBox x:Name="cbPrint" Width="200" Height="25"/> |
|||
</StackPanel> |
|||
|
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
|||
/> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,49 @@ |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
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 BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SetSealBoxWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetSealBoxWindow : BWindow |
|||
{ |
|||
public SetSealBoxWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
|
|||
public Action<int> SendBoxCount { get; set; } |
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
int boxCount = 0; |
|||
try |
|||
{ |
|||
boxCount = Convert.ToInt32(tbSealBoxCount.Text); |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
MessageBox.Show("请输入数字!"); |
|||
return; |
|||
} |
|||
|
|||
|
|||
|
|||
//todo: 打印单子
|
|||
if (SendBoxCount != null) SendBoxCount(boxCount); |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue