新增导航功能,节点操作支持多行操作
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports UTS_Core.DebugLog
|
||||
Imports UTS_Core.UTSModule.Production
|
||||
Imports UTS_Core.UTSModule.Test
|
||||
Imports UTS_Core.UTSModule.Test.Command
|
||||
Imports UTS_Core.UTSModule.Test.StatusMonitor
|
||||
|
||||
Namespace UTSModule.Station
|
||||
@@ -95,6 +93,7 @@ Namespace UTSModule.Station
|
||||
.Grid = GrdRowNode,
|
||||
.RtxColTip = RtxColTip}
|
||||
|
||||
AddHandler _planGrid.PlanNodeSelectChanged, AddressOf PlanGridSelectChanged
|
||||
AddHandler _planGrid.PlanNodeSelectChanged, AddressOf _nodeGrid.Grid_PlanNodeSelectChanged
|
||||
AddHandler _planGrid.RowNodeTextChanged, AddressOf _nodeGrid.Grid_RowNodeTextChanged
|
||||
|
||||
@@ -113,6 +112,10 @@ Namespace UTSModule.Station
|
||||
ApplicationLog.WriteInfoLog($"编辑页面加载完成。")
|
||||
End Sub
|
||||
|
||||
Public Sub PlanGridSelectChanged(sender As Object, ByVal e As PlanNodeSelectChangedEventArgs)
|
||||
TsBtnBackward.Enabled = _planGrid.CanBackward
|
||||
TsBtnForward.Enabled = _planGrid.CanForward
|
||||
End Sub
|
||||
|
||||
Private Function InitializeUtsApp() As Boolean
|
||||
_utsApp = UtsAppForm.CreateSingleton()
|
||||
@@ -253,31 +256,36 @@ Namespace UTSModule.Station
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnClearAll_Click(sender As Object, e As EventArgs) Handles TsBtnClearAll.Click
|
||||
_planGrid.NodeClear()
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnMoveUp_Click(sender As Object, e As EventArgs) Handles TsBtnMoveUp.Click
|
||||
Dim tmpFrisRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim tmpLastRow As Integer = GrdStationPlan.Selection.LastRow
|
||||
' gCopyWholeRows = tmpLastRow - tmpFrisRow + 1
|
||||
_planGrid.NodeMoveUp(tmpLastRow - tmpFrisRow + 1)
|
||||
If GrdStationPlan Is Nothing OrElse GrdStationPlan.Tree.SelectedNode Is Nothing Then Return
|
||||
|
||||
Dim startMoveRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim moveRows As Integer = GrdStationPlan.Selection.LastRow - GrdStationPlan.Selection.FirstRow + 1
|
||||
_planGrid.NodeMoveUp(startMoveRow, moveRows)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnMoveDown_Click(sender As Object, e As EventArgs) Handles TsBtnMoveDown.Click
|
||||
_planGrid.NodeMoveDown()
|
||||
If GrdStationPlan Is Nothing OrElse GrdStationPlan.Tree.SelectedNode Is Nothing Then Return
|
||||
|
||||
Dim startMoveRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim moveRows As Integer = GrdStationPlan.Selection.LastRow - GrdStationPlan.Selection.FirstRow + 1
|
||||
_planGrid.NodeMoveDown(startMoveRow, moveRows)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnMoveLeft_Click(sender As Object, e As EventArgs) Handles TsBtnMoveLeft.Click
|
||||
Dim tmpFrisRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim tmpLastRow As Integer = GrdStationPlan.Selection.LastRow
|
||||
_planGrid.NodeMoveLeft(tmpLastRow - tmpFrisRow + 1)
|
||||
If GrdStationPlan Is Nothing OrElse GrdStationPlan.Tree.SelectedNode Is Nothing Then Return
|
||||
|
||||
Dim startMoveRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim moveRows As Integer = GrdStationPlan.Selection.LastRow - GrdStationPlan.Selection.FirstRow + 1
|
||||
_planGrid.NodeMoveLeft(startMoveRow, moveRows)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnMoveRight_Click(sender As Object, e As EventArgs) Handles TsBtnMoveRight.Click
|
||||
Dim tmpFrisRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim tmpLastRow As Integer = GrdStationPlan.Selection.LastRow
|
||||
_planGrid.NodeMoveRight(tmpLastRow - tmpFrisRow + 1)
|
||||
If GrdStationPlan Is Nothing OrElse GrdStationPlan.Tree.SelectedNode Is Nothing Then Return
|
||||
|
||||
Dim startMoveRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim moveRows As Integer = GrdStationPlan.Selection.LastRow - GrdStationPlan.Selection.FirstRow + 1
|
||||
_planGrid.NodeMoveRight(startMoveRow, moveRows)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnOpen_Click(sender As Object, e As EventArgs) Handles TsBtnOpen.Click
|
||||
@@ -290,12 +298,19 @@ Namespace UTSModule.Station
|
||||
ApplicationLog.WriteInfoLog($"编辑页面执行流程加载完成。")
|
||||
End If
|
||||
End Using
|
||||
|
||||
_planGrid.ClearNavigation()
|
||||
TsBtnBackward.Enabled = _planGrid.CanBackward
|
||||
TsBtnForward.Enabled = _planGrid.CanForward
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnLoad_Click(sender As Object, e As EventArgs) Handles TsBtnLoad.Click
|
||||
If MsgBox("重载会将流程返回为上一次保存的流程状态,是否继续", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
|
||||
ApplicationLog.WriteInfoLog($"编辑页面执行流程重载中。")
|
||||
LoadTreeViewFormXml()
|
||||
_planGrid.ClearNavigation()
|
||||
TsBtnBackward.Enabled = _planGrid.CanBackward
|
||||
TsBtnForward.Enabled = _planGrid.CanForward
|
||||
ApplicationLog.WriteInfoLog($"编辑页面执行流程重载完成。")
|
||||
End If
|
||||
End Sub
|
||||
@@ -747,14 +762,14 @@ Namespace UTSModule.Station
|
||||
Dim tmpFrisRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim tmpLastRow As Integer = GrdStationPlan.Selection.LastRow
|
||||
Dim tempRowCount As Integer = tmpLastRow - tmpFrisRow + 1
|
||||
_planGrid.NodeAdd(tempRowCount)
|
||||
_planGrid.NodeAdd(tmpFrisRow, tempRowCount)
|
||||
End Sub
|
||||
|
||||
Private Sub tsBtnRemoveRow_Click(sender As Object, e As EventArgs) Handles tsBtnRemoveRow.Click
|
||||
Dim tmpFrisRow As Integer = GrdStationPlan.Selection.FirstRow
|
||||
Dim tmpLastRow As Integer = GrdStationPlan.Selection.LastRow
|
||||
Dim tempRowCount As Integer = tmpLastRow - tmpFrisRow + 1
|
||||
_planGrid.NodeDel(tempRowCount)
|
||||
_planGrid.NodeDel(tmpFrisRow, tempRowCount)
|
||||
End Sub
|
||||
|
||||
Private Sub MsiGridRowBlockInsert_Click(sender As Object, e As EventArgs) Handles MsiGridRowBlockInsert.Click
|
||||
@@ -765,32 +780,12 @@ Namespace UTSModule.Station
|
||||
tsBtnRemoveRow.PerformClick()
|
||||
End Sub
|
||||
|
||||
Private Sub MsiCopyNode_Click(sender As Object, e As EventArgs) Handles MsiCopyNode.Click
|
||||
GrdStationPlan.Selection.CopyData()
|
||||
Private Sub TsBtnCopyWholeRow_Click(sender As Object, e As EventArgs) Handles TsBtnBackward.Click
|
||||
_planGrid.BackwardNavigation()
|
||||
End Sub
|
||||
|
||||
Private Sub MsiCutNode_Click(sender As Object, e As EventArgs) Handles MsiCutNode.Click
|
||||
GrdStationPlan.Selection.CutData()
|
||||
End Sub
|
||||
|
||||
Private Sub MsiNodePaste_Click(sender As Object, e As EventArgs) Handles MsiNodePaste.Click
|
||||
GrdStationPlan.Selection.PasteData()
|
||||
End Sub
|
||||
|
||||
Private Sub MsiCopyWholeRow_Click(sender As Object, e As EventArgs) Handles MsiCopyWholeRow.Click
|
||||
TsBtnCopyWholeRow.PerformClick()
|
||||
End Sub
|
||||
|
||||
Private Sub MsiPasteWholeRow_Click(sender As Object, e As EventArgs) Handles MsiPasteWholeRow.Click
|
||||
TsBtnPasteWholdRows.PerformClick()
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnCopyWholeRow_Click(sender As Object, e As EventArgs) Handles TsBtnCopyWholeRow.Click
|
||||
_planGrid.MultiLineCopyData()
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnPasteWholdRows_Click(sender As Object, e As EventArgs) Handles TsBtnPasteWholdRows.Click
|
||||
_planGrid.MultiLinePasteData()
|
||||
Private Sub TsBtnPasteWholdRows_Click(sender As Object, e As EventArgs) Handles TsBtnForward.Click
|
||||
_planGrid.ForwardNavigation()
|
||||
End Sub
|
||||
|
||||
Private Sub tsBtn_CheckAction_Click(sender As Object, e As EventArgs) Handles tsBtn_CheckAction.Click
|
||||
|
||||
Reference in New Issue
Block a user