Exemple #1
0
        private void LoopbackCollectorEditConfig_Shown(object sender, EventArgs e)
        {
            LoopbackCollectorConfigEntry selectedEntry;

            if (SelectedEntry != null)
            {
                selectedEntry = (LoopbackCollectorConfigEntry)SelectedEntry;
            }
            else
            {
                if (SelectedConfig == null)
                {
                    SelectedConfig = new LoopbackCollectorConfig();
                }
                selectedEntry = (LoopbackCollectorConfigEntry)((ICollectorConfig)SelectedConfig);
            }
            for (int i = 0; i < cboCollectorState.Items.Count; i++)
            {
                if (selectedEntry.ReturnState == CollectorStateConverter.GetCollectorStateFromText(cboCollectorState.Items[i].ToString()))
                {
                    cboCollectorState.SelectedIndex = i;
                    break;
                }
            }
        }
Exemple #2
0
 private void cmdOK_Click(object sender, EventArgs e)
 {
     if (cboCollectorState.SelectedIndex > -1)
     {
         LoopbackCollectorConfigEntry selectedEntry;
         if (SelectedEntry != null)
         {
             selectedEntry = (LoopbackCollectorConfigEntry)SelectedEntry;
         }
         else
         {
             if (SelectedConfig == null)
             {
                 SelectedConfig = new LoopbackCollectorConfig();
             }
             selectedEntry = (LoopbackCollectorConfigEntry)((ICollectorConfig)SelectedConfig);
         }
         selectedEntry.ReturnState = CollectorStateConverter.GetCollectorStateFromText(cboCollectorState.Text);
         SelectedEntry             = selectedEntry;
         DialogResult = DialogResult.OK;
         Close();
     }
 }
Exemple #3
0
 public LoopbackCollector()
 {
     AgentConfig = new LoopbackCollectorConfig();
 }