📄 admin.vb
字号:
txtUserID.Text = String.Empty
optStatusActive.Checked = True
txtLogin.Text = String.Empty
txtPassword.Text = String.Empty
txtFirstName.Text = String.Empty
txtLastName.Text = String.Empty
txtEmail.Text = String.Empty
txtPhone.Text = String.Empty
cboUserGroup.SelectedIndex = -1
cboUserManager.SelectedIndex = -1
cboUserRole.SelectedIndex = -1
txtUserUpdateDate.Text = String.Empty
End Select
End Sub
Private Sub EditUndo()
'Process each control in the pnlScreens Panel
For Each objPanel As Control In pnlScreens.Controls
'If this is a Panel...
If TypeOf objPanel Is Panel Then
'Now process each control in all child
'Panels(e.g.pnlProjects, pnlGroups, pnlGroupProjects)
For Each objPanelControl As Control In objPanel.Controls
'If this is a GroupBox...
If TypeOf objPanelControl Is GroupBox Then
'Process each control in the GroupBox
For Each objControl As Control In objPanelControl.Controls
'If this is a TextBox...
If TypeOf objControl Is TextBox Then
'If it has focus...
If objControl.Focused Then
'Set a reference to it so the properties and
'methods are available
Dim objTextBox As TextBox = objControl
'See if last operation can be undone
If objTextBox.CanUndo = True Then
'Undo the last operation
objTextBox.Undo()
End If
'The work is all done so exit the procedure
Exit Sub
End If
End If
Next
End If
Next
End If
Next
End Sub
Private Sub EditCut()
'Process each control in the pnlScreens Panel
For Each objPanel As Control In pnlScreens.Controls
'If this is a Panel...
If TypeOf objPanel Is Panel Then
'Now process each control in all child
'Panels(e.g.pnlProjects, pnlGroups, pnlGroupProjects)
For Each objPanelControl As Control In objPanel.Controls
'If this is a GroupBox...
If TypeOf objPanelControl Is GroupBox Then
'Process each control in the GroupBox
For Each objControl As Control In objPanelControl.Controls
'If this is a TextBox...
If TypeOf objControl Is TextBox Then
'If it has focus...
If objControl.Focused Then
'Set a reference to it so the properties and
'methods are available
Dim objTextBox As TextBox = objControl
'See if any text has been selected
If objTextBox.SelectionLength > 0 Then
'Cut the text and place it on the clipboard
objTextBox.Cut()
End If
'The work is all done so exit the procedure
Exit Sub
End If
End If
Next
End If
Next
End If
Next
End Sub
Private Sub EditCopy()
'Process each control in the pnlScreens Panel
For Each objPanel As Control In pnlScreens.Controls
'If this is a Panel...
If TypeOf objPanel Is Panel Then
'Now process each control in all child
'Panels(e.g.pnlProjects, pnlGroups, pnlGroupProjects)
For Each objPanelControl As Control In objPanel.Controls
'If this is a GroupBox...
If TypeOf objPanelControl Is GroupBox Then
'Process each control in the GroupBox
For Each objControl As Control In objPanelControl.Controls
'If this is a TextBox...
If TypeOf objControl Is TextBox Then
'If it has focus...
If objControl.Focused Then
'Set a reference to it so the properties and
'methods are available
Dim objTextBox As TextBox = objControl
'See if any text has been selected
If objTextBox.SelectionLength > 0 Then
'Copy the text and place it on the
'Clipboard
objTextBox.Copy()
End If
'The work is all done so exit the procedure
Exit Sub
End If
End If
Next
End If
Next
End If
Next
End Sub
Private Sub EditPaste()
'Process each control in the pnlScreens Panel
For Each objPanel As Control In pnlScreens.Controls
'If this is a Panel...
If TypeOf objPanel Is Panel Then
'Now process each control in all child
'Panels(e.g.pnlProjects, pnlGroups, pnlGroupProjects)
For Each objPanelControl As Control In objPanel.Controls
'If this is a GroupBox...
If TypeOf objPanelControl Is GroupBox Then
'Process each control in the GroupBox
For Each objControl As Control In objPanelControl.Controls
'If this is a TextBox...
If TypeOf objControl Is TextBox Then
'If it has focus...
If objControl.Focused Then
'Set a reference to it so the properties and
'methods are available
Dim objTextBox As TextBox = objControl
'See if there is any text on the Clipboard
If Clipboard.GetDataObject().GetDataPresent( _
DataFormats.Text) = _
True Then
'Paste the text from Clipboard
objTextBox.Paste()
End If
'The work is all done so exit the procedure
Exit Sub
End If
End If
Next
End If
Next
End If
Next
End Sub
Private Sub EditSelectAll()
'Process each control in the pnlScreens Panel
For Each objPanel As Control In pnlScreens.Controls
'If this is a Panel...
If TypeOf objPanel Is Panel Then
'Now process each control in all child
'Panels(e.g.pnlProjects, pnlGroups, pnlGroupProjects)
For Each objPanelControl As Control In objPanel.Controls
'If this is a GroupBox...
If TypeOf objPanelControl Is GroupBox Then
'Process each control in the GroupBox
For Each objControl As Control In objPanelControl.Controls
'If this is a TextBox...
If TypeOf objControl Is TextBox Then
'If it has focus...
If objControl.Focused Then
'Set a reference to it so the properties and
'methods are available
Dim objTextBox As TextBox = objControl
'Select all available text
objTextBox.SelectAll()
'The work is all done so exit the procedure
Exit Sub
End If
End If
Next
End If
Next
End If
Next
End Sub
Private Sub newToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles newToolStripMenuItem.Click
FileNew()
End Sub
Private Sub exitToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles exitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub undoToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles undoToolStripMenuItem.Click
EditUndo()
End Sub
Private Sub cutToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles cutToolStripMenuItem.Click
EditCut()
End Sub
Private Sub copyToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles copyToolStripMenuItem.Click
EditCopy()
End Sub
Private Sub pasteToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles pasteToolStripMenuItem.Click
EditPaste()
End Sub
Private Sub selectAllToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles selectAllToolStripMenuItem.Click
EditSelectAll()
End Sub
Private Sub ProjectsToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles ProjectsToolStripMenuItem.Click
Navigate("pnlNavProjects")
pnlNavProjects.BackgroundImage = imlNavigation.Images(ImageSelected)
End Sub
Private Sub GroupsToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles GroupsToolStripMenuItem.Click
Navigate("pnlNavGroups")
pnlNavGroups.BackgroundImage = imlNavigation.Images(ImageSelected)
End Sub
Private Sub GroupProjectsToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles GroupProjectsToolStripMenuItem.Click
Navigate("pnlNavGroupProjects")
pnlNavGroupProjects.BackgroundImage = imlNavigation.Images(ImageSelected)
End Sub
Private Sub RolesToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles RolesToolStripMenuItem.Click
Navigate("pnlNavRoles")
pnlNavRoles.BackgroundImage = imlNavigation.Images(ImageSelected)
End Sub
Private Sub UsersToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles UsersToolStripMenuItem.Click
Navigate("pnlNavUsers")
pnlNavUsers.BackgroundImage = imlNavigation.Images(ImageSelected)
End Sub
Private Sub AddToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles AddToolStripMenuItem.Click
ActionAdd()
End Sub
Private Sub UpdateToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles UpdateToolStripMenuItem.Click
ActionUpdate()
End Sub
Private Sub DeleteToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles DeleteToolStripMenuItem.Click
ActionDelete()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles aboutToolStripMenuItem.Click
Dim objAbout As New About
objAbout.ShowDialog(Me)
objAbout.Dispose()
objAbout = Nothing
End Sub
Private Sub newToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles newToolStripButton.Click
FileNew()
End Sub
Private Sub cutToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles cutToolStripButton.Click
EditCut()
End Sub
Private Sub copyToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles copyToolStripButton.Click
EditCopy()
End Sub
Private Sub pasteToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles pasteToolStripButton.Click
EditPaste()
End Sub
Private Sub UndoToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles UndoToolStripButton.Click
EditUndo()
End Sub
Private Sub AddToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles AddToolStripButton.Click
ActionAdd()
End Sub
Private Sub UpdateToolStripButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles UpdateToolStripButton.Click
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -