Example #1
0
        public GlobalLine(Signal signal, MainWindow wnd)
        {
            signal.GLines.Add(this);
            this.wnd = wnd;
            CreateCMSignal();
            CreateItems();

            TVIName.ContextMenu = CMSignal;
            TVIName.Header = signal.Name;
            TVIName.Style = (Style)wnd.FindResource(Signal.Modes.ToStr(signal.Mode));
            wnd.TVSignals.Items.Add(TVIName);
            DLine = new SignalLine(signal, TVILine, this, wnd);
        }
Example #2
0
        public GlobalLine(Bus bus, MainWindow wnd, List<GlobalLine> GSubLines)
        {
            bus.GLines.Add(this);
            this.wnd = wnd;
            CreateCMBus();
            CreateItems();

            TVIName.ContextMenu = CMBus;
            TVIName.Header = bus.Name;
            TVIName.Style = (Style)wnd.FindResource("Bus");
            TVIName.Expanded +=new RoutedEventHandler(TVIName_Expanded);
            TVIName.Collapsed += new RoutedEventHandler(TVIName_Collapsed);
            wnd.TVSignals.Items.Add(TVIName);

            DLine = new BusLine(bus, TVILine, GSubLines, wnd);
        }