基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lskj.Control.SiftColControl
{
public partial class DragItem : UserControl
{
public DragItem(DragItemModel _dragItemModel = null)
{
this.dragItemModel = _dragItemModel;
InitializeComponent();
}
#region
///// <summary>
///// 计算操作字段
///// </summary>
//public string ValString = string.Empty;
///// <summary>
///// 数据源列名
///// </summary>
//public string FieldColName = string.Empty;
public DragItemModel dragItemModel;
private btn_ClickEventHanlder _btnClickEvent = null;
/// <summary>
/// 关闭按钮点击
/// </summary>
/// <param name="sender">The sender.</param>
public delegate void btn_ClickEventHanlder(Lskj.Control.SiftColControl.DragItem sender);
private MouseDownEventHanlder _mouseDownEvent = null;
/// <summary>
/// 鼠标按下开始拖拽
/// </summary>
/// <param name="sender">The sender.</param>
public delegate void MouseDownEventHanlder(Lskj.Control.SiftColControl.DragItem sender);
private MouseUpEventHanlder _mouseUpEvent = null;
/// <summary>
/// 鼠标右击打开菜单
/// </summary>
/// <param name="sender">The sender.</param>
public delegate void MouseUpEventHanlder(Lskj.Control.SiftColControl.DragItem sender, MouseEventArgs e);
#endregion
#region
#region
private void OnDragItem_Load(object sender, EventArgs e)
{
this.ItemBtn.Click += OnItemBtn_Click;
this.MouseDown += OnDragItem_MouseDown;
this.ItemLable.MouseDown += OnItemLable_MouseDown;
this.MouseUp += OnDragItem_MouseUp;
this.ItemLable.MouseUp += OnDragItem_MouseUp;
}
#endregion
#region
private void OnDragItem_MouseDown(object sender, MouseEventArgs e)
{
if (_mouseDownEvent != null)
{
_mouseDownEvent(this);
}
}
private void OnItemLable_MouseDown(object sender, MouseEventArgs e)
{
if (_mouseDownEvent != null)
{
_mouseDownEvent(this);
}
}
#endregion
#region
private void OnItemBtn_Click(object sender, EventArgs e)
{
if (_btnClickEvent != null)
{
_btnClickEvent(this);
}
}
#endregion
#region
void OnDragItem_MouseUp(object sender, MouseEventArgs e)
{
if (_mouseUpEvent != null)
{
_mouseUpEvent(this, e);
}
}
#endregion
#endregion
#region
#region
public void setClickEvent(btn_ClickEventHanlder btnClickEvent)
{
this._btnClickEvent = btnClickEvent;
}
#endregion
#region
public void setMouseDownEvent(MouseDownEventHanlder mouseDownEvent)
{
this._mouseDownEvent = mouseDownEvent;
}
#endregion
#region
public void setMouseUpEvent(MouseUpEventHanlder mouseUpEvent)
{
this._mouseUpEvent = mouseUpEvent;
}
#endregion
#endregion
}
}