Exemplo n.º 1
0
 public FormBusProp(GlobalLine GLBus)
 {
     InitializeComponent();
     this.GLine = GLBus;
     this.Bus = (GLBus.DLine as BusLine).Bus;
     this.Title = "Свойства шины " + Bus.Name;
 }
Exemplo n.º 2
0
        public BusLine(Bus bus, TreeViewItem LBILine, List<GlobalLine> GSubLines, MainWindow Wnd)
        {
            Bus = bus;
            Source = Bus;
            Type = DrawingLine.Types.Bus;
            wnd = Wnd;
            CanLine = new Canvas();
            CanLine.Height = Settings.LineHeight;
            CanLine.VerticalAlignment = VerticalAlignment.Stretch;
            CanLine.HorizontalAlignment = HorizontalAlignment.Stretch;
            CanLine.Background = Brushes.Transparent;
            CanLine.Margin = new Thickness(0, 0, 0, 0);
            LBILine.Header = CanLine;

            GSignalLines = GSubLines;
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
 //Bus (create from existing bus)
 public void Add(Bus bus, MainWindow wnd)
 {
     List<GlobalLine> GLTemp = new List<GlobalLine>();
     GlobalLines.Add(new GlobalLine(bus, wnd, GLTemp));
     for (int i = 0; i < bus.Signals.Count; i++)
     {
         GLTemp.Add(new GlobalLine(bus.Signals[i], GlobalLines[GlobalLines.Count - 1], wnd));
     }
     GlobalLines[GlobalLines.Count - 1].TVIName.IsExpanded = true;
 }
Exemplo n.º 5
0
 //Bus (create with emty signals)
 public void Add(Bus bus, int n1, int n2, List<BusChange> BChanges, MainWindow wnd)
 {
     List<GlobalLine> GLTemp = new List<GlobalLine>();
     GlobalLines.Add(new GlobalLine(bus, wnd, GLTemp));
     for (int i = n1; i <= n2; i++)
     {
         for (int j = 0; j < BChanges.Count; j++)
         {
             Change ch = BChanges[j].GetChangeAt(i - n1, n2 - n1 + 1);
             if (ch.Value != Change.Proc)
                 bus.Signals[i-n1].ChangeAdd(ch);
         }
         GLTemp.Add(new GlobalLine(bus.Signals[i - n1], GlobalLines[GlobalLines.Count - 1], wnd));
     }
     GlobalLines[GlobalLines.Count - 1].TVIName.IsExpanded = true;
 }
Exemplo n.º 6
0
 public void Add(Bus bus)
 {
     Items.Add(new Bus(SetName(bus.Name), bus.Signals, bus.N1, bus.N2));
 }