Example #1
0
        public virtual void SetColorFrom(IDiagramColors diagramColors)
        {
            Opacity = diagramColors.ContainerOpacity * 100F;

            if (_locationFixed)
            {
                BorderPenWidth = 2.0F;
                BorderPenColor = diagramColors.BorderFixed;
            }
            else
            {
                BorderPenWidth = 1.0F;
                BorderPenColor = diagramColors.BorderUnfixed;
            }

            if (IsLogical)
            {
                BackgroundColor = diagramColors.ContainerLogical;
            }
            else
            {
                BackgroundColor = diagramColors.ContainerPhysical;
            }

            Handle.BrushColor = diagramColors.ContainerHandle;
        }
Example #2
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     base.SetColorFrom(diagramColors);
     foreach (var portNode in _portNodes.Values)
     {
         portNode.SetColorFrom(diagramColors);
     }
 }
Example #3
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     base.SetColorFrom(diagramColors);
     SetBrushColor(diagramColors, diagramColors.ObserverNode);
     foreach (var observerLink in GetLinks <ObserverLink>())
     {
         observerLink.SetColorFrom(diagramColors);
     }
 }
Example #4
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     base.SetColorFrom(diagramColors);
     SetBrushColor(diagramColors, diagramColors.MoleculeNode);
     foreach (var transportLink in GetLinks <TransportLink>())
     {
         transportLink.SetColorFrom(diagramColors);
     }
 }
Example #5
0
        public void RefreshColor(IDiagramColors diagramColors, Color color)
        {
            var reactionNode = Node as ReactionNode;

            if (reactionNode == null)
            {
                return;
            }
            BrushColor = Color.FromArgb(reactionNode.Alpha(diagramColors.NodeSizeOpacity), color);
        }
Example #6
0
        public override void SetColorFrom(IDiagramColors diagramColors)
        {
            base.SetColorFrom(diagramColors);
            Port.BrushColor = diagramColors.RelatedItemNode;

            foreach (var link in GetLinks <RelatedItemLink>())
            {
                link.SetColorFrom(diagramColors);
            }
        }
Example #7
0
        protected void SetBrushColor(IDiagramColors diagramColors, Color color)
        {
            var nodeAlpha = Alpha(diagramColors.NodeSizeOpacity);
            int opacity   = Convert.ToInt16(diagramColors.PortOpacity * nodeAlpha);

            Shape.BrushColor = Color.FromArgb(opacity, color);
            if (Port != null)
            {
                Port.BrushColor = Color.FromArgb(nodeAlpha, color);
            }
        }
Example #8
0
 public virtual void SetColorFrom(IDiagramColors diagramColors)
 {
     if (LocationFixed)
     {
         Shape.PenWidth = 2.0F;
         Shape.PenColor = diagramColors.BorderFixed;
     }
     else
     {
         Shape.PenWidth = 1.0F;
         Shape.PenColor = diagramColors.BorderUnfixed;
     }
 }
Example #9
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     base.SetColorFrom(diagramColors);
     SetBrushColor(diagramColors, diagramColors.NeighborhoodNode);
     if (FirstNeighborLink != null)
     {
         FirstNeighborLink.SetColorFrom(diagramColors);
     }
     if (SecondNeighborLink != null)
     {
         SecondNeighborLink.SetColorFrom(diagramColors);
     }
 }
Example #10
0
        public override void SetColorFrom(IDiagramColors diagramColors)
        {
            base.SetColorFrom(diagramColors);
            SetBrushColor(diagramColors, diagramColors.ReactionNode);

            _eductsPort?.RefreshColor(diagramColors, diagramColors.ReactionPortEduct);
            _productsPort?.RefreshColor(diagramColors, diagramColors.ReactionPortProduct);
            _modifiersPort?.RefreshColor(diagramColors, diagramColors.ReactionPortModifier);

            foreach (var reactionLink in GetLinks <ReactionLink>())
            {
                reactionLink.SetColorFrom(diagramColors);
            }
        }
Example #11
0
 public void SetColorFrom(IDiagramColors diagramColors)
 {
     Shape.BrushColor = diagramColors.NeighborhoodPort;
     if (LocationFixed)
     {
         Shape.PenWidth = 2.0F;
         Shape.PenColor = diagramColors.BorderFixed;
     }
     else
     {
         Shape.PenWidth = 1.0F;
         Shape.PenColor = diagramColors.BorderUnfixed;
     }
 }
Example #12
0
        public override void SetColorFrom(IDiagramColors diagramColors)
        {
            base.SetColorFrom(diagramColors);
            Shape.BrushColor = diagramColors.JournalPageNode;

            relatedItemPort().BrushColor = diagramColors.DiagramBackground;

            parentPort().BrushColor = diagramColors.JournalPagePort;
            childPort().BrushColor  = diagramColors.JournalPagePort;

            foreach (var link in GetLinks <IJournalPageLink>())
            {
                link.SetColorFrom(diagramColors);
            }
        }
Example #13
0
        public override void SetColorFrom(IDiagramColors diagramColors)
        {
            switch (Type)
            {
            case ReactionLinkType.Educt:
                PenColor = diagramColors.ReactionLinkEduct;
                break;

            case ReactionLinkType.Product:
                PenColor = diagramColors.ReactionLinkProduct;
                break;

            case ReactionLinkType.Modifier:
                PenColor      = diagramColors.ReactionLinkModifier;
                Pen.DashStyle = DashStyle.Dash;
                break;

            default:
                throw new OSPSuiteException("No valid ReactionLinkType = " + Type);
            }
        }
Example #14
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     PenColor = diagramColors.JournalPageLink;
 }
Example #15
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     PenColor      = diagramColors.ObserverLink;
     Pen.DashStyle = DashStyle.Dash;
 }
Example #16
0
 public abstract void SetColorFrom(IDiagramColors diagramColors);
Example #17
0
 public void SetColorFrom(IDiagramColors diagramColors)
 {
     PenColor      = diagramColors.TransportLink;
     Pen.DashStyle = DashStyle.Solid;
 }
Example #18
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     PenColor = diagramColors.RelatedItemLink;
 }
Example #19
0
 public override void SetColorFrom(IDiagramColors diagramColors)
 {
     PenColor      = diagramColors.NeighborhoodLink;
     Pen.DashStyle = DashStyle.Solid;
     Pen.Width     = 4;
 }