Search Images Maps Play YouTube News Gmail Drive More »
Sign in
Screen reader users: click this link for accessible mode. Accessible mode has the same essential features but works better with your reader.

Patents

  1. Advanced Patent Search
Publication numberCN102591639 A
Publication typeApplication
Application numberCN 201110419758
Publication date18 Jul 2012
Filing date14 Dec 2011
Priority date14 Dec 2011
Also published asCN102591639B
Publication number201110419758.5, CN 102591639 A, CN 102591639A, CN 201110419758, CN-A-102591639, CN102591639 A, CN102591639A, CN201110419758, CN201110419758.5
Inventors陆明添
Applicant广东威创视讯科技股份有限公司
Export CitationBiBTeX, EndNote, RefMan
External Links: SIPO, Espacenet
Method for setting permission of Windows folders
CN 102591639 A
Abstract
The invention provides a method for setting permission of Windows folders. The method includes the steps: displaying a Windows folder system in a tree-shaped structure; adding a control in front of the name of each folder; and leading the controls to represent folders with set permission and folders without set permission in forms. The method for setting the permission of the Windows folders has the advantages that a user can clearly know and identify the folders with the set permission and the folders without the set permission, and accordingly is prevented from repeatedly setting permission for the folders with the set permission during permission setting, the method is flexible and convenient, execution efficiency of programs is remarkably improved, and excellent experience is brought for the user.
Claims(7)  translated from Chinese
1. 一种设置Windows文件夹权限的方法,其特征在于,包括以下步骤:以树形结构显示Windows文件夹系统,并在每个文件夹名字前面添加一个控件,该控件将被设置过权限的文件夹与未被设置权限的文件夹以不同的形式体现出来。 A Windows folder permissions Sets, characterized in that it comprises the following steps: a tree structure display the Windows folder system, and add a control to the front of each folder name, the control will be set too permissions folders and folder permissions are not set in different forms reflected.
2.根据权利要求I所述的设置Windows文件夹权限的方法,其特征在于,所述显示Windows文件夹系统的过程具体包括:使用WPF中的TreeView控件来显示Windows文件夹系统中的文件夹信息。 2. The method according to the setting Windows file folder permissions according to claim I, wherein the display process Windows folder system include: the use of WPF TreeView control to display the Windows folder system folder information .
3.根据权利要求2所述的设置Windows文件夹权限的方法,其特征在于,所述在每个文件夹名字前添加的控件为CheckBox控件。 3. The folder permissions Sets Windows file as claimed in claim 2, wherein said control before each folder name added to the CheckBox control.
4.根据权利要求3所述的设置Windows文件夹权限的方法,其特征在于,所述CheckBox 控件的属性IsChecked 值包括:True、False 以及NULL ;当文件夹及其所有子文件夹、文件均已被用户进行权限设置时,所述属性IsChecked 值为True ;当文件夹及其所有子文件夹、文件未被设置权限时,所述属性IsChecked值为False ;当文件夹有部分子文件夹被用户进行权限设置时,所述属性IsChecked值为NULL。 4. Set Windows file folder permissions 3, wherein the method claims, characterized in that the value of the property IsChecked CheckBox controls include: True, False, and NULL; when the folder and all subfolders, files are when set user permissions, the property IsChecked is True; when the folder and all subfolders, file permissions are not set, the attribute value IsChecked False; when the folder has subfolders part by user When permission settings, the property IsChecked value is NULL.
5.根据权利要求4所述的设置Windows文件夹权限的方法,其特征在于,还包括步骤: 每次程序退出时,将当前树形结构的文件夹权限改变信息保存为一个文件,然后在下次程序启动时根据该文件保存的信息对TreeView控件的显示内容进行初始化,所述文件中保存有TreeView中文件夹状态为NULL或者为True的文件夹绝对路径。 5. Set Windows file folder permissions 4, wherein the method of claim, wherein further comprising the step of: each time the program exits, the files in the current folder permissions changes in the tree structure to save the information into a file, then the next time initialized when the program starts according to the document information stored in the TreeView control displays the contents of the file in the folder TreeView preservation status is NULL or the True folder absolute path.
6.根据权利要求1-5任意一项所述的设置Windows文件夹权限的方法,其特征在于,在对文件夹进行权限设置时,首先遍历其所有子文件夹,然后对该文件夹进行权限设置。 According to any of claims 1 to 5 according to one set Windows file folder permissions, characterized in that folder when you set permissions, first through all its sub-folders, then the folder permissions settings.
7.根据权利要求6所述的设置Windows文件夹权限的方法,其特征在于,所述遍历所有子文件夹的过程具体包括:使用直接枚举文件夹的所有子文件夹的方法来遍历所有子文件夹。 7. Setting up Windows file folder permissions 6, wherein the method of claim, wherein the process through all subfolders, including: the use of all methods to enumerate subfolders of the folder directly to traverse all the child folder.
Description  translated from Chinese

设置Windows文件夹权限的方法 Setting up Windows file folder permissions method

技术领域 Technical Field

[0001] 本发明涉及交互显示技术领域,尤其涉及一种设置Windows文件夹权限的方法。 [0001] The present invention relates to the field of interactive display technology, in particular Windows folder permissions involves a setting. 背景技术 Background

[0002] 随着人们保密意识的加强,对文件进行权限设置已被越来越多的人所重视。 [0002] With the strengthening of people's sense of confidentiality, the file permissions have been more and more people paying attention. 目前, 大部分对Windows文件夹进行权限设置的方法都存在一个缺点,那就是设置完权限后无迹可寻,用户无法一目了然的得知哪些文件夹是已经被设置过权限的、哪些文件夹又是未被设置过权限的,这样容易导致用户忘记自己曾经做过的操作,用户体验很差。 Currently, most methods for Windows folder permission settings there is a drawback, and that is after you permission settings without trace, the user can not know at a glance which folder permissions have been set too, which folders and is not set too permissions, so easily lead users to forget what they have done, the user experience is poor.

[0003] 而且,采用现有技术对Windows文件夹进行权限设置的时候还会存在诸如不够灵活和效率比较低的问题。 [0003] Moreover, also exist, such as inflexible and relatively low efficiency problems of the prior art Windows folder permissions set time. 例如:用户需要对文件夹A的子文件夹进行权限设置,当文件夹A 的所有子文件夹都被设置权限后,用户希望文件夹A也具有与其子文件夹相同的权限。 For example: A user needs to folders sub folder permission settings, when all sub-folders A folder permissions are set, users want the folder A folder can have its children the same rights. 如果使用一般的权限设置方法,由于无法识别文件夹是否已经被设置过权限,因此需要对文件夹A及其所有子文件夹重新进行权限设置,该操作无疑存在大量重复的权限设置,这样一来大大地降低了程序执行效率。 If you use a general permission settings method, since not recognize whether the folder has been set too permissions, so the need for a folder and all its subfolders A re-permission settings, this operation is no doubt there are a lot duplicate permissions, so that greatly reducing the efficiency of the implementation process. 另外一种情况就是当文件夹A有部分子文件夹已经被设置权限,当用户直接对文件夹A进行权限设置时,由于无法得知具体哪些子文件夹已经被设置过权限,因此程序会对这部分已经被设置过权限的文件夹再次进行权限设置,这种情况下同样会存在大量的重复操作,严重影响了程序的执行效率,浪费用户时间。 Another case is when there is some sub-folder A folder permissions have been set, when the user directly to the folder A set permissions, inability to know exactly which sub-folders have been set too permissions, so the program will This section has been set too permissions folder permissions again, as there will be a lot of repeat such a case, seriously affecting the performance of programs, waste user time.

[0004] 因此,如何为用户提供一种一目了然、灵活方便并且具有较高效率的设置Windows 文件夹权限的方法,成为亟待解决的问题。 [0004] Therefore, how to provide the user a clear, flexible and has a high efficiency of the Windows folder permissions setting methods, become a serious problem.

发明内容 DISCLOSURE

[0005] 为解决上述问题,本发明提供一种设置Windows文件夹权限的方法,能够将被设置过权限的文件夹与未被设置过权限的文件夹进行有效区分,从而提高设置Windows文件夹权限的效率。 [0005] To solve the above problems, the present invention provides a method of Windows folder permissions settings can be set through the folder permissions and has not been set folder permissions effectively distinguish, thereby improving the setting Windows folder permissions efficiency.

[0006] 为实现上述目的,本发明采用如下技术方案: [0006] To achieve the above object, the present invention adopts the following technical scheme:

[0007] 一种设置Windows文件夹权限的方法,包括以下步骤:以树形结构显示Windows文件夹系统,并在每个文件夹名字前面添加一个控件,该控件将被设置过权限的文件夹与未被设置权限的文件夹以不同的形式体现出来。 [0007] A method for Windows folder permissions set up, comprising the steps of: a tree structure display the Windows folder system, and add a control to the front of each folder name, the control will be set through folders and permissions not set folder permissions manifested in different forms.

[0008] 本发明的设置Windows文件夹权限的方法,通过在Windows文件夹名字前面添加一个控件以将被设置过权限的文件夹与未被设置权限的文件夹用不同的形式体现出来,使用户可以一目了然的知道哪些文件夹已经被设置过权限、哪些文件夹尚未被设置权限,这样一来可以有效避免用户在进行权限设置时对已经设置过权限的文件夹进行重复设置,灵活方便,且明显提高了程序的执行效率,给用户带来良好的体验。 [0008] The present invention set up Windows file folder permissions method by prefixing the name of the Windows folder to add a control to be set up through the folder permissions are not set permissions of files and folders manifested in different forms, allowing users You can know at a glance which folders have been set too permissions, which folder permissions have not been set, so that the user can avoid making the permissions settings already set folder permissions duplication, flexible, and significantly improve the performance of programs, giving users a good experience.

附图说明 Brief Description

[0009] 图I为权限设置前的初始效果示意图;[0010] 图2为权限设置后的效果示意图; [0009] FIG. I is the initial effect permissions schematic front; [0010] FIG. 2 is a schematic diagram of the effect of permission settings;

[0011] 图3为更进一步地权限设置后的效果示意图; [0011] FIG. 3 is the effect of further permissions after schematic;

[0012] 其中,颜色最深的锁的状态为NULL,灰色锁的状态为True,打开的锁的状态为 [0012] where the darkest lock status of NULL, gray lock state is True, the state of the lock is open

False。 False.

具体实施方式 DETAILED DESCRIPTION

[0013] 本发明提供一种设置Windows文件夹权限的方法,能够解决现有技术中对Windows文件夹进行权限设置时不能一目了然的得知哪些是被设置过权限的文件夹、哪些是未被设置权限的文件夹以及设置权限不够灵活方便并且效率比较低的问题。 [0013] The present invention provides a method of Windows folder permissions settings, can solve not know at a glance what is set folder permissions over the prior art for Windows folder permission settings, which is not set file and folder permissions set permissions insufficient flexibility and efficiency is relatively low.

[0014] 本发明的设置Windows文件夹权限的方法,包括以下步骤: [0014] The present invention set up Windows file folder permissions, comprising the steps of:

[0015] 以树形结构显示Windows文件夹系统,并在系统中的每个文件夹名字前面添加一个控件,该控件将被设置过权限的文件夹与未被设置权限的文件夹以不同的形式体现出来。 [0015] The tree structure display the Windows folder system, and each file in the system folder name in front to add a control that will be set through the folder permissions are not set permissions of files and folders in different forms reflected.

[0016] 以树形结构显示Windows文件夹系统的好处是使系统的结构清楚,识别度高,后期管理也比较容易。 [0016] The tree structure benefits of Windows folder system structure of the system is to make clear, to identify high, the subsequent management easier. 另外作为一个较好的实施例,在进行程序设计时,可以使用WPF (Windows Presentation Foundation)应用程序中的TreeView 控件来显不Windows 文件夹系统中的文件夹信息。 In addition, as a preferred embodiment, during programming, you can use WPF (Windows Presentation Foundation) application was not TreeView control to the Windows folder system folder information. 用户可通过树形结构选择文件夹进行权限设置,被设置过权限的文件夹在树形结构中将以不同于未被设置权限文件的形式体现出来,这样可以有效避免用户在进行权限设置时对已经设置过权限的文件夹进行重复设置。 The user can select a folder tree structure set permissions, the permissions are set through the folders in the tree structure will be different from the file permissions are not set in the form of reflected, which can effectively prevent the user permission settings for making already set folder permissions set to repeat.

[0017] 优选的,所述在每个文件夹名字前添加的控件可以为CheckBox控件。 [0017] Preferably, the first name in front of each folder can add controls CheckBox control. 该CheckBox 控件的属性IsChecked值包括:True、False以及NULL。 The value of this attribute IsChecked CheckBox control include: True, False, and NULL. 我们对其进行定义如下: We define it as follows:

[0018] 当文件夹及其所有子文件夹、文件均已被用户进行权限设置时,所述属性IsChecked 值为True ; [0018] When the folder and all subfolders, files have been set user permissions, the property IsChecked is True;

[0019] 当文件夹及其所有子文件夹、文件未被设置权限时,所述属性IsChecked值为False ; [0019] When the folder and all subfolders, file permissions are not set, the value of the property IsChecked False;

[0020] 当文件夹有(且仅有)部分子文件夹被用户进行权限设置时,所述属性IsChecked 值为NULL。 [0020] When the folder has (and only) part of the sub folder is set user permissions, the property IsChecked value is NULL.

[0021] 本发明的设置Windows文件夹权限的方法,还可以包括如下步骤:TreeView初始化,即在每次程序退出时,将当前树形结构的文件夹权限改变信息保存为一个文件,然后在下次程序启动时根据该文件保存的信息对TreeView控件的显示内容进行初始化,上述文件中只保存有TreeView中文件夹状态为NULL或者为True的文件夹绝对路径。 [0021] The present invention set up Windows file folder permissions method may further comprise the steps of: TreeView initialization, that each time the program exits, the files in the current folder permissions changes in the tree structure to save the information into a file, then the next time initialized when the program starts according to the document information stored in the TreeView control displays the contents of the above documents only preserved the status TreeView folder NULL is True or absolute path to the folder. 初始化前, TreeView的显示内容为空,初始化后,TreeView中能够显示系统的文件夹目录以及用户最近一次的对文件夹进行权限设置的信息。 Before initialization, TreeView display is empty, after initialization, TreeView can display the file in the folder directory system and the user the most recent information on the folder permission settings.

[0022] 为了进一步提高程序启动效率,程序启动时一般只会在TreeView中生成两级目录,然后再根据信息保存文件还原用户操作信息。 [0022] In order to further improve the efficiency of the program starts, the program starts usually only generate two directories in the TreeView, and then restore the user operation information based on the information saved file. 方法如下:如果从信息保存文件中得知该文件夹状态应为NULL,程序就会把其在TreeView中状态改为Null然后遍历其子文件夹,如果其子文件夹有文件状态应为NULL就继续遍历下一级,否则返回上一级目录继续遍历,以此类推,实际上是一个递归过程。 As follows: If the folder that status from the information stored in the file should be NULL, the program will bring its status changed to Null in the TreeView and then traverse its sub-folders, sub-folders if it has the file status should be NULL on continue the walk to the next level, or go back one level to continue to traverse, and so, in fact, is a recursive process. 当在此遍历过程中发现文件夹的权限应该为True就会把其在TreeView中的状态改为True,其所有子文件夹在TreeView中的状态也为True。 When the permissions on the folder found will be True to its status in the TreeView to True in this traversal, all its subfolders are also in a state in TreeView to True. [0023] TreeView初始化后,用户在TreeView中选择需要设置权限的文件夹或者选择需要撤销权限的文件夹后点击权限设置按钮就开始进行权限的设置(用户需预先定义好需要设置的权限类型)。 [0023] After the TreeView initialization, set permissions for the user to select the desired folder or select TreeView need revoke privileges after clicking the folder permission settings button to begin to set permissions (user needs a good pre-defined type of permissions to be set). 为了进一步提高权限设置的灵活性,在对文件夹进行权限设置时,不能够把该权限设置也应用于其子文件夹和子对象,这时首先需要遍历其所有子文件夹然后对该文件夹进行权限设置。 To further enhance the flexibility of permission settings when set permissions on a folder, not able to set the permissions also apply to its sub-folders and sub-objects, then you first need to traverse all its sub-folders then this folder permission settings.

[0024] 权限设置开始时,程序会首先把当前的TreeView文件夹状态与上一次的权限设置后的TreeView文件夹状态进行比较。 When the [0024] privilege set the start, the program will first put the current file status TreeView TreeView folder permissions settings with the previous state after the folder for comparison. 具体比较情况如下: Specific comparison as follows:

[0025] ①当前文件夹状态为NULL,上一次设置后状态为True时,继续遍历该文件夹的子文件夹,并找出所有当前状态为False的文件夹,撤销这些文件夹(包括其所有子文件夹) 的权限设置;如果上一次状态为NULL,则继续遍历其子文件夹;如果上一次状态为False, 继续遍历该文件夹的子文件夹,并找出所有当前状态为True的子文件夹,然后对它们(包括其所有子文件夹)进行权限设置; [0025] ① the current folder state is NULL, the previous state after setting True, continue to traverse subfolders of that folder, and find all the current status of the False folder, undo these folders (including all subfolders) permissions; if the last state is NULL, then continue to traverse its subfolders; if the last state is False, continue to traverse subfolders of that folder, and find out the current status of all sub-True folder, then they (including all its subfolders) permission settings;

[0026] ②当前文件夹A状态为True,上一次设置后状态为NULL时,继续遍历该文件夹的子文件夹,如果其还有子文件夹状态为NULL,则继续遍历,此实际上为一递归过程。 When the [0026] ② current folder A state is True, after the last set state is NULL, continue to traverse subfolders of the folder, if it also subfolders state is NULL, then continue the walk, this actually a recursive process. 找出所有以前状态为False的子文件夹,对这些文件夹(包括其所有子文件夹)进行权限设置。 Find out all the previous state is False subfolders of these folders (including all its subfolders) set permissions. 另外此时还会判断该文件夹A是否已经被设置权限,如果没有则对该文件夹A进行权限设置; 如果上一次状态为False,则对该文件夹(包括其所有子文件夹)进行权限设置; Also at this time will determine whether the folder permissions A has been set. If not, the folder permissions A set; if the last state is False, then the folder (including all its subfolders) permission Set;

[0027] ③文件夹A如果当前状态为False,并且以前状态为True,则撤销这些文件夹的权限设置;如果以前状态为NULL,则继续遍历其子文件夹,找出所有以前为True状态的子文件夹,然后撤销这些子文件夹的权限设置,此时还会判断该文件夹A是否被设置权限,如果是则撤销其的权限设置。 [0027] ③ Folder A if the current state is False, and the previous state is True, then revoke privileges to set these folders; if the previous state is NULL, then continue to traverse its subfolders, find all the formerly state True subfolders, then revoke these privileges subfolders set, then the folder will determine whether A is set permissions, if it is then revoke its permission settings.

[0028] 为了进一步提高对文件夹(包括其所有子文件夹)进行权限设置的效率,在遍历所有子文件夹进行权限设置时,可以使用能直接枚举文件夹的所有子文件夹的方法、而不是写一个递归函数(例如GetDirectories ()和GetFilesO这类函数)去遍历所有子文件夹,这样能够大大地提高遍历文件夹的效率。 [0028] In order to further enhance the folder (including all its subfolders) is efficient privilege settings, traversing all sub-folders permissions, you can use all the methods can be directly enumerate folder subfolders, Instead of writing a recursive function (for example GetDirectories () and GetFilesO these functions) to traverse all sub-folders, this can greatly improve the efficiency of traversing the folder. 可以使用以下函数进行遍历: You can use the following functions to traverse:

[0029] foreach(string folder in Directory. GetFiles (p, " * " , SearchOption. AllDirectories)) [0029] foreach (string folder in Directory. GetFiles (p, "*", SearchOption. AllDirectories))

[0030] { [0030] {

[0031] } [0031]}

[0032] 下面结合附图和具体的实施例来对本发明的方案作进一步的描述: [0032] The accompanying drawings and the following specific examples further description of the present invention:

[0033]启动Windows文件夹权限设置程序,如图I所不,假设当前所有文件夹状态均为False (本实施例中以文件夹名字前面那把锁的几种不同状态来区分文件夹是否有被设置权限,其中,颜色最深的锁的状态代表该文件夹状态为NULL,灰色锁的状态代表该文件夹状态为True,打开的锁的状态代表该文件夹状态为False),可见初始情况下,各文件夹名字面前的那把锁均为打开状态,任意选中几个文件夹使其状态为True,然后点击权限设置按钮,程序开始对这些文件夹以及所有子文件夹进行权限设置。 [0033] Start Windows folder privileges setup, as I do not, assume that the current state of all the folders are False (in this embodiment to the front of the folder name in several different states that lock to distinguish whether the folder was set permissions, where the darkest lock state represents the folder status is NULL, gray lock state represents the folder state is True, the state of the lock to open the folder representing the state is False), shows initial case Each folder in front of the name that lock are open, any selected several folders its state is True, then click on the permission settings button, the program began to these folders and all sub-folders permissions. 权限设置完毕后,检查这些文件夹的权限信息,发现已经按要求改变。 After the permissions set up, check the permissions information about these folders, findings have changed as required. 然后关闭权限设置程序,当再次打开程序时,如图2 所示,发现由上到下的八把锁的状态由之前的全部打开变成了第I把锁为黑色锁(颜色最深,表不NULL)、第3、4、5、7把锁成为闭合的灰色锁(表不True),则表明米用本发明的方法进行操作后,能够正确显示之前设置的文件夹状态,而且一目了然。 Then turn off the permissions setup, when you open the program again, as shown in Figure 2, the discovery of eight from top to bottom by the state of the lock fully open before I became the first black lock to lock (the darkest, the table does not NULL), the first 3,4,5,7 gray locks into the closed lock (table not True), then the table after 明米 method of the present invention to operate, can file folders before setting the state, but at a glance display correctly.

[0034] 可以进一步验证本发明方法的正确性。 [0034] The present invention may further verify the correctness of the method. 首先启动Windows文件夹权限设置程序, 假设初始状态如图2所示,采用本发明的方法进行权限修改后关闭程序,然后再次打开程序进行查看,发现结果如图3所示,经验证,文件权限修改成功,并且没有重复修改文件夹权限,效率比较高,用户体验也比较好。 First start the Windows folder permissions setup, assuming that the initial state shown, after the method of the present invention have permission to modify the program as shown in closed and open the program to view again and found the results shown in Figure 3, proven, file permissions Modify success, and there are no duplicate modify folder permissions, more efficient, better user experience.

[0035] 通过以上方案可以看了,本发明的设置Windows文件夹权限的方法,通过在Windows文件夹名字前面添加一个控件以将被设置过权限的文件夹与未被设置权限的文件夹用不同的形式体现出来,使用户可以一目了然的知道哪些文件夹已经被设置过权限、哪些文件夹尚未被设置权限,这样一来可以有效避免用户在进行权限设置时对已经设置过权限的文件夹进行重复设置,灵活方便,且明显提高了程序的执行效率,给用户带来良好的体验。 [0035] The above scheme can be read, set the Windows file folder permissions of the invention method, the Windows folder name in front add a control to be set through the folder permissions are not set permissions to folders with different The form reflected, allowing users to know at a glance which folders have been set too permissions, which folder permissions have not been set, so that you can effectively avoid already set folder permissions for the user performing repetitive permissions settings, flexibility, and significantly improve the performance of programs, giving users a good experience.

[0036] 以上所述的本发明实施方式,并不构成对本发明保护范围的限定。 Or more embodiments of the present invention [0036] said does not constitute a limitation upon the scope of the invention. 任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的权利要求保护范围之内。 Any modifications within the spirit and principles of the present invention made, equivalent replacement and improvement, should be included in the protection of the rights of the present invention of claim scope.

Patent Citations
Cited PatentFiling datePublication dateApplicantTitle
CN1553379A *29 May 20038 Dec 2004杨子江Attribute catalogue structure viewing method
CN101359355A *2 Aug 20074 Feb 2009芯微技术(深圳)有限公司Method for raising user's authority for limitation account under Windows system
US6321334 *15 Jul 199820 Nov 2001Microsoft CorporationAdministering permissions associated with a security zone in a computer system security model
US20050246352 *30 Apr 20043 Nov 2005Microsoft CorporationProperty tree for metadata navigation and assignment
US20090064285 *3 Mar 20085 Mar 2009Fuji Xerox Co., Ltd.Electronic information management device, computer readable recording medium, method for controlling access, and method for transferring data
Classifications
International ClassificationG06F9/44, G06F17/30
Legal Events
DateCodeEventDescription
18 Jul 2012C06Publication
19 Sep 2012C10Entry into substantive examination
24 Dec 2014C14Grant of patent or utility model
1 Feb 2017EXPYTermination of patent right or utility model