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


C# Search.PopulateAdapters方法代码示例

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


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

示例1: CompareResults

 public static void CompareResults(Search search, XmlNode xmlNode)
 {
     ComparerAdapter adapter = new ComparerAdapter(search, xmlNode);
     search.PopulateAdapters(adapter);
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:5,代码来源:ComparerAdapter.cs

示例2: CreateNewRootNode

        public VirtualTreeNode CreateNewRootNode(Search search, NavigationPane.NavigationMode mode)
        {
            IAcceptGroups groupAcceptor;
            VirtualTreeNode newRootNode;

            switch (mode)
            {
                case NavigationPane.NavigationMode.Objects:
                    newRootNode = viewObjects.RootNode;
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    viewObjects.Populate(search, groupAcceptor);
                    break;
                case NavigationPane.NavigationMode.Tags:
                    newRootNode = viewTags.RootNode;
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    viewTags.Populate(search, groupAcceptor);
                    break;
                case NavigationPane.NavigationMode.Folders:
                    newRootNode = viewFolders.RootNode;
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    viewFolders.Populate(search, groupAcceptor);
                    break;
                case NavigationPane.NavigationMode.CustomFields:
                    newRootNode = viewFields.RootNode;
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    viewFields.Populate(search, groupAcceptor);
                    break;
                case NavigationPane.NavigationMode.vApps:
                    newRootNode = viewVapps.RootNode;
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    viewVapps.Populate(search, groupAcceptor);
                    break;
                case NavigationPane.NavigationMode.SavedSearch:
                    Util.ThrowIfParameterNull(search, "search");
                    newRootNode = new VirtualTreeNode(search.Name)
                        {
                            Tag = search,
                            ImageIndex = search.DefaultSearch
                                             ? (int)Icons.DefaultSearch
                                             : (int)Icons.Search
                        };
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    search.PopulateAdapters(groupAcceptor);
                    break;
                default://includes Infrastructure and Notifications
                    Util.ThrowIfParameterNull(search, "search");
                    newRootNode = new VirtualTreeNode("XenCenter") { ImageIndex = (int)Icons.Home };
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    search.PopulateAdapters(groupAcceptor);
                    break;
            }

            return newRootNode;
        }
开发者ID:PlusCloudsOSS,项目名称:xenadmin,代码行数:54,代码来源:MainWindowTreeBuilder.cs

示例3: Populate

 public void Populate(Search search)
 {
     ClearItems();
     if (search != null && search.Query != null)
         scope = search.Query.QueryScope;
     else
         scope = null;
     search.PopulateAdapters(this);
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:9,代码来源:ResourceSelectButton.cs

示例4: CreateNewRootNode

        public VirtualTreeNode CreateNewRootNode(Search search, bool organizationalMode)
        {
            if (!organizationalMode)
            {
                Util.ThrowIfParameterNull(search, "search");
            }

            VirtualTreeNode newRootNode = new VirtualTreeNode("XenCenter");

            MainWindowTreeNodeGroupAcceptor groupAcceptor = new MainWindowTreeNodeGroupAcceptor(_highlightedDragTarget, _treeViewForeColor, _treeViewBackColor, newRootNode);

            if (organizationalMode)
            {
                OrganizationalView.PopulateOrganizationalView(groupAcceptor, search);
            }
            else
            {
                search.PopulateAdapters(groupAcceptor);
            }

            return newRootNode;
        }
开发者ID:ChrisH4rding,项目名称:xenadmin,代码行数:22,代码来源:MainWindowTreeBuilder.cs

示例5: CreateNewRootNode

        public VirtualTreeNode CreateNewRootNode(Search search, TreeSearchBox.Mode mode)
        {
            VirtualTreeNode newRootNode;
            MainWindowTreeNodeGroupAcceptor groupAcceptor;

            switch (mode)
            {
                case TreeSearchBox.Mode.Objects:
                    newRootNode = new VirtualTreeNode(Messages.VIEW_OBJECTS);
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    OrganizationalView.PopulateObjectView(groupAcceptor, search);
                    break;
                case TreeSearchBox.Mode.Organization:
                    newRootNode = new VirtualTreeNode(Messages.VIEW_ORGANIZATION);
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    OrganizationalView.PopulateOrganizationView(groupAcceptor, search);
                    break;
                default:
                    Util.ThrowIfParameterNull(search, "search");
                    newRootNode = new VirtualTreeNode("XenCenter");
                    groupAcceptor = CreateGroupAcceptor(_highlightedDragTarget, newRootNode);
                    search.PopulateAdapters(groupAcceptor);
                    break;
            }

            return newRootNode;
        }
开发者ID:heiden-deng,项目名称:xenadmin,代码行数:27,代码来源:MainWindowTreeBuilder.cs


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