From 8044d55d7b2ef859e926f6968b239fa3212552bb Mon Sep 17 00:00:00 2001 From: qin <a@163.com> Date: 星期二, 18 三月 2025 09:56:39 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs index 6cd1fc5..54c6838 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs @@ -10,6 +10,7 @@ { InitializeComponent(); this.gridView1.SetNormalView(30); + behaviorManager1.Detach<DragDropBehavior>(gridView1); } private List<FacilityViewModel> _allBindingList; @@ -120,14 +121,14 @@ private void barCkDrag_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - SetDragEnable(this.barCkDrag.Checked); - } - - //璁剧疆鎷栨嫿鍙敤鎬� - private void SetDragEnable(bool allowArag) - { - var be = this.behaviorManager1.GetBehavior<DevExpress.Utils.DragDrop.DragDropBehavior>(this.gridView1); - be.Properties.AllowDrag = allowArag; + if (barCkDrag.Checked) + { + behaviorManager1.Attach<DragDropBehavior>(this.gridView1); + } + else + { + behaviorManager1.Detach<DragDropBehavior>(gridView1); + } } private async void dragDropEvents1_DragDrop(object sender, DevExpress.Utils.DragDrop.DragDropEventArgs e) @@ -232,13 +233,13 @@ TipFormHelper.ShowWarn("涓婄Щ澶辫触锛�"); return; } - var current = this.gridView1.GetRow(rowHandle) as PlaceViewModel; + var current = this.gridView1.GetRow(rowHandle) as FacilityViewModel; if (current == null) { return; } var prevHandle = rowHandle - 1; - var prev = this.gridView1.GetRow(prevHandle) as PlaceViewModel; + var prev = this.gridView1.GetRow(prevHandle) as FacilityViewModel; if (prev == null) { return; @@ -280,13 +281,13 @@ TipFormHelper.ShowWarn("涓嬬Щ澶辫触锛�"); return; } - var current = this.gridView1.GetRow(rowHandle) as PlaceViewModel; + var current = this.gridView1.GetRow(rowHandle) as FacilityViewModel; if (current == null) { return; } var nextHandle = rowHandle + 1; - var next = this.gridView1.GetRow(nextHandle) as PlaceViewModel; + var next = this.gridView1.GetRow(nextHandle) as FacilityViewModel; if (next == null) { return; -- Gitblit v1.9.3