Esempio n. 1
0
        private void PublishSetting()
        {
            FtpConfigurationDialog dialog = new FtpConfigurationDialog();

            if (!this.ftpConfiguration.IsEmpty)
            {
                dialog.FtpServer = this.ftpConfiguration.Host;
                dialog.Directory = this.ftpConfiguration.Directory;
                dialog.Port      = this.ftpConfiguration.Port;
                dialog.Username  = this.ftpConfiguration.UserName;

                if ((this.ftpConfiguration.Password != null) || (this.ftpConfiguration.Password.Length != 0))
                {
                    dialog.StorePassword = true;
                    dialog.Password      = this.ftpConfiguration.Password;
                }
            }

            if (dialog.Run())
            {
                this.ftpConfiguration.Host      = dialog.FtpServer;
                this.ftpConfiguration.UserName  = dialog.Username;
                this.ftpConfiguration.Password  = dialog.Password;
                this.ftpConfiguration.Directory = dialog.Directory;
                this.ftpConfiguration.Port      = dialog.Port;
            }
        }
Esempio n. 2
0
        private void PublishSetting()
        {
            FtpConfigurationDialog dialog = new FtpConfigurationDialog();
            if (!this.ftpConfiguration.IsEmpty)
            {
                dialog.FtpServer = this.ftpConfiguration.Host;
                dialog.Directory = this.ftpConfiguration.Directory;
                dialog.Port = this.ftpConfiguration.Port;
                dialog.Username = this.ftpConfiguration.UserName;

                if ((this.ftpConfiguration.Password != null) || (this.ftpConfiguration.Password.Length != 0))
                {
                    dialog.StorePassword = true;
                    dialog.Password = this.ftpConfiguration.Password;
                }
            }

            if (dialog.Run())
            {
                this.ftpConfiguration.Host = dialog.FtpServer;
                this.ftpConfiguration.UserName = dialog.Username;
                this.ftpConfiguration.Password = dialog.Password;
                this.ftpConfiguration.Directory = dialog.Directory;
                this.ftpConfiguration.Port = dialog.Port;
            }
        }