本文整理汇总了C#中System.Windows.Forms.GiveFeedbackEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# GiveFeedbackEventArgs类的具体用法?C# GiveFeedbackEventArgs怎么用?C# GiveFeedbackEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GiveFeedbackEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了GiveFeedbackEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: treeView_GiveFeedback
private void treeView_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
// 드래그 드랍을 받는 타겟에서 드랍 가능 여부를 e.Effect로 알수 있다.
Debug.WriteLine("\t Source Give Feedback : " + e.Effect);
// 드랍 가능 여부 상태에 따라서 마우스 커서의 모양을 바꿔줄 수 있다.
Cursor MyNormalCursor = null;
Cursor MyNoDropCursor = null;
try
{
MyNormalCursor = new Cursor("AllowDrop.cur");
MyNoDropCursor = new Cursor("NoDrop.cur");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
// Sets the custom cursor based upon the effect.
e.UseDefaultCursors = false;
if ((e.Effect & DragDropEffects.All) == DragDropEffects.All)
Cursor.Current = MyNormalCursor;
else
Cursor.Current = MyNoDropCursor;
}
示例2: ActionHolder_GiveFeedback
private void ActionHolder_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (dragging)
{
this.Location = new Point(this.Location.X, dragStartY + Cursor.Position.Y - dragStartMouseY);
Refresh();
}
}
示例3: OleGiveFeedback
public int OleGiveFeedback(int dwEffect) {
GiveFeedbackEventArgs gfbevent = new GiveFeedbackEventArgs((DragDropEffects) dwEffect, true);
peer.OnGiveFeedback(gfbevent);
if (gfbevent.UseDefaultCursors) {
return DragDropSUseDefaultCursors;
}
return 0;
}
示例4: componentsListView_GiveFeedback
private void componentsListView_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (null != draggedImg)
{
e.UseDefaultCursors = false;
Cursor.Current = new Cursor(new Bitmap(draggedImg, 32, 32).GetHicon());
}
}
示例5: checkedVersesCheckedListBox_GiveFeedback
private void checkedVersesCheckedListBox_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (e.Effect == DragDropEffects.Move)
{
Cursor.Current = Cursors.Hand;
}
else
{
Cursor.Current = Cursors.Default;
}
}
示例6: ListDragSource_GiveFeedback
private void ListDragSource_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
// Use custom cursors if the check box is checked.
if (UseCustomCursorsCheck.Checked)
{
// Sets the custom cursor based upon the effect.
e.UseDefaultCursors = false;
if ((e.Effect & DragDropEffects.Move) == DragDropEffects.Move)
Cursor.Current = MyNormalCursor;
else
Cursor.Current = MyNoDropCursor;
}
}
示例7: OnGiveFeedback
protected override bool OnGiveFeedback(GiveFeedbackEventArgs gfbevent)
{
base.OnGiveFeedback(gfbevent);
if (this.draggedDesignerImages != null)
{
gfbevent.UseDefaultCursors = false;
if ((gfbevent.Effect & DragDropEffects.Move) == DragDropEffects.Move)
Cursor.Current = FreeFormDragDropManager.DragMoveCursor;
else if ((gfbevent.Effect & DragDropEffects.Copy) == DragDropEffects.Copy)
Cursor.Current = FreeFormDragDropManager.DragCopyCursor;
else
Cursor.Current = Cursors.No;
return true;
}
return false;
}
示例8: OnGiveFeedback
protected virtual void OnGiveFeedback (GiveFeedbackEventArgs giveFeedbackEvent)
{
GiveFeedbackEventHandler eh = (GiveFeedbackEventHandler)(Events[GiveFeedbackEvent]);
if (eh != null)
eh (this, giveFeedbackEvent);
}
示例9: OnGiveFeedback
bool IWorkflowDesignerMessageSink.OnGiveFeedback(GiveFeedbackEventArgs e)
{
try
{
OnGiveFeedback(e);
}
catch
{
}
return true;
}
示例10: ShellTreeView_GiveFeedback
private void ShellTreeView_GiveFeedback(object sender, GiveFeedbackEventArgs e) {
e.UseDefaultCursors = true;
var doo = new System.Windows.Forms.DataObject(this._DataObject);
if (doo.GetDataPresent("DragWindow")) {
IntPtr hwnd = ShellView.GetIntPtrFromData(doo.GetData("DragWindow"));
User32.PostMessage(hwnd, 0x403, IntPtr.Zero, IntPtr.Zero);
} else {
e.UseDefaultCursors = true;
}
if (ShellView.IsDropDescriptionValid(this._DataObject)) {
e.UseDefaultCursors = false;
Cursor.Current = Cursors.Arrow;
} else {
e.UseDefaultCursors = true;
}
if (ShellView.IsShowingLayered(doo)) {
e.UseDefaultCursors = false;
Cursor.Current = Cursors.Arrow;
} else {
e.UseDefaultCursors = true;
}
base.OnGiveFeedback(e);
}
示例11: OnGiveFeedback
/// <summary>
///
/// </summary>
/// <param name="args"></param>
protected override void OnGiveFeedback(GiveFeedbackEventArgs args)
{
base.OnGiveFeedback(args);
if (this.DropSink != null)
this.DropSink.GiveFeedback(args);
}
示例12: OnGiveFeedback
//-------------------------------------------------------------------------------------
/// <summary>
///
/// </summary>
/// <param name="e"></param>
protected override void OnGiveFeedback(GiveFeedbackEventArgs e)
{
if(allowInternalDragDrop)
{
Rectangle r = treeView.RectangleToScreen(treeView.ClientRectangle);
if(r.Contains(Control.MousePosition))
{
e.UseDefaultCursors = false;
r = new Rectangle(20,20,r.Width - 40, r.Height - 40);
Point p = treeView.PointToClient(Control.MousePosition);
if(p.Y < r.Y)
WinAPI.APIWrappers.SendMessage(treeView.Handle, WinAPI.WM.VSCROLL, 0, 0);
if(p.Y > r.Height)
WinAPI.APIWrappers.SendMessage(treeView.Handle, WinAPI.WM.VSCROLL, 1, 0);
if(p.X < r.X)
WinAPI.APIWrappers.SendMessage(treeView.Handle, WinAPI.WM.HSCROLL, 0, 0);
if(p.X > r.Width)
WinAPI.APIWrappers.SendMessage(treeView.Handle, WinAPI.WM.HSCROLL, 1, 0);
}
}
else
base.OnGiveFeedback(e);
}
示例13: GiveFeedback
/// <summary>
/// Change the cursor to reflect the current drag operation.
/// </summary>
/// <remarks>You only need to override this if you want non-standard cursors.
/// The standard cursors are supplied automatically.</remarks>
/// <param name="args"></param>
public virtual void GiveFeedback(GiveFeedbackEventArgs args)
{
args.UseDefaultCursors = true;
}
示例14: GridControl_GiveFeedback
private void GridControl_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (_downHitInfo == null) return;
e.UseDefaultCursors = false;
Cursor.Current = _dragRowCursor;
}
示例15: OnGiveFeedback
private void OnGiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (m_dragData != null)
{
DropDescriptionHelper.DefaultGiveFeedback(m_dragData, e);
}
}