コード例 #1
0
        public BusPinStatesForm(Bus bus)
        {
            InitializeComponent();

            Visible = true;

            for (var i = 0; i < bus.Signals.Count; i++)
            {
                var pins = bus.Signals.ElementAt(i).Pins;

                for (var j = 0; j < pins.Count; j++)
                {
                    var pin = pins.ElementAt(j);

                    if (!pin.ValueSetExternaly && !(pin.Val == PinValue.HIGHZ && pin.SetValue == PinValue.UNDEFINED || pin.Val == PinValue.UNDEFINED))
                    {
                        busPinsDtoBindingSource.Add(new BusPinsDto
                        {
                            Index         = i,
                            ComponentName = pin.ParentPort.Component.Name,
                            PinName       = pin.Name,
                            PinValue      = pin.Val == PinValue.HIGHZ ? pin.SetValue.ToString() : pin.Val.ToString()
                        });
                    }
                }
            }

            PinStatesGrid.ClearSelection();
        }
コード例 #2
0
        public SignalPinStatesForm(Signal signal)
        {
            InitializeComponent();
            Visible = true;

            foreach (var p in signal.Pins)
            {
                if (!p.ValueSetExternaly)
                {
                    signalPinsDtoBindingSource.Add(new SignalPinsDto
                    {
                        ComponentName = p.ParentPort.Component.Name,
                        PinName       = p.Name,
                        PinValue      = p.Val.ToString()
                    });
                }
            }

            PinStatesGrid.ClearSelection();
        }
コード例 #3
0
        public SignalPinStatesForm(Signal signal)
        {
            InitializeComponent();
            Visible = true;

            foreach (var pin in signal.Pins)
            {
                if (!pin.ValueSetExternaly && !(pin.Val == PinValue.HIGHZ && pin.SetValue == PinValue.UNDEFINED || pin.Val == PinValue.UNDEFINED))
                {
                    signalPinsDtoBindingSource.Add(new SignalPinsDto
                    {
                        ComponentName = pin.ParentPort.Component.Name,
                        PinName       = pin.Name,
                        PinValue      = pin.Val == PinValue.HIGHZ ? pin.SetValue.ToString() : pin.Val.ToString()
                    });
                }
            }

            PinStatesGrid.ClearSelection();
        }