예제 #1
0
 /// <summary>
 /// Unsets a drop description flag.
 /// </summary>
 /// <param name="dataObject">The associated DataObject.</param>
 /// <param name="flag">The drop description flag to unset.</param>
 private static void UnsetDropDescriptionFlag(IDataObject dataObject, DropDescriptionFlags flag)
 {
     if (s_dropDescriptions.ContainsKey(dataObject))
     {
         DropDescriptionFlags current = s_dropDescriptions[dataObject];
         s_dropDescriptions[dataObject] = (current | flag) ^ flag;
     }
 }
예제 #2
0
 /// <summary>
 /// Sets a drop description flag.
 /// </summary>
 /// <param name="dataObject">The associated DataObject.</param>
 /// <param name="flag">The drop description flag to set.</param>
 /// <param name="enabled">True to set the flag, False to unset it.</param>
 private static void SetDropDescriptionFlag(IComDataObject dataObject, DropDescriptionFlags flag, bool enabled)
 {
     var current = GetDropDescriptionFlag(dataObject);
     var next = enabled ? (current | flag) : (current | flag) ^ flag;
     if (current != next)
     {
         dataObject.SetData("DropDescriptionFlags", (int)next);
     }
 }
예제 #3
0
        /// <summary>
        /// Sets a drop description flag.
        /// </summary>
        /// <param name="dataObject">The associated DataObject.</param>
        /// <param name="flag">The drop description flag to set.</param>
        /// <param name="enabled">True to set the flag, False to unset it.</param>
        private static void SetDropDescriptionFlag(IComDataObject dataObject, DropDescriptionFlags flag, bool enabled)
        {
            var current = GetDropDescriptionFlag(dataObject);
            var next    = enabled ? (current | flag) : (current | flag) ^ flag;

            if (current != next)
            {
                dataObject.SetData("DropDescriptionFlags", (int)next);
            }
        }
예제 #4
0
 /// <summary>
 /// Sets a drop description flag.
 /// </summary>
 /// <param name="dataObject">The associated DataObject.</param>
 /// <param name="flag">The drop description flag to set.</param>
 private static void SetDropDescriptionFlag(IDataObject dataObject, DropDescriptionFlags flag)
 {
     if (s_dropDescriptions.ContainsKey(dataObject))
     {
         s_dropDescriptions[dataObject] |= flag;
     }
     else
     {
         s_dropDescriptions.Add(dataObject, flag);
     }
 }
예제 #5
0
 /// <summary>
 /// Unsets a drop description flag.
 /// </summary>
 /// <param name="dataObject">The associated DataObject.</param>
 /// <param name="flag">The drop description flag to unset.</param>
 private static void UnsetDropDescriptionFlag(IDataObject dataObject, DropDescriptionFlags flag)
 {
     if (s_dropDescriptions.ContainsKey(dataObject))
     {
         DropDescriptionFlags current = s_dropDescriptions[dataObject];
         s_dropDescriptions[dataObject] = (current | flag) ^ flag;
     }
 }
예제 #6
0
 /// <summary>
 /// Sets a drop description flag.
 /// </summary>
 /// <param name="dataObject">The associated DataObject.</param>
 /// <param name="flag">The drop description flag to set.</param>
 private static void SetDropDescriptionFlag(IDataObject dataObject, DropDescriptionFlags flag)
 {
     if (s_dropDescriptions.ContainsKey(dataObject))
         s_dropDescriptions[dataObject] |= flag;
     else
         s_dropDescriptions.Add(dataObject, flag);
 }