Пример #1
0
        private void SelectFromLoadCarrier()
        {
            bool foundLoadCarrier = false;

            if (DataContext != null)
            {
                foreach (PackStationOverviewViewResult item in ((IList <PackStationOverviewViewResult>)DataContext))
                {
                    if (item.LoadCarrierId.Trim() == FromLoadCarrier.Text.Trim())
                    {
                        if (item.Selected.Value)
                        {
                            CurrentItem          = item;
                            CurrentItem.Selected = true;
                            foundLoadCarrier     = true;
                            break;
                        }
                    }
                }
            }
            if (!foundLoadCarrier)
            {
                presenter.SelectFromLoadCarrier(FromLoadCarrier.Text);
            }
            FromLoadCarrier.SelectAll();
            FromLoadCarrier.Focus();
        }
Пример #2
0
 private void FromLoadCarrier_ItemSelected(object sender, SelectionChangedEventArgs e)
 {
     e.Handled = true;
     FromLoadCarrier.IsDialogOpen = false;
     FromLoadCarrier.Focus();
     FromLoadCarrier.Text = ((FindLoadCarrierForPackStationFindViewResult)e.AddedItems[0]).LoadCarrierId;
     SelectFromLoadCarrier();
 }
Пример #3
0
 private void SetFocus(bool force)
 {
     if (EANFocus)
     {
         EAN_code.Focus();
         //EANFocus = false;
     }
     else
     {
         if (!FromLoadCarrier.IsEnabled || !ToLoadCarrier.IsEnabled)
         {
             EAN_code.Focus();
         }
         else
         {
             FromLoadCarrier.Focus();
         }
     }
 }