在C#中懒散..有人帮助 [英] suffle in c#.. someone help

查看:115
本文介绍了在C#中懒散..有人帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首次执行该应用程序时,应要求用户创建一个
管理员帐户.创建管理员帐户后,可以使用
创建新的用户帐户. 管理员帐户.管理员应该有权执行以下活动:
添加,修改,删除和查看文件
查看文件的先前版本
创建新的用户帐户
用户应有权执行以下活动:
添加,修改,删除和查看文件
查看文件的先前版本
管理员和用户的密码应以加密形式存储.您可以加密
使用以下逻辑输入密码:

when the application is executed for the first time, it should ask the user to create an
administrator account. After the administrator account is created, new user accounts can be created by using
the administrator account. The administrator should have rights to perform the following activities:
 Add, modify, delete, and view files
 View previous versions of files
 Create new user accounts
A user should have rights to perform the following activities:
 Add, modify, delete, and view files
 View previous versions of files
The passwords of the administrator and the users should be stored in an encrypted form. You can encrypt
the passwords by using the following logic:

class Program
{
  static void Main(string[] args)
  {
    bool flag = true; string pass=""; int ch=' ';
    Console.WriteLine("Enter Password: ");
    while (flag)
    {
      ch = Console.Read();
      if (ch != 13)
      {
        pass = pass + Convert.ToChar(ch + 5);
      }
      else
      {
        flag = false;
      }
    }
    Console.WriteLine(pass); Console.ReadLine();
  }
}


用户还可以用其任何先前版本替换文件的当前版本.此活动可以是
通过用用户选择的版本覆盖当前版本的内容来执行.
要维护文件版本,可以创建一个函数来创建将由
打开的文件的副本. 用户进行修改.



有人帮我用c#编码创建它.


A user can also replace the current version of a file with any of its previous versions. This activity can be
performed by overwriting the contents of the current version with the version selected by the user.
To maintain the file versions, you can create a function to create a copy of the file that will be opened by
the user for modification.



some one help me in creating it in c# coding

推荐答案

请参见
See Secure Password Authentication Explained Simply[^] for details of how to store your passwords. As to the rest, you have not explained how you intend to hold different versions of files or how you would distinguish one from another.


这是您自己的作业,
This is your own homework and you should do it. Feel free to ask specific questions here, however.


这篇关于在C#中懒散..有人帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆