当前位置: 首页>>代码示例>>C#>>正文


C# List.SequenceEqual方法代码示例

本文整理汇总了C#中System.Windows.Documents.List.SequenceEqual方法的典型用法代码示例。如果您正苦于以下问题:C# List.SequenceEqual方法的具体用法?C# List.SequenceEqual怎么用?C# List.SequenceEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Documents.List的用法示例。


在下文中一共展示了List.SequenceEqual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetChampList

    public void SetChampList(IEnumerable<MyChampDto> champions) {
      var groups = new Dictionary<string, List<object>>();

      champs = champions.ToList();
      var save = new List<int>();
      var filter = SearchBox.Text;
      if (filter.Equals("Search")) filter = "";
      foreach (var item in champions.OrderBy(c => c.name).Where(c => Regex.IsMatch(c.name, filter, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace))) {
        save.Add(item.key);
        if (!groups.ContainsKey(item.tags[0]))
          groups[item.tags[0]] = new List<object>();
        groups[item.tags[0]].Add(new { Image = DataDragon.GetChampIconImage(item).Load(), Name = item.name, Data = item });
      }
      if (last != null && save.SequenceEqual(last)) return;
      last = save;

      GroupsList.Children.Clear();
      foreach (var group in groups) {
        var grid = new Grid();
        grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
        grid.RowDefinitions.Add(new RowDefinition());

        var label = new Label { Content = group.Key, FontSize = 18 };
        grid.Children.Add(label);

        var items = new ItemsControl { ItemsSource = group.Value };
        grid.Children.Add(items);

        Grid.SetRow(items, 1);
        GroupsList.Children.Add(grid);
      }

      ChampSelect.Visibility = Visibility.Visible;
      SkinSelect.Visibility = Visibility.Collapsed;
    }
开发者ID:mfro,项目名称:LeagueClient,代码行数:35,代码来源:ChampSelector.xaml.cs

示例2: Reinitialize

        public void Reinitialize(List<FilterOption> filters, List<ColumnOption> columns, ColumnOptionsMode columnOptionsMode, List<OrderOption> orders, Pagination pagination)
        {
            try
            {
                avoidPaginationChange = true;

                ColumnOptions.Clear();
                ColumnOptions.AddRange(columns);
                ColumnOption.SetColumnTokens(ColumnOptions, Description);
                ColumnOptionsMode = columnOptionsMode;
                GenerateListViewColumns();

                if (!filters.SequenceEqual(FilterOptions))
                {
                    if (SimpleFilterBuilder != null)
                        SimpleFilterBuilder = null;

                    FilterOptions.Clear();
                    FilterOption.SetFilterTokens(filters, Description);
                    FilterOptions.AddRange(filters);
                }

                OrderOptions.Clear();
                OrderOptions.AddRange(orders);
                OrderOption.SetOrderTokens(OrderOptions, Description);
                SortGridViewColumnHeader.SetColumnAdorners(gvResults, OrderOptions);

                UpdateMultiplyMessage(true);

                Pagination = pagination;
            }
            finally
            {
                avoidPaginationChange = false;
            }
        }
开发者ID:signumsoftware,项目名称:framework,代码行数:36,代码来源:SearchControl.xaml.cs


注:本文中的System.Windows.Documents.List.SequenceEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。