Exemplo n.º 1
0
        /// <summary>
        /// 生成注释
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MenuItemCallback(object sender, EventArgs e)
        {
            DTE dte = Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider.GetService(typeof(DTE)) as DTE;

            if (dte == null)
            {
                return;
            }

            DisplayOrCommentsGenerator.GenerateCommentByPropertyDisplayName(dte);
        }
Exemplo n.º 2
0
        private void OpenModelToSQLClient(object sender, EventArgs e)
        {
            DTE dte = Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider.GetService(typeof(DTE)) as DTE;

            if (dte == null)
            {
                return;
            }
            //DisplayOrCommentsGenerator.GenerateDisplayNameByPropertyComment(dte);
            DisplayOrCommentsGenerator.GenerateCommentByPropertyDisplayName(dte);

            //获取配置信息
            ModelToSQLHelper.GetSettings(this.package, out ModelToSQLHelper.IgnoreAttributeList, out ModelToSQLHelper.IgnoreFieldList);
            string sql = ModelToSQLHelper.GenerateSQL(dte);

            // 拷贝到剪贴板
            Clipboard.SetText(sql);
        }