권한 기능 업데이트

This commit is contained in:
Chikyun
2019-05-05 22:25:20 +09:00
parent 750cdf9fd0
commit 3d7b335a06
14 changed files with 206 additions and 274 deletions

View File

@@ -32,7 +32,7 @@ Public Class MakeList
Private Sub MakeList_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F12 Then
Dim msg As String = InputBox("pass")
If msg = "arin" Then UserInfo.Type = E_AuthType.Admin
If msg = "arin" Then Admin = True 'UserInfo.Type = E_AuthType.Admin
ShowMenu()
End If
End Sub
@@ -40,18 +40,20 @@ Public Class MakeList
Private Sub ShowMenu()
For Each Obj As ToolStripMenuItem In Me.mbt_addnew.DropDownItems
If Not Obj.Tag Is Nothing Then '//태그가있는 아이템의 권한을 확인한다.
If UserInfo.Type = E_AuthType.Admin Then
Obj.Visible = True
Else
Obj.Visible = False
For Each C As Char In UserInfo.Permission
' MsgBox(C & "//" & Obj.Tag.ToString)
If Obj.Tag.ToString.ToUpper = C.ToString.ToUpper Then '//태그가같다면 사용가능
Obj.Visible = True
Exit For
End If
Next
End If
Obj.Visible = True
'If Admin Then
' Obj.Visible = True
'Else
' Obj.Visible = False
' For Each C As Char In UserInfo.Permission
' ' MsgBox(C & "//" & Obj.Tag.ToString)
' If Obj.Tag.ToString.ToUpper = C.ToString.ToUpper Then '//태그가같다면 사용가능
' Obj.Visible = True
' Exit For
' End If
' Next
'End If
End If
Next
@@ -67,24 +69,24 @@ Public Class MakeList
End If
Me.view1.ASetting_Load(False)
Select Case UserInfo.Type
Case E_AuthType.Admin
Me.lb_auth.Text = "[관리자]"
Me.lb_auth.ForeColor = Color.Green
Case E_AuthType.Demo
Me.lb_auth.Text = "[임시사용자]"
Me.lb_auth.ForeColor = Color.Blue
Case E_AuthType.Normal
Me.lb_auth.Text = "[정상사용자]"
Me.lb_auth.ForeColor = Color.Black
End Select
Me.lb_auth.Text = "[사용기한:" + RunDate.ToShortDateString() + "]"
'Select Case UserInfo.Type
' Case E_AuthType.Admin
' Me.lb_auth.Text = "[사용기한:" + RunDate.ToShortDateString() + "]"
' Me.lb_auth.ForeColor = Color.Green
' Case E_AuthType.Demo
' Me.lb_auth.Text = "[임시사용자]"
' Me.lb_auth.ForeColor = Color.Blue
' Case E_AuthType.Normal
' Me.lb_auth.Text = "[정상사용자]"
' Me.lb_auth.ForeColor = Color.Black
'End Select
ShowMenu()
If UserInfo.Type = E_AuthType.Demo Then
If DemoDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then End
End If
'If UserInfo.Type = E_AuthType.Demo Then
' If DemoDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then End
'End If
Me.Text = My.Application.Info.ProductName & " Ver. {0}.{1:00}.{2}.{3}"
Me.Text = System.String.Format(Me.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)