Exemplo n.º 1
0
        private void RequestNodeVisualUpdate(NodeModel nodeModel)
        {
            if (nodeModel != null)
            {
                // Visualization update for a given node is desired.
                nodeModel.RequestVisualUpdate(MaxTesselationDivisions);
            }
            else
            {
                // Get each node in workspace to update their visuals.
                foreach (var node in dynamoModel.CurrentWorkspace.Nodes)
                    node.RequestVisualUpdate(MaxTesselationDivisions);
            }

            // Schedule a NotifyRenderPackagesReadyAsyncTask here so that when 
            // render packages of all the NodeModel objects are generated, the 
            // VisualizationManager gets notified.
            // 
            var scheduler = dynamoModel.Scheduler;
            var notifyTask = new NotifyRenderPackagesReadyAsyncTask(scheduler);
            notifyTask.Completed += OnNodeModelRenderPackagesReady;
            scheduler.ScheduleForExecution(notifyTask);
        }