示例#1
0
 //更新网络样式集,并刷新节点图片列表
 public void UpdateStyle(Object sender, StyleUpdateEventArgs e)
 {
     if (e.NewStyleSet == null)
     {
         return;
     }
     //相同样式集则退出
     if (NetPainter.PaintStyle.Equals(e.NewStyleSet) == true)
     {
         return;
     }
     if (e.NewStyleSet.Sharp == NetPainter.PaintStyle.Sharp)
     {
         NetPainter.UpdateStyle(e.NewStyleSet);
     }
     else
     {
         switch (e.NewStyleSet.Sharp)
         {
         case (StyleSet.sharp.Round):
             NetPainter = new DefaultStrategy(e.NewStyleSet);
             break;
         }
     }
 }
示例#2
0
 //网络初始化,在加入所有节点之后执行一次
 public void Initialized(StyleSet PaintStyle)
 {
     NetworkType();//网络类型分析
     DegreeStat();//节点度统计
     if (PaintStyle != null)
     {
         NetPainter = new DefaultStrategy(PaintStyle);
     }
     NetPainter.UpdateLocation(this.ToXML());//节点坐标刷新
     NetPainter.UpdateImage();//节点图像刷新
 }
示例#3
0
 //网络初始化,在加入所有节点之后执行一次
 public void Initialized(StyleSet PaintStyle)
 {
     NetworkType(); //网络类型分析
     DegreeStat();  //节点度统计
     switch (PaintStyle.Sharp)
     {
     case StyleSet.sharp.Round:
         NetPainter = new DefaultStrategy(PaintStyle);
         break;
     }
     NetPainter.UpdateLocation(this.ToXML()); //节点坐标刷新
     NetPainter.UpdateImage();                //节点图像刷新
 }
示例#4
0
 //网络初始化,在加入所有节点之后执行一次
 public void Initialized(StyleSet PaintStyle)
 {
     NetworkType();//网络类型分析
     DegreeStat();//节点度统计
     switch (PaintStyle.Sharp)
     {
         case StyleSet.sharp.Round:
             NetPainter = new DefaultStrategy(PaintStyle);
             break;
     }
     NetPainter.UpdateLocation(this.ToXML());//节点坐标刷新
     NetPainter.UpdateImage();//节点图像刷新
 }
示例#5
0
        //更新网络样式集,并刷新节点图片列表
        //public void UpdateStyle(StyleSet GlobalStyle)
        //{
        //    if (GlobalStyle == null)
        //    {
        //        return;
        //    }
        //    //相同样式集则退出
        //    if (NetPainter.PaintStyle.Equals(GlobalStyle) == true)
        //    {
        //        return;
        //    }
        //    if (GlobalStyle.Sharp == NetPainter.PaintStyle.Sharp)
        //    {
        //        NetPainter.UpdateStyle(GlobalStyle);
        //    }
        //    else
        //    {
        //        switch (GlobalStyle.Sharp)
        //        {
        //            case (StyleSet.sharp.Round):
        //                NetPainter = new DefaultStrategy(GlobalStyle);
        //                break;
        //        }
        //    }
        //}

        //更新网络样式集,并刷新节点图片列表
        public void UpdateStyle(Object sender, StyleUpdateEventArgs e)
        {
            if (e.NewStyleSet == null)
            {
                return;
            }
            //相同样式集则退出
            if (NetPainter.PaintStyle.Equals(e.NewStyleSet) == true)
            {
                return;
            }
            if (e.NewStyleSet.Sharp == NetPainter.PaintStyle.Sharp)
            {
                NetPainter.UpdateStyle(e.NewStyleSet);
            }
            else
            {
                switch (e.NewStyleSet.Sharp)
                {
                    case (StyleSet.sharp.Round):
                        NetPainter = new DefaultStrategy(e.NewStyleSet);
                        break;
                }
            }
        }