Example #1
0
        private void ActEditExecute(object sender, EventArgs e)
        {
            AgentProfile profile = listView1.SelectedItems[0].Tag as AgentProfile;

            using (FormProfile editor = new FormProfile(profile))
            {
                if (editor.ShowDialog() == DialogResult.OK)
                {
                }
            }
        }
Example #2
0
        private void ActAddExecute(object sender, EventArgs e)
        {
            using (FormProfile editor = new FormProfile(null))
            {
                if (editor.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                try
                {
                    Profiles.AddProfile(AgentProfileFactory.Create(Guid.NewGuid(), editor.VersionCode, new IPEndPoint(editor.IP, editor.Port), editor.GetCommunity, editor.SetCommunity, editor.AgentName, editor.AuthenticationPassphrase, editor.PrivacyPassphrase, editor.AuthenticationMethod, editor.PrivacyMethod, editor.UserName, 1000));
                    Profiles.SaveProfiles();
                }
                catch (BrowserException ex)
                {
                    Logger.Info(ex.Message);
                }
            }
        }
 private void ActEditExecute(object sender, EventArgs e)
 {
     AgentProfile profile = listView1.SelectedItems[0].Tag as AgentProfile;
     using (FormProfile editor = new FormProfile(profile))
     {
         if (editor.ShowDialog() == DialogResult.OK)
         {
         }
     }
 }
        private void ActAddExecute(object sender, EventArgs e)
        {
            using (FormProfile editor = new FormProfile(null))
            {
                if (editor.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                try
                {
                    Profiles.AddProfile(AgentProfileFactory.Create(Guid.NewGuid(), editor.VersionCode, new IPEndPoint(editor.IP, editor.Port), editor.GetCommunity, editor.SetCommunity, editor.AgentName, editor.AuthenticationPassphrase, editor.PrivacyPassphrase, editor.AuthenticationMethod, editor.PrivacyMethod, editor.UserName, 1000));
                    Profiles.SaveProfiles();
                }
                catch (BrowserException ex)
                {
                    Logger.Info(ex.Message);
                }
            }
        }