public DotGUIControl(MainWindow form, Canvas canvas, Grid grid, WireGUIControl wgc, ListContainer lc) { this.form = form; this.canvas = canvas; this.grid = grid; this.wgc = wgc; this.lc = lc; }
public ListContainer ReadXML() { System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(ListContainer)); FileStream file = System.IO.File.Open("SavedProperties/Serialization.xml", FileMode.Open); ListContainer lc = (ListContainer)reader.Deserialize(file); file.Close(); return(lc); }
public void RecreateDot(string name, int count, ListContainer lc) { this.lc = lc; bool direction = false; int oposite = 1; for (int i = 0; i < count; i++) { Image img = new Image(); img.Visibility = Visibility.Hidden; img.Width = 15; img.Height = 15; img.Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "WireDots/dotGreen.png")); img.Tag = name + "_" + i; img.Opacity = 0.6f; img.MouseLeftButtonDown += new MouseButtonEventHandler(Dot_MouseLeftButtonDown); img.MouseEnter += new MouseEventHandler(Dot_MouseEnter); img.MouseLeave += new MouseEventHandler(Dot_MouseLeave); Panel.SetZIndex(img, 2); canvas.Children.Add(img); Dot d = new Dot(img.Tag.ToString(), name, img, direction, oposite); lc.ec.AddDot(name, d); lc.dList.Add(d); direction = direction == true ? false : true; if (i < 1) { oposite = 1; } else { oposite = -1; } } }
public void UpdateListContainer(ListContainer lc) { this.lc = lc; }
public CircuitChecker(ListContainer lc, HighlighterGUIControl hgc) { this.lc = lc; this.hgc = hgc; }