/// <summary> /// Loads selected Datapoint in the Editor controls /// </summary> /// <param name="editIntervalGrpID"></param> private void LoadEditData(string editIntervalGrpID) { m_view.ResetEditFields(); if (editIntervalGrpID == "") { return; } EtyDataLogDPGroupTrend etyDPGrpTrend = GetOPCSampleGrp(editIntervalGrpID); if (etyDPGrpTrend != null) { m_view.SetEditFields(etyDPGrpTrend); } }
public void TestResetEditFields01() { using (OPCSampleGrpConfigStart oPCSampleGrpConfigStart = OPCSampleGrpConfigStartFactory.CreateOPCSampleGrpConfigStart01()) { oPCSampleGrpConfigStart.ResetEditFields(); //Post condition Check Accessor oPCSampleGrpConfigStartAccessor = ReflectionAccessor.Wrap(oPCSampleGrpConfigStart); Assert.AreEqual("", oPCSampleGrpConfigStartAccessor.GetProperty("intervalNameTextBox.Text")); Assert.AreEqual("", oPCSampleGrpConfigStartAccessor.GetProperty("intervalDescTextBox.Text")); Assert.AreEqual(1, oPCSampleGrpConfigStartAccessor.GetProperty(" intervalUnitBox.Value")); Assert.AreEqual(OPCSampleGrpConfigStart.INTERVALETYPE_MINUTE_INDEX, oPCSampleGrpConfigStartAccessor.GetProperty("intervalTypeBox.SelectedIndex")); Assert.AreEqual(1, oPCSampleGrpConfigStartAccessor.GetProperty("deltaValueBox.Value")); Assert.AreEqual(false, oPCSampleGrpConfigStartAccessor.GetProperty("dateTimePicker.Checked")); Assert.AreEqual(true, oPCSampleGrpConfigStartAccessor.GetProperty("disableCheckBox.Checked")); Assert.AreEqual(false, oPCSampleGrpConfigStartAccessor.GetProperty("intervalNameTextBox.Enabled")); } }