C#的FTP服务器软件系统的设计与实现(19)
时间:2017-04-28 09:26 来源:毕业论文 作者:毕业论文 点击:次
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(); }//保存设置 (责任编辑:qin) |