public bool SaveChanges(WizardArgs wizardArgs)
        {
            ImportWizardArgs args         = (ImportWizardArgs)wizardArgs;
            List <string>    usedBindings = new List <string>();

            foreach (var binding in args.bindings.Where(x => x.IsChecked == true))
            {
                if (this.BindingUsing(binding.hostName))
                {
                    usedBindings.Add(binding.hostName);
                }
            }

            if (usedBindings.Count > 0)
            {
                string usedBindingsMessage = string.Empty;
                foreach (string binding in usedBindings)
                {
                    usedBindingsMessage += binding + "\n";
                }

                MessageBox.Show("The following bindings are already used:\n" + usedBindingsMessage);
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 2
0
        void IWizardStep.InitializeStep(WizardArgs wizardArgs)
        {
            ImportWizardArgs args = (ImportWizardArgs)wizardArgs;

            this.websiteName.Text    = args.siteName;
            this.rootFolderPath.Text = args.rootPath;
        }
        public void InitializeStep(WizardArgs wizardArgs)
        {
            ImportWizardArgs args = (ImportWizardArgs)wizardArgs;

            // TODO: Parse bindings in (ImportWizardArgs), Fill user control from bindings dictionary, Append all bindings in hosts
            this.siteBindings.DataContext = args.bindings;
        }