From be53dc839f3698dd196ecbb002ea190d5bb7dabb Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 27 二月 2025 10:50:10 +0800 Subject: [PATCH] 销售 --- DevApp/Gs.DevApp/ToolBox/DragResizeHelp.cs | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/DragResizeHelp.cs b/DevApp/Gs.DevApp/ToolBox/DragResizeHelp.cs index f622ba7..a2f3b9b 100644 --- a/DevApp/Gs.DevApp/ToolBox/DragResizeHelp.cs +++ b/DevApp/Gs.DevApp/ToolBox/DragResizeHelp.cs @@ -21,7 +21,7 @@ private DevExpress.XtraBars.Docking.DockPanel dockPanel1; private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; private System.ComponentModel.IContainer components = null; - private ToolTip toolTip; + //private ToolTip toolTip; #endregion #region Inner Object private enum EnumMousePointPosition @@ -40,7 +40,7 @@ #endregion public DragResizeHelp(DevExpress.XtraEditors.XtraForm frm, Control regBox) { - toolTip = new ToolTip(); + // toolTip = new ToolTip(); this.components = new System.ComponentModel.Container(); dragBox1 = regBox; this.components = new System.ComponentModel.Container(); @@ -180,7 +180,7 @@ // isDragging = false; dragBoxCurrentName = dockPanel1_Container.Name; } - reloadLoaction(null); + // reloadLoaction(null); } else if (dockPanel1_Container.Name == dragBoxCurrentName) { @@ -227,7 +227,7 @@ }); menu.Items.Add($"涓�閿噸鎺�", null, (ss, ee) => { - frm.ShowDialog(); + reloadLoaction((sender as Control).Parent); }); menu.Show(control, e.Location); } @@ -366,7 +366,7 @@ int height = control.Height; Point[] ps = { new Point(0, 0),new Point(width - 1, 0), new Point(width - 1, height - 1),new Point(0, height - 1),new Point(0, 0) }; - g.DrawLines(new Pen(Color.LightCoral), ps); + g.DrawLines(new Pen(Color.Pink), ps); } // reloadLoaction(); reloadMsg(lCtrl); @@ -476,6 +476,7 @@ private void reloadLoaction(Control cocccc) { int _top = 0; + //濡傛灉鏄帶浠剁锛屼笉绉籐eft if (dockPanel1_Container.Name == dragBoxCurrentName) { foreach (Control col in dockPanel1_Container.Controls) @@ -487,19 +488,22 @@ return; } if (cocccc == null) return; - int x = 15; - int y = 15; + //杩欐槸瀹瑰櫒 + int x = 2; + int y = 2; foreach (Control btn in dragBox1.Controls) { if (cocccc.Name == btn.Name) continue; - //btn.Left = x; - //btn.Top = y; - x += btn.Width + 15; + if (cocccc.Visible ==false) + continue; + btn.Left = x; + btn.Top = y; + x += btn.Width + 2; if (btn.Width > dragBox1.Width - x) { - x = 15; - y += btn.Height + 15; + x = 2; + y += btn.Height +2; } } cocccc.Left = x; @@ -515,7 +519,7 @@ sb.Append(string.IsNullOrEmpty(dragBoxCurrentName) ? "琛ㄥ崟涓�" : "缁勪欢绠变腑"); sb.Append("锛屽潗鏍�:" + cocccc.Location.ToString()); sb.Append(",澶у皬锛�" + cocccc.Size.ToString()); - toolTip.SetToolTip(ctrlCurrentObj, sb.ToString()); + // toolTip.SetToolTip(ctrlCurrentObj, sb.ToString()); } } } \ No newline at end of file -- Gitblit v1.9.3