Example #1
0
 public void LabelToString()
 {
     lblMoney.Text = Money.ToString();
     lblTrap1.Text = Trap1.ToString();
     lblTrap2.Text = Trap2.ToString();
     lblTrap3.Text = Trap3.ToString();
     lblTrap4.Text = Trap4.ToString();
 }
Example #2
0
        private void _parse()
        {
            _hdr       = new AsnHdr(m_io, this, m_root);
            _version   = new AsnObj(m_io, this, m_root);
            _community = new AsnObj(m_io, this, m_root);
            _pduType   = new AsnHdr(m_io, this, m_root);
            switch (PduType.Tag)
            {
            case AsnTypeTag.SnmpPduTrapv1: {
                _data = new Trap1(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduTrapv2: {
                _data = new Trap2(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduSet: {
                _data = new SetRequest(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduResponse: {
                _data = new Response(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduGet: {
                _data = new GetRequest(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduGetnext: {
                _data = new GetNextRequest(m_io, this, m_root);
                break;
            }
            }
        }