44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
namespace Common.UI.VFM.Views
|
|
{
|
|
using Common.UI.VFM.ViewModels;
|
|
|
|
using System;
|
|
using System.Windows.Controls;
|
|
|
|
public partial class ShipmentView : Grid
|
|
{
|
|
public ShipmentView()
|
|
{
|
|
this.InitializeComponent();
|
|
|
|
App.Current.Activated += App_Currrent_Activated;
|
|
}
|
|
|
|
private void App_Currrent_Activated(Object sender, EventArgs e)
|
|
{
|
|
if (!this.InputCustId.IsFocused && !this.InputPcbId.IsFocused)
|
|
{
|
|
this.InputCustId.Focus();
|
|
}
|
|
}
|
|
|
|
private void TextBox_GotFocus(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
if (this.DataContext is ShipmnetViewModel viewModel)
|
|
{
|
|
viewModel.ResetProcessState.Execute(null);
|
|
}
|
|
}
|
|
|
|
private void InputCustId_TextChanged(Object sender, TextChangedEventArgs e)
|
|
{
|
|
this.InputPcbId.Focus();
|
|
}
|
|
|
|
private void InputPcbId_TextChanged(Object sender, TextChangedEventArgs e)
|
|
{
|
|
this.StartVFM.Focus();
|
|
}
|
|
}
|
|
}
|