Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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();
            }
        }