コード例 #1
0
        /// <summary>

        /// </summary>
        /// <param name="parent"></param>
        /// <param name="child"></param>
        /// <param name="l"></param>
        private static void SetBezierStyle(GTagBox parent, GTagBox child, Path l)
        {
            if (Math.Min(parent.Level, child.Level) == 0)
            {
                l.Stroke          = new SolidColorBrush(GetColor(parent.Distance + 1, parent.Level + 1));
                l.StrokeThickness = StaticCfg.Ins.StrokeThickness * 1.5;
                //l.StrokeDashArray = CfgTagGraph.Ins.StrokeDashArray;
            }
            else
            {
                l.Stroke          = new SolidColorBrush(GetColor(parent.Distance + 1, parent.Level + 1));
                l.StrokeThickness = StaticCfg.Ins.StrokeThickness;
                //l.StrokeDashArray = CfgTagGraph.Ins.StrokeDashArray;
            }
        }
コード例 #2
0
 public TagBox New(GTagBox g)
 {
     if (TagBoxGarbage.Count > 0)
     {
         sttReuseTag++;
         TagBox b = TagBoxGarbage[0] as TagBox;
         TagBoxGarbage.RemoveAt(0);
         b.Visibility = System.Windows.Visibility.Visible;
         return(b);
     }
     else
     {
         sttNewTag++;
         return(new TagBox(g));
     }
 }
コード例 #3
0
        public static TagBox CreateTagBox(GTagBox g, TreeLayoutEnv env)
        {
            TagBox b = (env == null) ? new TagBox(g) : env.New(g);

            b.FontFamily    = StaticCfg.Ins.GFontF;
            b.FontSize      = g.FontSize;
            b.Height1       = g.InnerBox.Height;
            b.Width1        = g.InnerBox.Width;
            b.Margin        = new Thickness(g.InnerBox.X - 10, g.InnerBox.Y, 0, 0);
            b.TextAlignment = TextAlignment.Center;
            b.GUTag         = g.Tag;
            b.Background1   = g.Distance;//new SolidColorBrush(GetColor(g.Distance,g.Level));
            //if (g.Distance >= 5) b.Foreground1 = g.Distance;// new SolidColorBrush(Colors.White);
            b.Foreground1 = g.Distance;

            return(b);
        }