代码拉取完成,页面将自动刷新
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;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。