コード例 #1
0
		public void AddLink(PlanetDrawing planet1, PlanetDrawing planet2)
		{
			if (planet1 == planet2 && LinkDrawings.Any(l => (l.Planet1 == planet1 && l.Planet2 == planet2) || (l.Planet2 == planet1 && l.Planet1 == planet2))) return;
			var d = new LinkDrawing(planet1, planet2);
			LinkDrawings.Add(d);
			canvas.Children.Add(d);
			Panel.SetZIndex(d, 2);
			GalaxyUpdated();
		}
コード例 #2
0
        public void AddLink(PlanetDrawing planet1, PlanetDrawing planet2)
        {
            if (planet1 == planet2 && LinkDrawings.Any(l => (l.Planet1 == planet1 && l.Planet2 == planet2) || (l.Planet2 == planet1 && l.Planet1 == planet2)))
            {
                return;
            }
            var d = new LinkDrawing(planet1, planet2);

            LinkDrawings.Add(d);
            canvas.Children.Add(d);
            Panel.SetZIndex(d, 2);
            GalaxyUpdated();
        }
コード例 #3
0
 public void RemoveLink(LinkDrawing link)
 {
     LinkDrawings.Remove(link);
     canvas.Children.Remove(link);
 }
コード例 #4
0
		public void RemoveLink(LinkDrawing link)
		{
			LinkDrawings.Remove(link);
			canvas.Children.Remove(link);
		}