SetAnimateLoad() public static method

public static SetAnimateLoad ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
return void
Esempio n. 1
0
        private void AlphaOrderChecked(object sender, RoutedEventArgs e)
        {
            CardControl.SetAnimateLoad(this, false);

            positionOrderBtn.IsChecked = false;
            cardsList.SortByName       = true;
        }
Esempio n. 2
0
        private void IdOrderChecked(object sender, RoutedEventArgs e)
        {
            if (cardsList.SortMethod == SortTypes.Id)
            {
                return;
            }
            CardControl.SetAnimateLoad(this, false);

            IdOrderBtn.IsChecked       = true;
            positionOrderBtn.IsChecked = false;
            alphaOrderBtn.IsChecked    = false;
            cardsList.SortCards(SortTypes.Id);
        }
Esempio n. 3
0
        private void FilterChanged(object sender, TextChangedEventArgs e)
        {
            CardControl.SetAnimateLoad(this, false);

            string filter = filterBox.Text;

            if (filter == "")
            {
                watermark.Visibility  = Visibility.Visible;
                cardsList.FilterCards = null;
            }
            else
            {
                IEnumerable <string> textProperties = Program.GameEngine.Definition.CustomProperties
                                                      .Where(p => !p.IgnoreText)
                                                      .Select(p => p.Name);
                watermark.Visibility  = Visibility.Hidden;
                cardsList.FilterCards = c =>
                {
                    if (!cardsList.IsAlwaysUp && !c.FaceUp)
                    {
                        return(false);
                    }
                    return
                        (c.RealName.IndexOf(filter, StringComparison.CurrentCultureIgnoreCase) >=
                         0 ||
                         textProperties.Select(property => c.GetProperty(property)).
                         Where(propertyValue => propertyValue != null).Any(
                             propertyValue =>
                             propertyValue.ToString().IndexOf(filter,
                                                              StringComparison.
                                                              CurrentCultureIgnoreCase) >= 0));
                };
                if (cardsList.SortMethod == SortTypes.None)
                {
                    IdOrderBtn.IsChecked = true;
                }
            }
        }