菜单中的帐户? [英] Accounts in menustrip?

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

问题描述

我遇到了以下问题,
我的应用程序具有很多(继承性)表单,为了导航这些表单,我使用了一个带有菜单栏的主窗体,其中包含所有链接.

当然,只要我不喜欢它,这个pricilpe原理就可以正常工作.

但是现在出现了以下问题,我需要在程序中创建用户",才能登录等.
当然,每种类型"的用户都有权利,他们有权享有何种特权等.

但是如何更改"mainform"中的菜单条,以反映当前用户已访问的te形式?


亲切的问候,

一个陷入困境的家伙

(而且我知道我可以制作多个菜单条,并隐藏那些不使用的菜单条,但是由于权利的巨大限制,那当然不会这样做)

I''ve got the following problem,
My application has a lot of (inheritance)forms, and to navigate those forms, i use one main form with a menustrip, that contains al the links.

And ofcourse this pricilpe principle works fine as long i don''t mess with it.

But now the following problem arises, i need to make "users" in my program, that can log in etc.
And of course every "type" of user has rights, to what froms they have exces etc.

But how can i change the menustrip in the "mainform", to reflect te forms that the current user has acces to?


With kind regards,

a troubled guy

(and i know i can make multiple menustrips, and hide the ones not in use, but that, of course, won''t do, becouse of the sheer ammount of rights)

推荐答案

用户转到时可以更改每个菜单条项目列表:如果您处理 ^ ]事件,那么您可以在用户访问权限时动态设置权限.然后只需禁用或隐藏不适当的主菜单列表项.
Each menu strip item list can be changed when the user goes to open it: If you handle the ToolStripDropDownItem.DropDownOpening[^] event then you can set the rights dynamically when the user goes to access them. Then just disable or hide the inappropriate main menu list items.


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

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