Пример #1
0
 private void CtrlTestCard_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (selectedCard != null)
     {
         selectedCard.IsSelected = false;
     }
     selectedCard            = sender as TestCardControl;
     CtrlTestInfo.TestId     = selectedCard.TestId;
     selectedCard.IsSelected = true;
     selectedCard.Focus();
 }
Пример #2
0
        void UpdatePage()
        {
            CtrlTestsWrap.Children.Clear();

            TestCardControl card;

            for (int i = CtrlPageNav.PageFirstElementIndex; i < CtrlPageNav.PageLastElementIndex; i++)
            {
                card = new TestCardControl(testIdList[i]);
                card.MouseLeftButtonUp += CtrlTestCard_MouseLeftButtonUp;
                card.IsMin              = CtrlCardState.IsChecked == false;
                CtrlTestsWrap.Children.Add(card);
            }

            if (CtrlTestsWrap.Children.Count == 0)
            {
                CtrlTestsEmpty.Visibility = Visibility.Visible;
            }
            else
            {
                CtrlTestsEmpty.Visibility = Visibility.Collapsed;
            }
        }