public ApplicationIcon IconFor(IPKSimBuildingBlock buildingBlock, IPKSimBuildingBlock emptySelection = null)
        {
            if (buildingBlock == null)
            {
                return(ApplicationIcons.EmptyIcon);
            }

            var buildingBlockIcon = ApplicationIcons.IconByName(buildingBlock.Icon);

            return(isTemplate(buildingBlock, emptySelection) ? buildingBlockIcon : ApplicationIcons.RedOverlayFor(buildingBlockIcon));
        }
        private void addConfigurationNodeUnder(ITreeNode buildConfigNode, IBuildingBlockInfo buildingBlockInfo)
        {
            var buildingBlock = buildingBlockInfo.UntypedBuildingBlock;

            var statusIcon = buildingBlockInfo.BuildingBlockChanged
            ? ApplicationIcons.RedOverlayFor(buildingBlock.Icon)
            : ApplicationIcons.GreenOverlayFor(buildingBlock.Icon);

            CreateFor(buildingBlockInfo)
            .WithIcon(statusIcon)
            .Under(buildConfigNode);
        }
        private void refreshDisplayedBuildingBlock(ITreeNode treeNode)
        {
            var buildingBlockInfo = treeNode.TagAsObject as IBuildingBlockInfo;

            if (buildingBlockInfo == null)
            {
                return;
            }

            //Update TreeNode Icon
            var icon = buildingBlockInfo.BuildingBlockChanged ? ApplicationIcons.RedOverlayFor(buildingBlockInfo.IconName) : ApplicationIcons.GreenOverlayFor(buildingBlockInfo.IconName);

            treeNode.Icon = icon;
        }
Example #4
0
        protected virtual void UpdateTrafficLightFor(ISimulationAnalysisPresenter simulationAnalysisPresenter)
        {
            var icon = analysisIconFor(simulationAnalysisPresenter);

            View.UpdateTrafficLightFor(simulationAnalysisPresenter, Analyzable.HasUpToDateResults ? ApplicationIcons.GreenOverlayFor(icon) : ApplicationIcons.RedOverlayFor(icon));
        }