多用户说明 [英] Multiple User Explanation

查看:98
本文介绍了多用户说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.这可能是一个简单的问题,也可能不是一个复杂的即时消息.基本上,我制作了一个需要在运行程序时输入登录名的应用程序.每个用户都需要拥有自己的唯一空格",并保存了他们以前登录和使用该程序以来的详细信息.

我简直无法理解它是如何工作的.显然,如果有人登录后进入该程序并拥有该程序的所有功能,那么atm就会自动显示给其他人看到的程序.

如果有人可以,请向我粗略解释一下它是如何工作的,并向我介绍一个教程或向我展示一些有关它如何工作的示例.

Hi. This maybe a simple question or complicated im not sure at all. Basically I have made an application that requires a login to be entered when the program is run. Every user needs to have there own unique "Space" with there saved details from previous times they have logged in and used the program.

I simply can''t get my head around how this would work. Obviously atm if a person logs in they get into the program and have all the functionality of the program but of corse its not there unique space it would just show them the program that everyone else sees.

If any one can could someone please explain to me roughly how this works and point me to a tutorial or show me some sort of example of how this works.

Thank you for any replies it is much appreciated.

推荐答案

登录时,将保存您的userID,并且仅提取与该用户相关的信息(通常从数据库)并显示.所有用户的基本形式都是相同的,只是细节是特定的.
例如.如果创建具有窗体的应用程序,并且在装入事件中,则让它们通过对话框登录:
When you log in, your userID is saved, and only information relevant to that user is pulled (normally from a database) and displayed. The basic form is the same for all users, it is just the detail that is specific.
For example. If you create an application which has a form and in the load event you let them log in via a dialog:
frmLogin log = new frmLogin();
if (log.ShowDialog == DialogResult.OK)
   {
   if (log.UserName == "The Boss")
      {
      labGreeting = "Hello Boss! Shall we go down the pub, or actually do some work?";
      }
   else
      {
      labGreeting = string.Format("Hello {0}! Welcome back!",log.UserName);
      }
   }
else
   {
   Close();
   }

然后,如果您使用名称"Fred"或"Joe"登录,则会看到个性化消息,但是"The Boss"将获得完全不同的屏幕.

您需要自己买一本书并进行学习-在一个简单的答案中有太多的解释方法了!

Then if you log in with the name "Fred", or "Joe" you would see a personalised message, but "The Boss" would get a completely different screen.

You need to get yourself a book, and study it - there is way too much to explain in a simple answer!


这篇关于多用户说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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