if (txtPassword.Text.Length < 2) Message += "Password cannot be lesser than 2 chars\n";
            if (!System.IO.Directory.Exists(txtStartUpPath.Text)) Message += "The selected root path dose not exists\n";

            string PermissionSet = string.Empty;

            PermissionSet += (chkAllowStoreFiles.Checked) ? "1" : "0";
            PermissionSet += (chkAllowStoreFolders.Checked) ? "1" : "0";
            PermissionSet += (chkAllowRenameFiles.Checked) ? "1" : "0";
            PermissionSet += (chkAllowRenameFolders.Checked) ? "1" : "0";
            PermissionSet += (chkAllowDeleteFiles.Checked) ? "1" : "0";
            PermissionSet += (chkAllowDeleteFolders.Checked) ? "1" : "0";
            PermissionSet += (chkAllowCopyFiles.Checked) ? "1" : "0";

            if (PermissionSet.IndexOf('1') == -1) Message += "The user requires atleast a single permission.\n";

            PermissionSet += (chkAllowViewHiddenFiles.Checked) ? "1" : "0";
            PermissionSet += (chkAllowViewHiddenFolders.Checked) ? "1" : "0";

            if (Message.Length != 0)
            {
                MessageBox.Show(Message, "Advanced FTP Server");
                return;
            }//保存添加用户并判断添加信息

            if (OldUserName == null) //增加新用户            {
                if (!ApplicationSettings.CreateFTPUser(txtUserName.Text, txtPassword.Text, txtStartUpPath.Text, PermissionSet, chkEnableUser.Checked))
                {
                    MessageBox.Show("User with the specified name already exists. Please specify different User Name", "Advanced FTP Server");
                    return;
                }
            }
            else // 编辑用户
            {
                if (!ApplicationSettings.EditUser(OldUserName, txtUserName.Text, txtPassword.Text, txtStartUpPath.Text, PermissionSet, chkEnableUser.Checked))
上一篇:造币机械生产车间信息管理系统分析与研究
下一篇:C#的家庭理财系统软件设计+ER图

基于Apriori算法的电影推荐

PHP+IOS的会议管理系统的设计+ER图

数据挖掘在电子商务中的应用

数据挖掘的主题标绘数据获取技术与实现

基于PageRank算法的网络数据分析

基于神经网络的验证码识别算法

基于网络的通用试题库系...

医院财务风险因素分析及管理措施【2367字】

中国学术生态细节考察《...

C#学校科研管理系统的设计

神经外科重症监护病房患...

承德市事业单位档案管理...

国内外图像分割技术研究现状

公寓空调设计任务书

志愿者活动的调查问卷表

10万元能开儿童乐园吗,我...

AT89C52单片机的超声波测距...