private void Read() { ReadValueIdCollection nodesToRead = ReadValuesCTRL.GetValueIds(); if (nodesToRead == null || nodesToRead.Count == 0) { return; } DataValueCollection values = null; DiagnosticInfoCollection diagnosticInfos = null; ResponseHeader responseHeader = m_session.Read( null, 0, TimestampsToReturn.Both, nodesToRead, out values, out diagnosticInfos); ClientBase.ValidateResponse(values, nodesToRead); ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToRead); ReadResultsCTRL.ShowValue(values, true); }
private void BrowseCTRL_ItemsSelected(object sender, NodesSelectedEventArgs e) { try { foreach (ReferenceDescription reference in e.References) { if (reference.ReferenceTypeId == ReferenceTypeIds.HasProperty || reference.IsForward) { ReadValuesCTRL.AddValueId(reference); } } } catch (Exception exception) { GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception); } }
/// <summary> /// Displays the dialog. /// </summary> public void Show(Session session, ReadValueIdCollection valueIds) { if (session == null) { throw new ArgumentNullException("session"); } m_session = session; BrowseCTRL.SetView(m_session, BrowseViewType.Objects, null); ReadValuesCTRL.Initialize(session, valueIds); MoveBTN_Click(BackBTN, null); Show(); BringToFront(); }