コード例 #1
0
ファイル: DragSource.cs プロジェクト: hakanaku2009/svn-dump
        /// <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);
        }
コード例 #2
0
ファイル: DragSource.cs プロジェクト: hakanaku2009/svn-dump
        /// <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);
            }
        }
コード例 #3
0
ファイル: DragSource.cs プロジェクト: GodLesZ/svn-dump
		/// <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;
		}