Ejemplo n.º 1
0
        private void HandleThemeDrag(object sender, BeginDragEventArgs e)
        {
            FrameworkElement frameworkElement = (FrameworkElement)sender;
            ThemeSummary     themeSummary     = frameworkElement.DataContext as ThemeSummary;
            IDataObject      dataObject       = Advent.Common.Interop.DataObject.CreateDataObject();

            dataObject.SetVirtualFiles(new VirtualFile[]
            {
                new VirtualFile(themeSummary.Name + Path.GetExtension(themeSummary.ThemeFullPath), FileUtil.ReadAllBytes(themeSummary.ThemeFullPath, FileShare.ReadWrite))
            });
            dataObject.DoDragDrop((UIElement)sender, e.DragPoint, DragDropEffects.Copy);
        }
Ejemplo n.º 2
0
        private void OnDrag(object sender, BeginDragEventArgs e)
        {
            IDataObject dataObject = Advent.Common.Interop.DataObject.CreateDataObject();

            VmcStudioUtil.DragDropObject = new QuickLinkDrag(this.Link);
            try
            {
                dataObject.DoDragDrop(this, e.DragPoint, DragDropEffects.Move);
            }
            finally
            {
                VmcStudioUtil.DragDropObject = null;
            }
        }
Ejemplo n.º 3
0
        private void OnDrag(object sender, BeginDragEventArgs e)
        {
            OemQuickLink link = new OemQuickLink(this.OemEntryPoint.Manager);

            link.BeginInit();
            link.Application = this.OemEntryPoint.Application;
            link.EntryPoint  = this.OemEntryPoint;
            link.EndInit();
            IDataObject dataObject = Advent.Common.Interop.DataObject.CreateDataObject();

            VmcStudioUtil.DragDropObject = new QuickLinkDrag(link);
            try
            {
                dataObject.DoDragDrop(this, e.DragPoint, DragDropEffects.Move);
            }
            finally
            {
                VmcStudioUtil.DragDropObject = null;
            }
        }