毕业论文

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

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

时间:2017-04-28 09:26来源:毕业论文
{ if (!ApplicationSettings.EnableNotifyIcon !chkStartHTTP.Checked) { MessageBox.Show(Displaying Notify Icon in system tray is already disabled and you cannot disable http service. Either of one is req


        {
            if (!ApplicationSettings.EnableNotifyIcon && !chkStartHTTP.Checked)
            {
                MessageBox.Show("Displaying Notify Icon in system tray is already disabled and you cannot disable http service. Either of one is required to manage the service.", "Advanced FTP Server");
                chkStartHTTP.Checked = true;
                return;
            }
            if (txtPasvRangeFrom.Value >= (txtPasvRangeTo.Value - 10))
            {
                MessageBox.Show("Invalid PASV Port range. Atleast 10 ports must be allowed for PASSIV mode.", "Advanced FTP Server");
                return;
            }

            ApplicationSettings.FTPPort = Convert.ToInt32(txtFTPPort.Value);
            ApplicationSettings.AutoStartFTP = chkEnableFTP.Checked;
            ApplicationSettings.EnableFTPLogging = chkEnableFTPLogging.Checked;
            ApplicationSettings.MinPassvPort = (int)txtPasvRangeFrom.Value;
            ApplicationSettings.MaxPassvPort = (int)txtPasvRangeTo.Value;

            ApplicationSettings.HTTPPort = Convert.ToInt32(txtHTTPPort.Value);
            ApplicationSettings.AutoStartHTTP = chkStartHTTP.Checked;
            ApplicationSettings.UserName = txtLoginID.Text.Trim();
            ApplicationSettings.Password = txtPassword.Text;
            ApplicationSettings.SaveSettings();
            Close();
        }//保存修改后的端口号
}        
3.1.5    常规设置
常规设置模块主要是用于提供给用户一些基本的设置需求。其界面如图3-7所示。该界面设置了用户选项,这些选项包括菜单栏上的图标显示、文件夹图标的变换以及日期格式的选择。日期格式的选择通过下拉菜单实现,同时在选择日期时间格式的下方还增加了一个举例方案,以实际的日期时间来显示当前选择的格式类型,该设置是通过文本框进行显示,以便让用户在选择时能够按照自己的爱好进行设置。
 
图3-7 常规设置界面
该界面用到的主要控件如表3.7所示。
表3.7 常规设置控件
控件    控件名    控件类型    说明
1    txt    ComboBox    显示下拉菜单信息
2    lbl    Lable    文本显示
3    btn    Button    触发事件 C#的FTP服务器软件系统的设计与实现(18):http://www.youerw.com/jisuanji/lunwen_5865.html
------分隔线----------------------------
推荐内容