Beispiel #1
0
        /// <summary>
        /// Create a data object that will be used to as the data object
        /// for the drag operation.
        /// </summary>
        /// <remarks>
        /// Subclasses can override this method add new formats to the data object.
        /// </remarks>
        /// <param name="olv">The ObjectListView that is the source of the drag</param>
        /// <returns>A data object for the drag</returns>
        protected virtual object CreateDataObject(ObjectListView olv)
        {
            OLVDataObject data = new OLVDataObject(olv);

            data.CreateTextFormats();
            return(data);
        }
Beispiel #2
0
        /// <summary>
        /// The drag operation is finished. Refreshe the dragged rows if so configured.
        /// </summary>
        /// <param name="dragObject"></param>
        /// <param name="effect"></param>
        public virtual void EndDrag(Object dragObject, DragDropEffects effect)
        {
            OLVDataObject data = dragObject as OLVDataObject;

            if (data == null)
            {
                return;
            }

            if (this.RefreshAfterDrop)
            {
                data.ListView.RefreshObjects(data.ModelObjects);
            }
        }
Beispiel #3
0
		/// <summary>
		/// Create a data object that will be used to as the data object
		/// for the drag operation.
		/// </summary>
		/// <remarks>
		/// Subclasses can override this method add new formats to the data object.
		/// </remarks>
		/// <param name="olv">The ObjectListView that is the source of the drag</param>
		/// <returns>A data object for the drag</returns>
		protected virtual object CreateDataObject(ObjectListView olv) {
			OLVDataObject data = new OLVDataObject(olv);
			data.CreateTextFormats();
			return data;
		}