效果图 源码下载

拖拽时带行截图效果实现代码

/// <summary>
/// 拖拽帮助类
/// </summary>
public static class DragHelper
{
/// <summary>
/// BandedGridView 拖拽
/// </summary>
/// <param name="gvMain"></param>
public static void DragGridRow<T>(this BandedGridView gvMain)
{
// 拖拽遮罩控件
DragMaster dragMaster = new DragMaster();
// 当前拖拽行绘画区域
Rectangle _DragRowRect = Rectangle.Empty; GridControl gcMain = gvMain.GridControl;
GridHitInfo _DownHitInfo = null; //表格属性 允许拖拽
gcMain.AllowDrop = true;
gvMain.OptionsDetail.EnableMasterViewMode = false;
#region 将对象拖至边界时发生 DragOver
gcMain.DragOver += delegate(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(T)))
e.Effect = DragDropEffects.Move;
else
e.Effect = DragDropEffects.None;
};
#endregion #region 拖拽完成时处理数据 DragDrop
gcMain.DragDrop += delegate(object sender, System.Windows.Forms.DragEventArgs e)
{
// 拖过来的新数据
T newRow = (T)e.Data.GetData(typeof(T));
// 原来在此坐标的数据
// e的坐标是相对于屏幕的
var clientPoint = gcMain.PointToClient(new Point(e.X, e.Y));
GridHitInfo hitInfo = gvMain.CalcHitInfo(new Point(clientPoint.X, clientPoint.Y));
var oldRow = (T)gvMain.GetRow(hitInfo.RowHandle); // 如果相等则不处理
if (oldRow == null || newRow == null) return; // 且目标位置不是最后一行的话要将所有序号重排
// 原来的行号
var oldIndex = _DownHitInfo.RowHandle;
// 新的行号
var newIndex = hitInfo.RowHandle; BindingSource bs = (BindingSource)(gcMain.DataSource);
if (bs == null)
return; bs.RemoveAt(oldIndex);
bs.Insert(oldIndex, oldRow);
bs.RemoveAt(newIndex);
bs.Insert(newIndex, newRow); bs.ResetBindings(false);
};
#endregion #region 鼠标按下 MouseDown
gcMain.MouseDown += delegate(object sender, MouseEventArgs e)
{
_DownHitInfo = null;
GridHitInfo hitInfo = gvMain.CalcHitInfo(new Point(e.X, e.Y));
if (Control.ModifierKeys != Keys.None) return;
if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= )
{
// 禁用的Grid不支持拖拽
if (!gvMain.OptionsBehavior.Editable
|| gvMain.OptionsBehavior.ReadOnly)
return;
// 只有点击最前面才能拖拽
if (hitInfo.InRowCell)
return;
// 缓存
_DownHitInfo = hitInfo;
}
};
#endregion #region 鼠标移动 MouseMove
gcMain.MouseMove += delegate(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
if (_DownHitInfo != null)
{
Size dragSize = SystemInformation.DragSize;
// 偏离区域
Rectangle dragRect = new Rectangle(new Point(_DownHitInfo.HitPoint.X - dragSize.Width / , _DownHitInfo.HitPoint.Y - dragSize.Height / ), dragSize); if (!dragRect.Contains(new Point(e.X, e.Y)))
{
// 屏幕坐标
var p = gcMain.PointToScreen(e.Location);
// 刷新是必须要的
gcMain.Refresh();
// 获取当前行截图
var bmp = GetDragRowImage(gcMain, _DownHitInfo, _DragRowRect); Point offSetPoint = new Point(p.X + , p.Y - dragMaster.DragSize.Height / );
// 开始显示拖拽遮罩
dragMaster.StartDrag(bmp, offSetPoint, DragDropEffects.Move);
// 获取要拖拽的数据
object row = gvMain.GetRow(_DownHitInfo.RowHandle);
// 开始拖拽
gcMain.DoDragDrop(row, DragDropEffects.Move);
// 取消事件
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
// 清空缓存
_DownHitInfo = null;
}
}
}
};
#endregion #region 在用鼠标拖动某项时发生,是否允许继续拖放 QueryContinueDrag
gcMain.QueryContinueDrag += delegate(object sender, QueryContinueDragEventArgs e)
{
switch (e.Action)
{
case DragAction.Continue:
// 移动遮罩
Point offSetPoint = new Point(Cursor.Position.X + , Cursor.Position.Y - dragMaster.DragSize.Height / );
dragMaster.DoDrag(offSetPoint, DragDropEffects.Move, false);
break;
default:
// 清空
_DragRowRect = Rectangle.Empty;
// 停止拖动
dragMaster.EndDrag();
break;
}
};
#endregion #region 点击行头移动行
gvMain.CustomDrawRowIndicator += delegate(object sender, RowIndicatorCustomDrawEventArgs e)
{
if (_DragRowRect == Rectangle.Empty && _DownHitInfo != null && _DownHitInfo.RowHandle == e.RowHandle)
{
_DragRowRect = e.Bounds;
}
};
#endregion } /// <summary>
/// GridView 拖拽
/// </summary>
/// <param name="gvMain"></param>
public static void DragGridRow<T>(this GridView gvMain)
{
// 拖拽遮罩控件
DragMaster dragMaster = new DragMaster();
// 当前拖拽行绘画区域
Rectangle _DragRowRect = Rectangle.Empty; GridControl gcMain = gvMain.GridControl;
GridHitInfo _DownHitInfo = null; //表格属性 允许拖拽
gcMain.AllowDrop = true;
gvMain.OptionsDetail.EnableMasterViewMode = false;
#region 将对象拖至边界时发生 DragOver
gcMain.DragOver += delegate(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(T)))
e.Effect = DragDropEffects.Move;
else
e.Effect = DragDropEffects.None;
};
#endregion #region 拖拽完成时处理数据 DragDrop
gcMain.DragDrop += delegate(object sender, System.Windows.Forms.DragEventArgs e)
{
// 拖过来的新数据
T newRow = (T)e.Data.GetData(typeof(T));
// 原来在此坐标的数据
// e的坐标是相对于屏幕的
var clientPoint = gcMain.PointToClient(new Point(e.X, e.Y));
GridHitInfo hitInfo = gvMain.CalcHitInfo(new Point(clientPoint.X, clientPoint.Y));
var oldRow = (T)gvMain.GetRow(hitInfo.RowHandle); // 如果相等则不处理
if (oldRow == null || newRow == null) return; // 且目标位置不是最后一行的话要将所有序号重排
// 原来的行号
var oldIndex = _DownHitInfo.RowHandle;
// 新的行号
var newIndex = hitInfo.RowHandle; BindingSource bs = (BindingSource)(gcMain.DataSource);
if (bs == null)
return; bs.RemoveAt(oldIndex);
bs.Insert(oldIndex, oldRow);
bs.RemoveAt(newIndex);
bs.Insert(newIndex, newRow); bs.ResetBindings(false);
};
#endregion #region 鼠标按下 MouseDown
gcMain.MouseDown += delegate(object sender, MouseEventArgs e)
{
_DownHitInfo = null;
GridHitInfo hitInfo = gvMain.CalcHitInfo(new Point(e.X, e.Y));
if (Control.ModifierKeys != Keys.None) return;
if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= )
{
// 禁用的Grid不支持拖拽
if (!gvMain.OptionsBehavior.Editable
|| gvMain.OptionsBehavior.ReadOnly)
return;
// 只有点击最前面才能拖拽
if (hitInfo.InRowCell)
return;
// 缓存
_DownHitInfo = hitInfo;
}
};
#endregion #region 鼠标移动 MouseMove
gcMain.MouseMove += delegate(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
if (_DownHitInfo != null)
{
Size dragSize = SystemInformation.DragSize;
// 偏离区域
Rectangle dragRect = new Rectangle(new Point(_DownHitInfo.HitPoint.X - dragSize.Width / , _DownHitInfo.HitPoint.Y - dragSize.Height / ), dragSize); if (!dragRect.Contains(new Point(e.X, e.Y)))
{
// 屏幕坐标
var p = gcMain.PointToScreen(e.Location);
// 刷新是必须要的
gcMain.Refresh();
// 获取当前行截图
var bmp = GetDragRowImage(gcMain, _DownHitInfo, _DragRowRect); Point offSetPoint = new Point(p.X + , p.Y - dragMaster.DragSize.Height / );
// 开始显示拖拽遮罩
dragMaster.StartDrag(bmp, offSetPoint, DragDropEffects.Move);
// 获取要拖拽的数据
object row = gvMain.GetRow(_DownHitInfo.RowHandle);
// 开始拖拽
gcMain.DoDragDrop(row, DragDropEffects.Move);
// 取消事件
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
// 清空缓存
_DownHitInfo = null;
}
}
}
};
#endregion #region 在用鼠标拖动某项时发生,是否允许继续拖放 QueryContinueDrag
gcMain.QueryContinueDrag += delegate(object sender, QueryContinueDragEventArgs e)
{
switch (e.Action)
{
case DragAction.Continue:
// 移动遮罩
Point offSetPoint = new Point(Cursor.Position.X + , Cursor.Position.Y - dragMaster.DragSize.Height / );
dragMaster.DoDrag(offSetPoint, DragDropEffects.Move, false);
break;
default:
// 清空
_DragRowRect = Rectangle.Empty;
// 停止拖动
dragMaster.EndDrag();
break;
}
};
#endregion #region 点击行头移动行
gvMain.CustomDrawRowIndicator += delegate(object sender, RowIndicatorCustomDrawEventArgs e)
{
if (_DragRowRect == Rectangle.Empty && _DownHitInfo != null && _DownHitInfo.RowHandle == e.RowHandle)
{
_DragRowRect = e.Bounds;
}
};
#endregion } /// <summary>
/// 获取拖拽截图
/// </summary>
/// <param name="hitInfo"></param>
/// <param name="gcMain"></param>
/// <param name="dragRowRect"></param>
/// <returns></returns>
private static Bitmap GetDragRowImage(GridControl gcMain, GridHitInfo hitInfo, Rectangle dragRowRect)
{
// 截图
var bmp = DevImageCapturer.GetControlBitmap(gcMain, null
, dragRowRect.Width + , dragRowRect.Top
, gcMain.Width - dragRowRect.Width - , dragRowRect.Height - ); using (Graphics g = Graphics.FromImage(bmp))
{
var p1 = new Point(, );
var p2 = new Point(bmp.Width - , );
var p3 = new Point(, bmp.Height - );
var p4 = new Point(bmp.Width - , bmp.Height - ); using (Pen pen = new Pen(gcMain.ForeColor))
{
g.DrawLine(pen, p1, p2);
g.DrawLine(pen, p1, p3);
g.DrawLine(pen, p2, p4);
g.DrawLine(pen, p3, p4);
}
}
return bmp;
}
}

Code

/// <summary>
/// 拖拽窗口
/// </summary>
public partial class DragWindow : DevExpress.Utils.Win.TopFormBase
{
private Bitmap dragBitmap;
private bool dragging;
private Point hotSpot;
public static readonly Point InvisiblePoint = new Point(-, -); public DragWindow()
{
hotSpot = Point.Empty;
dragging = false;
SetStyle(ControlStyles.Selectable, false);
this.Size = Size.Empty;
this.ShowInTaskbar = false;
Form prevActive = Form.ActiveForm;
InitializeComponent();
} void ActivateForm(object sender, EventArgs e)
{
Form form = sender as Form;
if (form == null || !form.IsHandleCreated) return;
form.Activate();
} public void MakeTopMost()
{
UpdateZOrder();
} private void InitializeComponent()
{
this.StartPosition = FormStartPosition.Manual;
dragBitmap = null;
this.Enabled = false;
this.MinimumSize = Size.Empty;
this.Size = Size.Empty;
this.Location = InvisiblePoint;
this.Visible = false;
this.TabStop = false;
//this.Opacity = 0.7;// DevExpress.Utils.DragDrop.DragWindow.DefaultOpacity;
} protected void InternalMoveBitmap(Point p)
{
//p.Offset(-hotSpot.X, -hotSpot.Y);
this.SuspendLayout();
this.Location = p;
this.ResumeLayout();
} protected override void OnResize(System.EventArgs e)
{
base.OnResize(e);
} public bool ShowDrag(Point p)
{
if (this.BackgroundImage == null) return false;
dragging = true;
Visible = true;
Refresh();
InternalMoveBitmap(p);
return true;
} public bool MoveDrag(Point p)
{
if (!dragging) return false;
InternalMoveBitmap(p);
return true;
} public bool HideDrag()
{
if (!dragging) return false;
Visible = false;
BackgroundImage = null;
dragging = false;
this.SuspendLayout();
this.Size = Size.Empty;
this.Location = InvisiblePoint;
this.ResumeLayout();
return true;
} public Point HotSpot { get { return hotSpot; } set { hotSpot = value; } } public Bitmap DragBitmap
{
get { return dragBitmap; }
set
{
this.BackgroundImage = value;
if (value == null)
{
HideDrag();
}
else
hotSpot = new Point(value.Size.Width / , value.Size.Height / );
dragBitmap = value;
Size = BackgroundImage.Size;
}
}
}
/// <summary>
/// 截图
/// </summary>
public class DevImageCapturer
{
[System.Runtime.InteropServices.DllImport("USER32.dll")]
internal static extern IntPtr GetDC(IntPtr dc);
[System.Runtime.InteropServices.DllImport("USER32.dll")]
internal static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
[System.Runtime.InteropServices.DllImport("USER32.dll")]
internal static extern IntPtr GetDesktopWindow();
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern bool BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, uint dwRop);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern IntPtr CreateCompatibleDC(IntPtr hdc);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern IntPtr CreateCompatibleBitmap(IntPtr hdc, int nWidth, int nHeight);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern bool DeleteObject(IntPtr hObject);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr obj);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern IntPtr CreateSolidBrush(int color);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern IntPtr CreatePatternBrush(IntPtr hBitmap); /// <summary>
/// 获取控件的截图
/// </summary>
/// <param name="control">控件</param>
/// <param name="pattern">图片</param>
/// <returns></returns>
public static Bitmap GetControlBitmap(Control control, Bitmap pattern)
{
int width = control.Width;
int height = control.Height;
if (control is Form)
{
width = control.ClientRectangle.Width;
height = control.ClientRectangle.Height;
}
IntPtr hdc = GetDC(control.Handle);
IntPtr compDC = CreateCompatibleDC(hdc);
IntPtr compHBmp = CreateCompatibleBitmap(hdc, width, height);
IntPtr prev = SelectObject(compDC, compHBmp);
IntPtr brush = IntPtr.Zero, prevBrush = IntPtr.Zero;
if (pattern != null)
{
brush = CreatePatternBrush(pattern.GetHbitmap());
prevBrush = SelectObject(compDC, brush);
}
Point pt = new Point(, );
BitBlt(compDC, , , width, height, hdc, pt.X, pt.Y, 0x00C000CA);
SelectObject(compDC, prev);
if (prevBrush != IntPtr.Zero)
SelectObject(compDC, prevBrush);
ReleaseDC(control.Handle, hdc);
NativeMethods.DeleteDC(compDC);
Bitmap bmp = Bitmap.FromHbitmap(compHBmp);
DeleteObject(compHBmp);
if (brush != IntPtr.Zero)
DeleteObject(brush);
return bmp;
} /// <summary>
/// 获取控件的截图
/// </summary>
/// <param name="control">控件</param>
/// <param name="pattern">图片</param>
/// <param name="offSetX">X</param>
/// <param name="offSetY">Y</param>
/// <param name="width">宽</param>
/// <param name="height">高</param>
/// <returns></returns>
public static Bitmap GetControlBitmap(Control control, Bitmap pattern, int offSetX = , int offSetY = , int width = , int height = )
{
width = width == ? control.Width : width;
height = height == ? control.Height : height;
if (control is Form)
{
width = control.ClientRectangle.Width;
height = control.ClientRectangle.Height;
}
IntPtr hdc = GetDC(control.Handle);
IntPtr compDC = CreateCompatibleDC(hdc);
IntPtr compHBmp = CreateCompatibleBitmap(hdc, width, height);
IntPtr prev = SelectObject(compDC, compHBmp);
IntPtr brush = IntPtr.Zero, prevBrush = IntPtr.Zero;
if (pattern != null)
{
brush = CreatePatternBrush(pattern.GetHbitmap());
prevBrush = SelectObject(compDC, brush);
}
Point pt = new Point(offSetX, offSetY);
BitBlt(compDC, , , width, height, hdc, pt.X, pt.Y, 0x00C000CA);
SelectObject(compDC, prev);
if (prevBrush != IntPtr.Zero)
SelectObject(compDC, prevBrush);
ReleaseDC(control.Handle, hdc);
NativeMethods.DeleteDC(compDC);
Bitmap bmp = Bitmap.FromHbitmap(compHBmp);
DeleteObject(compHBmp);
if (brush != IntPtr.Zero)
DeleteObject(brush);
return bmp;
}
}

Code

public class DragMaster
{
[ThreadStatic]
static DragWindow dragWindow;
bool dragInProgress;
DragDropEffects effects;
DragDropEffects lastEffect;
static Cursor customizationCursor = null;
double _opacity = 0.7; public double Opacity
{
get { return _opacity; }
set { _opacity = value; }
}
public DragMaster()
{
dragInProgress = false;
lastEffect = effects = DragDropEffects.None;
} DragWindow DragWindow
{
get
{
if (dragWindow == null) dragWindow = new DragWindow() { Opacity = this.Opacity };
return dragWindow;
}
} public DragDropEffects LastEffect
{
get { return lastEffect; }
} public bool DragInProgress
{
get { return dragInProgress; }
} /// <summary>
/// 绘制大小
/// </summary>
public Size DragSize
{
get
{
if (DragWindow.DragBitmap == null) return Size.Empty;
return DragWindow.DragBitmap.Size;
}
} /// <summary>
/// 开始拖拽
/// </summary>
/// <param name="bmp"></param>
/// <param name="startPoint"></param>
/// <param name="effects"></param>
public void StartDrag(Bitmap bmp, Point startPoint, DragDropEffects effects)
{
StopDrag();
dragInProgress = true;
this.effects = effects;
lastEffect = effects;
DragWindow.MakeTopMost();
DragWindow.DragBitmap = bmp;
DragWindow.ShowDrag(startPoint);
SetDragCursor(effects);
} /// <summary>
/// 停止拖拽
/// </summary>
protected void StopDrag()
{
dragInProgress = false;
lastEffect = effects = DragDropEffects.None;
DragWindow.HideDrag();
} /// <summary>
/// 设置拖拽鼠标类型
/// </summary>
/// <param name="e"></param>
public void SetDragCursor(DragDropEffects e)
{
if (e == DragDropEffects.None)
Cursor.Current = CustomizationCursor;
else
Cursor.Current = Cursors.Default;
} /// <summary>
/// 拖拽
/// </summary>
/// <param name="p"></param>
/// <param name="e"></param>
/// <param name="setCursor"></param>
public void DoDrag(Point p, DragDropEffects e, bool setCursor)
{
if (!dragInProgress) return;
lastEffect = e;
if (setCursor) SetDragCursor(e);
DragWindow.MoveDrag(p);
} /// <summary>
/// 取消拖拽
/// </summary>
public void CancelDrag()
{
if (!dragInProgress) return;
StopDrag();
}
/// <summary>
/// 结束拖拽
/// </summary>
public void EndDrag()
{
if (!dragInProgress) return;
StopDrag();
} /// <summary>
/// 自定义Cursor
/// </summary>
static Cursor CustomizationCursor
{
get
{
if (customizationCursor == null) customizationCursor = ResourceImageHelper.CreateCursorFromResources("DevExpress.XtraTreeList.Images.customization.cur", typeof(DragMaster).Assembly);
return customizationCursor;
}
}
}

Code

Dev Grid拖拽移动行的更多相关文章

  1. dev TreeList拖拽

    一.说明 使用dev控件,TreeList1向TreeList2拖拽 二.属性 //允许拖拽            treeList1.AllowDrop = true;            tre ...

  2. dev gridview拖拽数据移动

    设置属性gridView1.OptionsSelection.EnableAppearanceFocusedCell = false; //确保选定行的背景色一样. private BindingLi ...

  3. dev GridControl实现拖拽

    一.示例说明 以gridControl1和gridControl2为例,从gridControl1拖拽行到gridControl2中去. 二.属性设置 gridControl2.AllowDrop = ...

  4. 关于QTableWidget中单元格拖拽实现

    无重写函数实现单元格拖拽 缺点:需要额外设置一个记录拖拽起始行的私有成员变量和拖拽列的初始QList数据成员. 优点:无需重构函数,对于QT中信号和槽的灵活运用 信号和槽 // signal void ...

  5. Dev GridView行拖拽

    http://blog.csdn.net/keyrainie/article/details/8513802 http://www.cnblogs.com/qq4004229/archive/2012 ...

  6. devpress 的gridview 控件的行拖拽 z

    首先,添加引用:using DevExpress.XtraGrid.Views.Grid.ViewInfo;               gridControl1.AllowDrop = true; ...

  7. Blend Grid行列拖拽控制宽高

    原文:Blend Grid行列拖拽控制宽高 看效果 <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=&qu ...

  8. JS组件系列——Bootstrap Table 表格行拖拽

    前言:之前一直在研究DDD相关知识,好久没更新JS系列文章了.这两天做了一个简单的业务需求,觉得效果还可以,今天在这里分享给大家,欢迎拍砖~~ 一.业务需求及实现效果 项目涉及到订单模块,那天突然接到 ...

  9. JS组件系列——Bootstrap Table 表格行拖拽(二:多行拖拽)

    前言:前天刚写了篇JS组件系列——Bootstrap Table 表格行拖拽,今天接到新的需要,需要在之前表格行拖拽的基础上能够同时拖拽选中的多行.博主用了半天时间研究了下,效果是出来了,但是感觉不尽 ...

随机推荐

  1. 使用 IntelliJ IDEA 2016和Maven创建Java Web项目的详细步骤及相关问题解决办法

    Maven简介 相对于传统的项目,Maven 下管理和构建的项目真的非常好用和简单,所以这里也强调下,尽量使用此类工具进行项目构建, 它可以管理项目的整个生命周期. 可以通过其命令做所有相关的工作,其 ...

  2. Python - 获取帮助信息

    1- Python Manuals 自带CHM格式的Python Manuals存放在\Python<x.x>\Doc\目录下.可以在IDLE界面下按F1键或点击help选项下Python ...

  3. Dewey – 标记和搜索 Chrome 浏览器书签

    Dewey 是一个 Chrome 应用程序,用于标记,搜索和排序你的 Chrome 浏览器书签.借助 Dewey,您可以添加自定义标签,生成你的书签截图,灵活快捷的方式进行搜索和排序. 您可能感兴趣的 ...

  4. 链表中倒数第k个结点

    题目: 输入一个链表,输出该链表中倒数第k个结点. 思路: 因为是单向链表,如果使用最普通的遍历来解决的话会多出很多不必要的遍历.有一个比较好的解法,设置两个指针两个指针之间差k-1个位置,也就是当后 ...

  5. html5中的大纲

    html5中的大纲 前言: 在html5中我们可以使用结构元素来编排一份大纲,这样我们就可以通过这个网页的大纲来了解网页中有哪些内容,网页中以什么样的形式来组织这些内容有更清楚的认识. 1.html5 ...

  6. 一个简单的3DTouch、Peek和Pop手势Demo,附github地址

    参考文章:http://www.jianshu.com/p/74fe6cbc542b 下载链接:https://github.com/banchichen/3DTouch-PeekAndPopGest ...

  7. 重新想象 Windows 8 Store Apps (69) - 其它: 自定义启动屏幕, 程序的运行位置, 保持屏幕的点亮状态, MessageDialog, PopupMenu

    [源码下载] 重新想象 Windows 8 Store Apps (69) - 其它: 自定义启动屏幕, 程序的运行位置, 保持屏幕的点亮状态, MessageDialog, PopupMenu 作者 ...

  8. 获取用户的真实ip

    常见的坑有两个: 一.获取的是内网的ip地址.在nginx作为反向代理层的架构中,转发请求到php,java等应用容器上.结果php获取的是nginx代理服务器的ip,表现为一个内网的地址.php获取 ...

  9. Follow me to learn what is Unit of Work pattern

    Introduction A Unit of Work is a combination of several actions that will be grouped into a transact ...

  10. linux tcp/ip编程和windows tcp/ip编程差别以及windows socket编程详解

    最近要涉及对接现有应用visual c++开发的tcp客户端,花时间了解了下windows下tcp开发和linux的差别,从开发的角度而言,最大的差别是头文件(早期为了推广尽可能兼容,后面越来越扩展, ...