/// <summary> /// Displays the address space for the specified server. /// </summary> public OpcItem ShowDialog(TsCDaServer server) { try { if (server == null) { throw new ArgumentNullException("server"); } mServer_ = server; mItemId_ = null; TsCDaBrowseFilters filters = new TsCDaBrowseFilters(); filters.ReturnAllProperties = false; filters.ReturnPropertyValues = false; browseCtrl_.ShowSingleServer(mServer_, filters); propertiesCtrl_.Initialize(null); if (ShowDialog() != DialogResult.OK) { return(null); } return(mItemId_); } finally { // ensure server connection in the browse control are closed. browseCtrl_.Clear(); } }
/// <summary> /// Prompts the use to select a server with the specified specification. /// </summary> public TsCDaServer ShowDialog(OpcSpecification specification) { specificationCb_.SelectedItem = specification; if (ShowDialog() != DialogResult.OK) { serversCtrl_.Clear(); return(null); } TsCDaServer server = serversCtrl_.SelectedServer; serversCtrl_.Clear(); return(server); }
/// <summary> /// Prompts a user to add items to a subscitpion with a modal dialog. /// </summary> public TsCDaItemResult[] ShowDialog(TsCDaSubscription subscription) { if (subscription == null) { throw new ArgumentNullException("subscription"); } mServer_ = subscription.Server; mSubscription_ = subscription; mItems_ = null; backBtn_.Enabled = false; nextBtn_.Enabled = true; cancelBtn_.Visible = true; doneBtn_.Visible = false; optionsBtn_.Visible = true; browseCtrl_.Visible = true; itemsCtrl_.Visible = true; resultsCtrl_.Visible = false; browseCtrl_.ShowSingleServer(mServer_, null); itemsCtrl_.Initialize(null); ShowDialog(); // ensure server connection in the browse control are closed. browseCtrl_.Clear(); return(mItems_); }
/// <summary> /// Prompts the use to select items for the write request. /// </summary> public TsCDaItemValueResult[] ShowDialog(TsCDaServer server) { if (server == null) { throw new ArgumentNullException("server"); } mServer_ = server; mSubscription_ = null; mSynchronous_ = true; backBtn_.Enabled = false; nextBtn_.Enabled = true; cancelBtn_.Visible = true; doneBtn_.Visible = false; browseCtrl_.Visible = true; subscriptionCtrl_.Visible = false; itemsCtrl_.Visible = true; resultsCtrl_.Visible = false; browseCtrl_.ShowSingleServer(mServer_, null); itemsCtrl_.Initialize(mServer_, null); ShowDialog(); // ensure server connection in the browse control are closed. browseCtrl_.Clear(); return(mValues_); }