毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

C#的FTP服务器软件系统的设计与实现(19)

时间:2017-04-28 09:26来源:毕业论文
4 chk CheckBox 选择选项 代码如下: namespace AdvancedFTPServer { public partial class frmCommonSettings : Form { public frmCommonSettings() { InitializeComponent(); LoadSettings(); } void Loa


4    chk    CheckBox    选择选项
代码如下:
    namespace AdvancedFTPServer
{
    public partial class frmCommonSettings : Form
    {
        public frmCommonSettings()
        {
            InitializeComponent();
            LoadSettings();
        }

        void LoadSettings()
        {
            txtDateTimeFormat.Text = ApplicationSettings.DateTimeFormat;

            chkDisplayNotifyIcon.Checked = ApplicationSettings.EnableNotifyIcon;
            chkChangeFTPFoldrsIcon.Checked = ApplicationSettings.ChangeFTPFoldersIcon;
            //chkEnableAPD.Checked = ApplicationSettings.DefineFileAccessPermission;
            //chkDisplayQuickConfigure.Checked = ApplicationSettings.EnableQuickConfigMenu;
            chkAutoSendErrorReport.Checked = ApplicationSettings.AutoSendErrorReport;
            chkMoveFilesToRecycleBin.Checked = ApplicationSettings.MoveDeletedFilesToRecycleBin;
        }//载入初始化设置

        void Save_Click(object sender, EventArgs e)
        {
            if (!chkDisplayNotifyIcon.Checked && !ApplicationSettings.AutoStartHTTP)
            {
                MessageBox.Show("HTTP service is already disabled. Notify icon option is required for Management.", "Advanced FTP Server");
                chkDisplayNotifyIcon.Checked = true;
                return;
            }

            ApplicationSettings.DateTimeFormat = txtDateTimeFormat.Text;

            ApplicationSettings.EnableNotifyIcon = chkDisplayNotifyIcon.Checked;
            ApplicationSettings.ChangeFTPFoldersIcon = chkChangeFTPFoldrsIcon.Checked;
            //ApplicationSettings.DefineFileAccessPermission = chkEnableAPD.Checked;
            //ApplicationSettings.EnableQuickConfigMenu = chkDisplayQuickConfigure.Checked;
            ApplicationSettings.AutoSendErrorReport = chkAutoSendErrorReport.Checked;
            ApplicationSettings.MoveDeletedFilesToRecycleBin = chkMoveFilesToRecycleBin.Checked;

            ApplicationSettings.SaveSettings();
            Close();
        }//保存设置 C#的FTP服务器软件系统的设计与实现(19):http://www.751com.cn/jisuanji/lunwen_5865.html
------分隔线----------------------------
推荐内容