Ejemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="E:DragOver"/> event.
        /// </summary>
        /// <param name="e">The <see cref="System.Windows.Forms.DragEventArgs"/> instance containing the event data.</param>
        public override void OnDragOver(DragEventArgs e)
        {
            IFieldsDataObject fieldsDataObject = e.Data.GetData(
                typeof(IReportItemDataObject)) as IFieldsDataObject;

            if (fieldsDataObject != null &&
                fieldsDataObject.Fields != null &&
                fieldsDataObject.Fields.Length > 1)
            {
                e.Effect = DragDropEffects.All;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Raises the <see cref="E:DragEnter"/> event.
        /// </summary>
        /// <param name="e">The <see cref="System.Windows.Forms.DragEventArgs"/> instance containing the event data.</param>
        public override void OnDragEnter(DragEventArgs e)
        {
            IFieldsDataObject fieldsDataObject = e.Data.GetData(
                typeof(IReportItemDataObject)) as IFieldsDataObject;

            if (fieldsDataObject != null &&
                fieldsDataObject.Fields != null &&
                fieldsDataObject.Fields.Length > 0)
            {
                BeginEdit();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Raises the <see cref="E:DragDrop"/> event.
        /// </summary>
        /// <param name="e">The <see cref="System.Windows.Forms.DragEventArgs"/> instance containing the event data.</param>
        public override void OnDragDrop(DragEventArgs e)
        {
            IFieldsDataObject fieldsDataObject = e.Data.GetData(
                typeof(IReportItemDataObject)) as IFieldsDataObject;

            if (fieldsDataObject != null &&
                fieldsDataObject.Fields != null &&
                fieldsDataObject.Fields.Length > 0)
            {
                Text = string.Format(
                    "=Fields!{0}.Value",
                    fieldsDataObject.Fields[0].Name);
            }
        }