关闭所有文档

2015-11-12 12:12:24  访问(1672) 赞(0) 踩(0)


        /// <summary>
        /// 关闭所有文档
        /// </summary>
        /// <param name="_applicationObject"></param>
        public void CloseAllDocuments(DTE2 _applicationObject)
        {
            if (_applicationObject == null)
            {

                throw new Exception
                    (
                        "方法:"
                        + MethodBase.GetCurrentMethod().ReflectedType.FullName
                        + " "
                        + MethodBase.GetCurrentMethod().ToString()
                        + " 发生异常:"
                        + "DTE2 _applicationObject"
                        + "值为null。"
                    );
            }

            _applicationObject.ExecuteCommand("Window.CloseAllDocuments", string.Empty);

        } 


标签:关闭所有文档 

上一条:

下一条:


 

相关评论

评论加载中……
 

发表评论

类型:
内容:
  (Alt+Enter)
 
  ┈全部┈  
 
(显示默认分类)