Exemple #1
0
 public static bool CanCreateConvertibleDrawing(DocumentNode resourceNode)
 {
     if (ConvertibleDrawing.IsResourceTypeSupported(resourceNode.Type))
     {
         return(!ConvertibleDrawing.ContainsVideoDrawing(resourceNode));
     }
     return(false);
 }
Exemple #2
0
        public void UpdateIsEnabled()
        {
            bool flag = false;

            if (this.designerContext.ActiveSceneViewModel != null && this.designerContext.ActiveSceneViewModel.ActiveSceneInsertionPoint != null && (this.resourceManager.SelectedItems.Count == 1 && this.designerContext.ActiveSceneViewModel.ActiveSceneInsertionPoint != null))
            {
                ResourceEntryItem resourceEntryItem = this.resourceManager.SelectedItems.Selection[0] as ResourceEntryItem;
                if (resourceEntryItem != null)
                {
                    DocumentNode valueNode = resourceEntryItem.Resource.ValueNode;
                    this.isVisible = ConvertibleDrawing.IsResourceTypeSupported(valueNode.Type);
                    flag           = ConvertibleDrawing.CanCreateConvertibleDrawing(valueNode);
                }
            }
            else
            {
                flag           = false;
                this.isVisible = false;
            }
            this.IsEnabled = flag;
        }