private void btnSynchronize_Click(object sender, RoutedEventArgs e)
        {
            txtOutput.Text = "";

            var userDomain = txtUsername.Text.Split(new string[] { @"\" }, StringSplitOptions.RemoveEmptyEntries);

            this.Configuration.Target = txtDestination.Text.Split(new string[] { "," },
                StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToList<string>();
            this.Configuration.Site = txtSite.Text;
            this.Configuration.Source = txtSource.Text;
            this.Configuration.Username = (userDomain.Length > 1 ? userDomain[1] : userDomain[0]);
            this.Configuration.Domain = (userDomain.Length > 1 ? userDomain[0] : "");

            this.Configuration.SetSecurePassword(txtPassword.Password);

            WebDeploy deployment = new WebDeploy();
            deployment.OutputGenerated += deployment_OutputGenerated;
            deployment.Deploy(this.Configuration);
        }
Exemplo n.º 2
0
        private void btnSynchronize_Click(object sender, RoutedEventArgs e)
        {
            txtOutput.Text = "";

            var userDomain = txtUsername.Text.Split(new string[] { @"\" }, StringSplitOptions.RemoveEmptyEntries);

            this.Configuration.Target = txtDestination.Text.Split(new string[] { "," },
                                                                  StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToList <string>();
            this.Configuration.Site     = txtSite.Text;
            this.Configuration.Source   = txtSource.Text;
            this.Configuration.Username = (userDomain.Length > 1 ? userDomain[1] : userDomain[0]);
            this.Configuration.Domain   = (userDomain.Length > 1 ? userDomain[0] : "");

            this.Configuration.SetSecurePassword(txtPassword.Password);

            WebDeploy deployment = new WebDeploy();

            deployment.OutputGenerated += deployment_OutputGenerated;
            deployment.Deploy(this.Configuration);
        }