【发布时间】:2016-06-09 12:37:59
【问题描述】:
我创建了一个多项目模板,但我想根据用户输入编辑存储在每个项目中的一些值,我通过向导模板为单个项目工作,但无法为多个项目做.
这是RunStarted方法下的向导类
wizardFrm = new WizardForm();
wizardFrm.ShowDialog();
// call property from wizard form to read user input values
strProjectPrefix = wizardFrm.ProjectPrefix;
strwebCall = wizardFrm.WebCall;
strPrefix = wizardFrm.Prefix;
strServiceName = wizardFrm.ServiceName;
strTransmit = wizardFrm.Transmit;
strService = wizardFrm.Service;
strUniqueID = wizardFrm.UniqueID;
strRecordID = wizardFrm.RecordID;
strQueued = wizardFrm.Queued;
strEmailSubject = wizardFrm.EmailSubject;
strEmailCat = wizardFrm.EmailCat;
strMethod = wizardFrm.Method;
strTemplate = wizardFrm.Template;
// sets the Values
replacementsDictionary.Add(key: "$WebCall$", value: strwebCall);
replacementsDictionary.Add(key: "$projectPrefix$", value: strProjectPrefix);
replacementsDictionary.Add(key: "$prefix$", value: strPrefix);
replacementsDictionary.Add(key: "$serviceName$", value: strServiceName);
replacementsDictionary.Add(key: "$transmitted$", value: strTransmit);
replacementsDictionary.Add(key: "$service$", value: strService);
replacementsDictionary.Add(key: "$uniqueID$", value: strUniqueID);
replacementsDictionary.Add(key: "$recordID$", value: strRecordID);
replacementsDictionary.Add(key: "$queued$", value: strQueued);
replacementsDictionary.Add(key: "$emailSubject$", value: strEmailSubject);
replacementsDictionary.Add(key: "$Category$", value: strEmailCat);
replacementsDictionary.Add(key: "$method$", value: strMethod);
replacementsDictionary.Add(key: "$uriTemplate$", value: strTemplate);
这是我想在其中一个项目中更改的价值观之一
public const string PREFIX = "$prefix$";
我需要为每个项目创建一个向导模板吗?或者有没有办法用一个向导来做到这一点?
问候
艾丹
【问题讨论】:
标签: c# visual-studio wizard