public WizardWindow(ModularInputMetadata model) { InitializeComponent(); this.DataContext = model; this.VersionTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.AuthorTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.Owner = Application.Current.MainWindow; }
public void RunStarted(object automationObject, Dictionary <string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) { ModularInputMetadata model = new ModularInputMetadata(); wizardPage = new WizardWindow(model); Nullable <bool> dialogCompleted = wizardPage.ShowDialog(); if (dialogCompleted == true) { replacementsDictionary.Add("$label$", model.Label); replacementsDictionary.Add("$visibleInLauncher$", model.VisibleInLauncher ? "true" : "false"); replacementsDictionary.Add("$author$", model.Author); replacementsDictionary.Add("$version$", model.Version); replacementsDictionary.Add("$description$", model.Description); replacementsDictionary.Add("$generateExampleImplementation$", model.GenerateExampleImplementation ? "true" : "false"); } else { throw new WizardCancelledException(); } }