Esempio n. 1
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);
                }
            }
Esempio n. 2
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);
 }