1 Star 0 Fork 2

mes / NFinal2Compiler

forked from xiaolu6t6t / NFinal2Compiler 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
WizardImplementation.cs 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
chenzx 提交于 2017-11-15 20:00 . update custome paramter in project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EnvDTE;
using Microsoft.VisualStudio.TemplateWizard;
using System.Windows.Forms;
namespace NFinalCompiler
{
public class WizardImplementation : IWizard
{
private UserInputForm inputForm;
private string customMessage;
// This method is called before opening any item that
// has the OpenInEditor attribute.
public void BeforeOpeningFile(ProjectItem projectItem)
{
}
public void ProjectFinishedGenerating(Project project)
{
}
// This method is only called for item templates,
// not for project templates.
public void ProjectItemFinishedGenerating(ProjectItem
projectItem)
{
}
// This method is called after the project is created.
public void RunFinished()
{
}
public void RunStarted(object automationObject,
Dictionary<string, string> replacementsDictionary,
WizardRunKind runKind, object[] customParams)
{
Random random = new Random();
int port= random.Next(5000, 9000);
replacementsDictionary.Add("$port$", port.ToString());
//try
//{
// // Display a form to the user. The form collects
// // input for the custom message.
// inputForm = new UserInputForm();
// inputForm.ShowDialog();
// customMessage = UserInputForm.CustomMessage;
// // Add custom parameters.
// replacementsDictionary.Add("$custommessage$",
// customMessage);
//}
//catch (Exception ex)
//{
// MessageBox.Show(ex.ToString());
//}
}
// This method is only called for item templates,
// not for project templates.
public bool ShouldAddProjectItem(string filePath)
{
return true;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/mes/nfinal2compiler.git
git@gitee.com:mes/nfinal2compiler.git
mes
nfinal2compiler
NFinal2Compiler
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891