Exemple #1
0
 private void OnGiveFeedback(object sender, GiveFeedbackEventArgs e)
 {
     if (m_dragData != null)
     {
         DropDescriptionHelper.DefaultGiveFeedback(m_dragData, e);
     }
 }
Exemple #2
0
            /// <summary>
            /// Handles DataChanged events from a COM IDataObject.
            /// </summary>
            /// <param name="format">The data format that had a change.</param>
            /// <param name="stgmedium">The data value.</param>
            public void OnDataChange(ref FORMATETC format, ref STGMEDIUM stgmedium)
            {
                // We listen to DropDescription changes, so that we can unset the IsDefault
                // drop description flag.
                var odd = DropDescriptionHelper.GetDropDescription(m_data);

                if (odd != null)
                {
                    DropDescriptionHelper.SetDropDescriptionIsDefault(m_data, false);
                }
            }
Exemple #3
0
 /// <summary>
 /// Tell the system that you are using a default description that can be cleared automatically</summary>
 /// <param name="e">The DragEventArgs from the OnDragEnter/OnDragOver event</param>
 /// <param name="value">A boolean indicating whether the message is set as default or not</param>
 public static void SetDescriptionIsDefault(this DragEventArgs e, bool value)
 {
     DropDescriptionHelper.SetDropDescriptionIsDefault((IComDataObject)e.Data, value);
 }
Exemple #4
0
 /// <summary>
 /// Set the description on a Shell Image drag/drop action</summary>
 /// <param name="e">DragEventArgs for event</param>
 public static void ClearDescription(this DragEventArgs e)
 {
     DropDescriptionHelper.SetDropDescription((IComDataObject)e.Data, DropImageType.Invalid, null, null);
 }
Exemple #5
0
 /// <summary>
 /// Set the description on a Shell Image drag/drop action.
 /// Some UI coloring is applied to the text in <paramref name="insert"/> if used by specifying %1
 /// in <paramref name="message"/>.
 /// The characters %% and %1 are the subset of FormatMessage markers that are processed here.</summary>
 /// <param name="e">The DragEventArgs from the OnDragEnter/OnDragOver event</param>
 /// <param name="message">Text such as "Move to %1"</param>
 /// <param name="insert">Text such as "Documents", inserted as specified by <paramref name="message"/></param>
 public static void SetDescription(this DragEventArgs e, string message, string insert)
 {
     DropDescriptionHelper.SetDropDescription((IComDataObject)e.Data, (DropImageType)e.Effect, message, insert);
 }