Example #1
0
        void SetBoundaryFill()
        {
            if (LgNodeInfo == null)
            {
                BoundaryPath.Fill = Brushes.Blue;
                return;
            }

            var colBlack = new Drawing.Color(0, 0, 0);

            if (!Node.Attr.Color.Equals(colBlack))
            {
                BoundaryPath.Fill = LgNodeInfo.Selected
                ? Brushes.Red
                : Common.BrushFromMsaglColor(Node.Attr.Color);
                return;
            }

            BoundaryPath.Fill = LgNodeInfo.Selected
                ? Brushes.Red
                : (LgNodeInfo != null && LgNodeInfo.SlidingZoomLevel == 0
                    ? Brushes.Aqua
                    : Common.BrushFromMsaglColor(Node.Attr.FillColor));

            if (LgNodeInfo != null && !LgNodeInfo.Selected)
            {
                BoundaryPath.Fill = (LgNodeInfo.ZoomLevel < 2
                    ? Brushes.LightGreen
                    : (LgNodeInfo.ZoomLevel < 4 ? Brushes.LightBlue : Brushes.LightYellow));
            }
        }
        void SetBoundaryFill()
        {
            //jyoti changed all node colors


            BoundaryPath.Fill = Brushes.DarkGray;
            if (LgNodeInfo != null && LgNodeInfo.Selected)
            {
                BoundaryPath.Fill = LgNodeInfo.Color;//Brushes.Red;
            }
            else if (LgNodeInfo != null && LgNodeInfo.SelectedNeighbor > 0)
            {
                BoundaryPath.Fill = Brushes.Yellow;
            }
            return;

            if (LgNodeInfo == null)
            {
                BoundaryPath.Fill = Brushes.Blue;
                return;
            }

            var colBlack = new Drawing.Color(0, 0, 0);

            if (!Node.Attr.Color.Equals(colBlack))
            {
                BoundaryPath.Fill = LgNodeInfo.Selected
                ? GetSelBrushColor()
                : Common.BrushFromMsaglColor(Node.Attr.Color);
                return;
            }

            BoundaryPath.Fill = LgNodeInfo.Selected
                ? GetSelBrushColor()
                : (LgNodeInfo != null && LgNodeInfo.SlidingZoomLevel == 0
                    ? Brushes.Aqua
                    : Common.BrushFromMsaglColor(Node.Attr.FillColor));

            if (LgNodeInfo != null && !LgNodeInfo.Selected)
            {
                BoundaryPath.Fill = (LgNodeInfo.ZoomLevel < 2
                    ? Brushes.LightGreen
                    : (LgNodeInfo.ZoomLevel < 4 ? Brushes.LightBlue : Brushes.LightYellow));
            }
        }
        void SetBoundaryFill() {
            if (LgNodeInfo == null) {
                BoundaryPath.Fill = Brushes.Blue;
                return;
            }

            var colBlack = new Drawing.Color(0, 0, 0);

            if (!Node.Attr.Color.Equals(colBlack))
            {
                BoundaryPath.Fill = LgNodeInfo.Selected
                ? Brushes.Red
                : Common.BrushFromMsaglColor(Node.Attr.Color);
                return;
            }

            BoundaryPath.Fill = LgNodeInfo.Selected
                ? Brushes.Red
                : (LgNodeInfo != null && LgNodeInfo.SlidingZoomLevel == 0
                    ? Brushes.Aqua
                    : Common.BrushFromMsaglColor(Node.Attr.FillColor));

            if (LgNodeInfo != null && !LgNodeInfo.Selected) {
                BoundaryPath.Fill = (LgNodeInfo.ZoomLevel < 2
                    ? Brushes.LightGreen
                    : (LgNodeInfo.ZoomLevel < 4 ? Brushes.LightBlue : Brushes.LightYellow));
            }
        }
 public static Color MsaglColorToDrawingColor(Drawing.Color gleeColor)
 {
     return(Color.FromArgb(gleeColor.A, gleeColor.R, gleeColor.G, gleeColor.B));
 }