public WindowSourceLine(SourceItem Item, TreeViewItem TVI, WindowSource WSParent) { this.Source = Item; this.Name = Item.Name; TVIName = TVI; this.Type = Item.Type; switch (Item.Type) { case SourceItem.Types.Signal: this.Mode = (Item as Signal).Mode; break; case SourceItem.Types.Bus: this.Mode = (Item as Bus).Mode; TVIName.Header += " | " + (Item as Bus).Signals.Count; break; } //TVIName.Style = Style; TVIName.MouseEnter += TVITemp_MouseEnter; TVIName.MouseLeave += TVITemp_MouseLeave; }
public WindowSourceLine(SourceItem Item, WindowSource WSParent) { this.Parent = WSParent; this.Source = Item; this.Name = Item.Name; TVIName = new TreeViewItem { Header = Name, Foreground = Brushes.White }; this.Type = Item.Type; switch (Item.Type) { case SourceItem.Types.Signal: this.Mode = (Item as Signal).Mode; break; case SourceItem.Types.Bus: this.Mode = (Item as Bus).Mode; TVIName.Header += " | " + (Item as Bus).Signals.Count; break; } TVIName.Style = Style; TVIName.MouseEnter += TVITemp_MouseEnter; TVIName.MouseLeave += TVITemp_MouseLeave; }