Пример #1
0
        public void resetState()
        {
            // Reset the WinSCP Version buttons to the saved pref
            int wsVer = Properties.Settings.Default.WinSCPVersion;

            if (wsVer == 3)
            {
                wsVer3RadioButton.Checked = true;
            }
            else if (wsVer == 4)
            {
                wsVer4RadioButton.Checked = true;
            }

            // Reset the WinSCP protocol buttons to the saved pref
            SessionController.Protocol wp = (SessionController.Protocol)Properties.Settings.Default.WinSCPProtocol;
            if (wp == SessionController.Protocol.FTP)
            {
                wsOptionRadioButton.Checked = true;
                wsFtpRadioButton.Checked    = true;
            }
            else if (wp == SessionController.Protocol.SCP)
            {
                wsOptionRadioButton.Checked = true;
                wsScpRadioButton.Checked    = true;
            }
            else if (wp == SessionController.Protocol.SFTP)
            {
                wsOptionRadioButton.Checked = true;
                wsSftpRadioButton.Checked   = true;
            }
            else if (wp == SessionController.Protocol.AUTO)
            {
                wsSessionInfoRadioButton.Checked = true;
            }

            // Reset the WinSCP pref protocol buttons to the saved pref
            SessionController.Protocol wpp = (SessionController.Protocol)Properties.Settings.Default.WinSCPPrefProtocol;
            if (wpp == SessionController.Protocol.SFTP)
            {
                wsprefSftpRadioButton.Checked = true;
            }
            else if (wpp == SessionController.Protocol.SCP)
            {
                wsprefScpRadioButton.Checked = true;
            }

            // Reset the WinSCP Use GSS button to the saved pref
            bool wsGss = Properties.Settings.Default.WinSCPUseGss;

            if (wsGss == true)
            {
                wsGssCheckBox.Checked = true;
            }

            // Call the wsVerRadioButton_CheckedChanged method
            // to ensure only a valid combination of protocol and
            // version is displayed
            wsVerRadioButton_CheckedChanged(this, EventArgs.Empty);
        }
Пример #2
0
        public void resetState()
        {
            // Reset the FileZilla Version buttons to the saved pref
            int fzVer = Properties.Settings.Default.FileZillaVersion;

            if (fzVer == 2)
            {
                fzVer2RadioButton.Checked = true;
            }
            else if (fzVer == 3)
            {
                fzVer3RadioButton.Checked = true;
            }

            // Reset the filezilla protocol button to the save pref
            SessionController.Protocol fp = (SessionController.Protocol)Properties.Settings.Default.FileZillaProtocol;
            if (fp == SessionController.Protocol.FTP)
            {
                fzFtpRadioButton.Checked = true;
            }
            else if (fp == SessionController.Protocol.FTPS)
            {
                fzFtpsRadioButton.Checked = true;
            }
            else if (fp == SessionController.Protocol.SFTP)
            {
                fzSftpRadioButton.Checked = true;
            }
            else if (fp == SessionController.Protocol.AUTO)
            {
                fzSessionInfoRadioButton.Checked = true;
            }
        }