毕业论文

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

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

时间:2017-04-28 09:26来源:毕业论文
char[] Permissions = PermissionSet.ToCharArray(); chkAllowStoreFiles.Checked = Permissions[0] == 1; chkAllowStoreFolders.Checked = Permissions[1] == 1; chkAllowRenameFiles.Checked = Permissions[2] ==



                char[] Permissions = PermissionSet.ToCharArray();
                chkAllowStoreFiles.Checked = Permissions[0] == '1';
                chkAllowStoreFolders.Checked = Permissions[1] == '1';
                chkAllowRenameFiles.Checked = Permissions[2] == '1';
                chkAllowRenameFolders.Checked = Permissions[3] == '1';
                chkAllowDeleteFiles.Checked = Permissions[4] == '1';
                chkAllowDeleteFolders.Checked = Permissions[5] == '1';
                chkAllowCopyFiles.Checked = Permissions[6] == '1';
                chkAllowViewHiddenFiles.Checked = Permissions[7] == '1';
                chkAllowViewHiddenFolders.Checked = Permissions[8] == '1';
            }//为用户设置权限的初始值,1为打勾。
            else
            {
                MessageBox.Show("The user with the name " + OldUserName + " dose not exist.", "Advanced FTP Server");
                DialogResult = DialogResult.OK;
                Close();
            }
        }

        void BrowseRootFolder_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog FBD = new FolderBrowserDialog();
            FBD.Description = "Select the Root Folder for the user";
            FBD.ShowNewFolderButton = true;
            FBD.SelectedPath = txtStartUpPath.Text;
            if (FBD.ShowDialog() == DialogResult.Cancel) return;
            txtStartUpPath.Text = FBD.SelectedPath;
        }//选择启动路径

        void SaveUser_Click(object sender, EventArgs e)
        {
            txtUserName.Text = txtUserName.Text.Trim();
            txtStartUpPath.Text = txtStartUpPath.Text.Trim();

            string Message = string.Empty;

            if (txtUserName.Text.Length < 2) Message = "User Name cannot be lesser than 2 chars\n "; C#的FTP服务器软件系统的设计与实现(9):http://www.youerw.com/jisuanji/lunwen_5865.html
------分隔线----------------------------
推荐内容