Ejemplo n.º 1
0
        private static void Copy(XController controller, Object selection, XTransferableSupplier xTransferableSupplier)
        {
            if (xTransferableSupplier != null)
            {
                // get selection supplier
                XSelectionSupplier xSelectionSupplier = controller as XSelectionSupplier;

                if (xSelectionSupplier != null)
                {
                    // select the objects to select
                    try
                    {
                        xSelectionSupplier.select(Any.Get(selection));
                    }
                    catch (Exception ex)
                    {
                        throw new ArgumentException("Object can't be set as selection", "selection", ex);
                    }

                    XTransferable transfarable = xTransferableSupplier.getTransferable();
                }
            }
        }
        private static void Copy(XController controller, Object selection, XTransferableSupplier xTransferableSupplier)
        {
            if (xTransferableSupplier != null)
            {
                // get selection supplier
                XSelectionSupplier xSelectionSupplier = controller as XSelectionSupplier;

                if (xSelectionSupplier != null)
                {
                    // select the objects to select
                    try
                    {
                        xSelectionSupplier.select(Any.Get(selection));
                    }
                    catch (Exception ex)
                    {
                        throw new ArgumentException("Object can't be set as selection", "selection", ex);
                    }

                    XTransferable transfarable = xTransferableSupplier.getTransferable();


                }
            }
        }