Пример #1
0
 public SettingsWindow(DatasGathering.CollectorConfig _conf) {
     InitializeComponent();
     iVer.Items.Add(SnmpSharpNet.SnmpVersion.Ver1);
     iVer.Items.Add(SnmpSharpNet.SnmpVersion.Ver2);
     this.Config = _conf;
     if (this.PropertyChanged != null)
         this.PropertyChanged(this, new PropertyChangedEventArgs("Config"));                    
 }
Пример #2
0
        public DatasCollector(CollectorConfig config) {
            Datas = new List<ChartRendering.ChartData>();
            SetState(CollectorState.Stopped);

            this.Config = config;
            _watchTimer = new Timer(config.GatherInterval) { AutoReset = false };
            _watchTimer.Elapsed += _watchTimer_Elapsed;
            _tickTimer.Elapsed += _tickTimer_Elapsed;

        }