Esempio n. 1
0
        private void cmdOK_Click(object sender, EventArgs e)
        {
            if (SelectedConfig == null)
            {
                SelectedConfig = new InMemoryNotifierConfig();
            }
            ((InMemoryNotifierConfig)SelectedConfig).MaxEntryCount = (int)maxCountNumericUpDown.Value;

            //SelectedConfig = new InMemoryNotifierConfig() { MaxEntryCount = (int)maxCountNumericUpDown.Value };

            DialogResult = DialogResult.OK;
            Close();
        }
Esempio n. 2
0
        public override void RecordMessage(AlertRaised alertRaised)
        {
            Alerts.Add(alertRaised);
            //Cleanup
            InMemoryNotifierConfig config = (InMemoryNotifierConfig)AgentConfig;

            if (config.MaxEntryCount > 0)
            {
                while (Alerts.Count > config.MaxEntryCount)
                {
                    Alerts.RemoveAt(0);
                }
            }
        }
Esempio n. 3
0
 public InMemoryNotifier()
 {
     AgentConfig = new InMemoryNotifierConfig();
 }