Esempio n. 1
0
 private void GroupListbx_LostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (AntigensGrid.ItemsSource != null)
     {
         AntigensGrid.Focus();
     }
 }
Esempio n. 2
0
        private void SaveAndNextButton_Click(object sender, RoutedEventArgs e)
        {
            if (!ValidatePage())
            {
                return;
            }

            SaveCCs();
            RemoveErrorBorders();
            if (App.ccPageType != CCType.N)
            {
                if (AntigenListbx.SelectedIndex == AntigenListbx.Items.Count - 1) // last antigen selected
                {
                    if (GroupListbx.SelectedIndex < GroupListbx.Items.Count - 1)  // there are still more groups to select from
                    {
                        GroupListbx.SelectedIndex++;

                        ClearNext();
                        AntigensGrid.Focus();
                    }
                    else
                    {
                        MessageBox.Show("That was the last antigen in the Array list");
                        ClearPage();
                    }
                }
                else
                {
                    AntigenListbx.SelectedIndex++;
                    //AntigenListbx.SelectedItem = AntigenListbx.Items[AntigenListbx.SelectedIndex + 1];

                    ClearNext();
                    AntigensGrid.Focus();
                }
            }
            else
            {
                if (GroupListbx.SelectedIndex < GroupListbx.Items.Count - 1) // there are still more groups to select from
                {
                    GroupListbx.SelectedIndex++;

                    ClearNext();
                    AntigensGrid.Focus();
                }
                else
                {
                    MessageBox.Show("That was the last antigen in the Array list");
                    ClearPage();
                }
            }
        }