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


C# SelectedItemCollection.ContainsOneItemOfType方法代码示例

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


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

示例1: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     if (selection.ContainsOneItemOfType<IXenObject>())
     {
         IXenObject xenObject = selection[0].XenObject;
         return !(xenObject is Folder) && xenObject.Connection != null && xenObject.Connection.IsConnected;
     }
     return false;
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:9,代码来源:PropertiesCommands.cs

示例2: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     if (_slr != null && selection.ContainsOneItemOfType<VDI>())
     {
         VDI vdi = (VDI)selection[0].XenObject;
         var deleteCommand = new DeleteVirtualDiskCommand(MainWindowCommandInterface, vdi);
         
         return vdi.sm_config.ContainsKey("SVID") && !string.IsNullOrEmpty(vdi.sm_config["SVID"]) && deleteCommand.CanExecute();
     }
     return false;
 }
开发者ID:agimofcarmen,项目名称:xenadmin,代码行数:11,代码来源:RemoveStorageLinkVolumeCommand.cs

示例3: CanExecuteCore

        protected override bool CanExecuteCore(SelectedItemCollection selection)
        {
            if (!_owner.Enabled)
            {
                return false;
            }

            if (_search == null)
            {
                return true;
            }

            if (selection.ContainsOneItemOfType<IXenObject>())
            {
                return _search.Query.Match(selection[0].XenObject);
            }
            return false;
        }
开发者ID:huizh,项目名称:xenadmin,代码行数:18,代码来源:ParentMenuItemFeatureCommand.cs

示例4: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<Host>() && selection.AtLeastOneXenObjectCan<Host>(CanExecute);
 }
开发者ID:ushamandya,项目名称:xenadmin,代码行数:4,代码来源:BackupHostCommand.cs

示例5: IsValid

 public override bool IsValid(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<Folder>();
 }
开发者ID:robhoes,项目名称:xenadmin,代码行数:4,代码来源:ContextMenuBuilder.cs

示例6: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<VM>() && selection.AtLeastOneXenObjectCan<VM>(v => v.is_a_snapshot);
 }
开发者ID:ChrisH4rding,项目名称:xenadmin,代码行数:4,代码来源:NewTemplateFromSnapshotCommand.cs

示例7: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return (selection.ContainsOneItemOfType<Folder>()
             || selection.ContainsOneItemOfType<GroupingTag>(t => t.Grouping is OrganizationViewFolders))
            && ConnectionAvailable();
 }
开发者ID:ushamandya,项目名称:xenadmin,代码行数:6,代码来源:NewFolderCommand.cs

示例8: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<Folder>(CanExecute);
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:4,代码来源:PutFolderIntoRenameModeCommand.cs

示例9: IsValid

 public override bool IsValid(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<XenAPI.Network>() &&
         !(selection.FirstAsXenObject as XenAPI.Network).IsGuestInstallerNetwork;
     // CA-218956 - Expose HIMN when showing hidden objects
     // HIMN should not be editable
 }
开发者ID:ushamandya,项目名称:xenadmin,代码行数:7,代码来源:ContextMenuBuilder.cs

示例10: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<SR>(sr => sr.StorageLinkRepository(Program.StorageLinkConnections) != null) ||
         selection.ContainsOneItemOfType<StorageLinkRepository>();
 }
开发者ID:agimofcarmen,项目名称:xenadmin,代码行数:5,代码来源:ImportStorageLinkVolumeCommand.cs

示例11: CanExecuteCore

 protected override bool CanExecuteCore(SelectedItemCollection selection)
 {
     return selection.ContainsOneItemOfType<Folder>() && ConnectionAvailable();
 }
开发者ID:heiden-deng,项目名称:xenadmin,代码行数:4,代码来源:NewFolderCommand.cs


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