Exemplo n.º 1
0
    private void button1_Click(object sender, EventArgs e)
    {
        if (textBox1.Text.Equals(string.Empty) || textBox7.Text.Equals(string.Empty) || textBox20.Text.Equals(string.Empty) || textBox21.Text.Equals(string.Empty))
        {
            return;
        }

        fetchConnInfo();

        sm = new SNMPManager();
        sm.SetCommunity(communityRead, communityWrite);
        if (sm.Kb_GetOnLine(ip, port).Equals("1"))
        {
            updateInfo();
        }
        else
        {
            Console.WriteLine(getStrNowYmdHms() + " 장비가 검색되지 않습니다.");
            MessageBox.Show("장비가 검색되지 않습니다.");
            Clear();
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SnmpFactory"/> class.
 /// </summary>
 public SnmpFactory()
 {
     SNMP        = new SNMPManager();
     ServiceName = ServiceEnum.SNMP;
     values      = Utils.LoadSNMPOptions();
 }