//更新网络样式集,并刷新节点图片列表 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; } } }
//网络初始化,在加入所有节点之后执行一次 public void Initialized(StyleSet PaintStyle) { NetworkType();//网络类型分析 DegreeStat();//节点度统计 if (PaintStyle != null) { NetPainter = new DefaultStrategy(PaintStyle); } NetPainter.UpdateLocation(this.ToXML());//节点坐标刷新 NetPainter.UpdateImage();//节点图像刷新 }
//网络初始化,在加入所有节点之后执行一次 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(); //节点图像刷新 }
//网络初始化,在加入所有节点之后执行一次 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();//节点图像刷新 }
//更新网络样式集,并刷新节点图片列表 //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; } } }