public void Test_TSPointEditorPresenter_Common() { var view = Substitute.For <ITSPointEditorView>(); var model = new ALModel(null); var record = new TSPoint(); var presenter = new TSPointEditorPresenter(view); presenter.SetContext(model, record); Assert.IsTrue(presenter.ApplyChanges()); }
protected override void AddHandler(object sender, EventArgs e) { var record = new TSPoint(); using (var dlg = new TSPointEditDlg()) { dlg.SetContext(fModel, record); if (dlg.ShowModal()) { fModel.TSDB.AddPoint(record); UpdateContent(); } } }
public override void TickTimer() { int num = ListView.Items.Count; for (int i = 0; i < num; i++) { ListViewItem item = ListView.Items[i]; TSPoint point = item.Tag as TSPoint; if (point != null) { double curValue = fModel.GetCurrentValue(point.Id); string strVal = ALCore.GetDecimalStr(curValue); item.SubItems[6].Text = strVal; } } }
public void SetContext(IModel model, TSPoint record) { fPresenter.SetContext(model, record); }