protected override void AddHandler(object sender, EventArgs e) { var record = new TSValue(); using (var dlg = new TSValueEditDlg()) { dlg.SetContext(fModel, record); if (dlg.ShowModal()) { fModel.TSDB.InsertValue(fPointId, record.Timestamp, record.Value); UpdateContent(); } } }
protected override void EditHandler(object sender, EventArgs e) { var record = ListView.GetSelectedTag <TSValue>(); if (record == null) { return; } using (var dlg = new TSValueEditDlg()) { dlg.SetContext(fModel, record); if (dlg.ShowModal()) { fModel.TSDB.UpdateValue(fPointId, record.Timestamp, record.Value); UpdateContent(); } } }