Esempio n. 1
0
        internal static bool ContainsVideoDrawing(DocumentNode node)
        {
            DocumentCompositeNode documentCompositeNode1 = node as DocumentCompositeNode;

            if (PlatformTypes.DrawingBrush.IsAssignableFrom((ITypeId)node.Type))
            {
                documentCompositeNode1 = documentCompositeNode1.Properties[ConvertibleDrawing.DrawingBrushDrawingProperty] as DocumentCompositeNode;
            }
            if (documentCompositeNode1 != null && PlatformTypes.Drawing.IsAssignableFrom((ITypeId)documentCompositeNode1.Type))
            {
                if (PlatformTypes.VideoDrawing.IsAssignableFrom((ITypeId)documentCompositeNode1.Type))
                {
                    return(true);
                }
                if (PlatformTypes.DrawingGroup.IsAssignableFrom((ITypeId)documentCompositeNode1.Type))
                {
                    DocumentCompositeNode documentCompositeNode2 = documentCompositeNode1.Properties[ConvertibleDrawing.DrawingGroupChildrenProperty] as DocumentCompositeNode;
                    if (documentCompositeNode2 != null)
                    {
                        foreach (DocumentNode node1 in (IEnumerable <DocumentNode>)documentCompositeNode2.Children)
                        {
                            if (ConvertibleDrawing.ContainsVideoDrawing(node1))
                            {
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }
Esempio n. 2
0
 public static bool CanCreateConvertibleDrawing(DocumentNode resourceNode)
 {
     if (ConvertibleDrawing.IsResourceTypeSupported(resourceNode.Type))
     {
         return(!ConvertibleDrawing.ContainsVideoDrawing(resourceNode));
     }
     return(false);
 }
Esempio n. 3
0
        internal static bool ContainsVideoDrawing(Drawing drawing)
        {
            if (drawing is VideoDrawing)
            {
                return(true);
            }
            DrawingGroup drawingGroup = drawing as DrawingGroup;

            if (drawingGroup != null)
            {
                foreach (Drawing drawing1 in drawingGroup.Children)
                {
                    if (ConvertibleDrawing.ContainsVideoDrawing(drawing1))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }