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")); }
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; }