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


C# __VSDELETEITEMOPERATION类代码示例

本文整理汇总了C#中__VSDELETEITEMOPERATION的典型用法代码示例。如果您正苦于以下问题:C# __VSDELETEITEMOPERATION类的具体用法?C# __VSDELETEITEMOPERATION怎么用?C# __VSDELETEITEMOPERATION使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: CanDeleteItem

 /// <summary>
 /// SearchPathContainer Node cannot be deleted.
 /// </summary>        
 protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
 {
     return false;
 }
开发者ID:borota,项目名称:JTVS,代码行数:7,代码来源:CommonSearchPathContainerNode.cs

示例2: CanDeleteItem

 protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
 {
     if (deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject)
     {
         return true;
     }
     return false;
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:8,代码来源:ReferenceNode.cs

示例3: CanDeleteItem

 protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
 {
     if(deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage)
     {
         return this.ProjectMgr.CanProjectDeleteItems;
     }
     return false;
 }
开发者ID:kageyamaginn,项目名称:VSSDK-Extensibility-Samples,代码行数:8,代码来源:FileNode.cs

示例4: ShowDeleteMessage

 protected internal override void ShowDeleteMessage(IList<HierarchyNode> nodes, __VSDELETEITEMOPERATION action, out bool cancel, out bool useStandardDialog) {
     // Don't prompt if all the nodes are references
     useStandardDialog = !nodes.All(n => n is ReferenceNode);
     cancel = false;
 }
开发者ID:whuthj,项目名称:VisualRust,代码行数:5,代码来源:ReferenceNode.cs

示例5: CanDeleteItem

 public override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
 {
     // this is reference to FSharp.Core that uses value of TargetFSharpCoreVersion property - prohibit deletion
     if (IsSpecialFSharpCoreReference)
     {
         return false;
     }
     return base.CanDeleteItem(deleteOperation);
 }
开发者ID:xenocons,项目名称:visualfsharp,代码行数:9,代码来源:AssemblyReferenceNode.cs

示例6: CanDeleteItem

 internal override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation) {
     return _canUninstall && deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject;
 }
开发者ID:smallwave,项目名称:PTVS,代码行数:3,代码来源:InterpretersPackageNode.cs

示例7: ShowDeleteMessage

 protected internal override void ShowDeleteMessage(IList<HierarchyNode> nodes, __VSDELETEITEMOPERATION action, out bool cancel, out bool useStandardDialog) {
     if (nodes.All(n => n is InterpretersPackageNode) &&
         nodes.Cast<InterpretersPackageNode>().All(n => n.Parent == Parent)) {
         string message;
         if (nodes.Count == 1) {
             message = Strings.UninstallPackage.FormatUI(
                 Caption,
                 Parent._factory.Description,
                 Parent._factory.Configuration.PrefixPath
             );
         } else {
             message = Strings.UninstallPackages.FormatUI(
                 string.Join(Environment.NewLine, nodes.Select(n => n.Caption)),
                 Parent._factory.Description,
                 Parent._factory.Configuration.PrefixPath
             );
         }
         useStandardDialog = false;
         cancel = VsShellUtilities.ShowMessageBox(
             ProjectMgr.Site,
             string.Empty,
             message,
             OLEMSGICON.OLEMSGICON_WARNING,
             OLEMSGBUTTON.OLEMSGBUTTON_OKCANCEL,
             OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST
         ) != NativeMethods.IDOK;
     } else {
         useStandardDialog = false;
         cancel = true;
     }
 }
开发者ID:smallwave,项目名称:PTVS,代码行数:31,代码来源:InterpretersPackageNode.cs

示例8: CanDeleteItem

        internal override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation) {
            var service = _interpreterService as IInterpreterOptionsService2;
            if (service != null && service.IsInterpreterLocked(_factory, InstallPackageLockMoniker)) {
                // Prevent the environment from being deleted while installing.
                return false;
            }

            if (deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject) {
                // Interpreter and InterpreterReference can both be removed from
                // the project, but the default environment cannot
                return _canRemove;
            } else if (deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage) {
                // Only Interpreter can be deleted.
                return _canDelete;
            }
            return false;
        }
开发者ID:wenh123,项目名称:PTVS,代码行数:17,代码来源:InterpretersNode.cs

示例9: CanDeleteItem

 /// <summary>
 /// Common Folder Node can only be deleted from file system.
 /// </summary>        
 internal override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation) {
     return deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage;
 }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:6,代码来源:CommonFolderNode.cs

示例10: CanDeleteItem

 /// <summary>
 /// Common File Node can only be deleted from file system.
 /// </summary>        
 internal override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation) {
     if (IsLinkFile) {
         // we don't delete link items, we only remove them from the project.  If we were
         // to return true when queried for both delete from storage and remove from project
         // the user would be prompted about which they would like to do.
         return deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject;
     }
     return deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage;
 }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:12,代码来源:CommonFileNode.cs

示例11: CanDeleteItem

        protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
        {
            __VSDELETEITEMOPERATION supportedOp = !this.IsLink ?
                __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage : __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject;

            if (deleteOperation == supportedOp)
            {
                return this.ProjectMgr.CanProjectDeleteItems;
            }

            return false;
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:12,代码来源:filenode.cs

示例12: CanDeleteItem

        protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
        {
            string linkPath = this.ItemNode.GetMetadata(ProjectFileConstants.Link);
            __VSDELETEITEMOPERATION supportedOp = String.IsNullOrEmpty(linkPath) ?
                __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage : __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject;

            if (deleteOperation == supportedOp)
            {
                return this.ProjectManager.CanProjectDeleteItems;
            }

            return false;
        }
开发者ID:sharwell,项目名称:MPFProj10,代码行数:13,代码来源:FileNode.cs

示例13: PromptAndDelete

        private void PromptAndDelete(HierarchyItem item, IVsHierarchyDeleteHandler deleteHandler, __VSDELETEITEMOPERATION deleteType, string message) {
            Guid unused = Guid.Empty;
            int result;
            // show delete dialog...
            if (ErrorHandler.Succeeded(
                _mockVs.UIShell.ShowMessageBox(
                    0,
                    ref unused,
                    null,
                    message,
                    null,
                    0,
                    OLEMSGBUTTON.OLEMSGBUTTON_OKCANCEL,
                    OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
                    OLEMSGICON.OLEMSGICON_WARNING,
                    0,
                    out result
                )) && result == DialogResult.OK) {
                int hr = deleteHandler.DeleteItem(
                    (uint)deleteType,
                    item.ItemId
                );

                if (ErrorHandler.Failed(hr) && hr != VSConstants.OLE_E_PROMPTSAVECANCELLED) {
                    _mockVs.UIShell.ReportErrorInfo(hr);
                }
            }
        }
开发者ID:omnimark,项目名称:PTVS,代码行数:28,代码来源:MockVsUIHierarchyWindow.cs

示例14: CanDeleteItem

        /// <summary>
        /// This is overridden to prevent deletion of linked project items.
        /// Linked items can still be removed/excluded.
        /// </summary>
        /// <param name="deleteOperation">The delete operation to perform</param>
        /// <returns>True if the item can be deleted based on the requested
        /// operation or false if it cannot.</returns>
        protected override bool CanDeleteItem(__VSDELETEITEMOPERATION deleteOperation)
        {
            if(deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_DeleteFromStorage)
            {
                // !EFW - Cannot delete linked items
                if(!String.IsNullOrEmpty(this.ItemNode.GetMetadata(ProjectFileConstants.Link)))
                    return false;

                return this.ProjectMgr.CanProjectDeleteItems;
            }

            // Remove is allowed for linked items
            if(deleteOperation == __VSDELETEITEMOPERATION.DELITEMOP_RemoveFromProject)
                return !String.IsNullOrEmpty(this.ItemNode.GetMetadata(ProjectFileConstants.Link));

            return false;
        }
开发者ID:julianhaslinger,项目名称:SHFB,代码行数:24,代码来源:FileNode.cs


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