Skip to content

Commit

Permalink
Merge pull request #26 from wangyongxiao/master
Browse files Browse the repository at this point in the history
连接触发判断一下,处于连接状态才去获取browse节点
  • Loading branch information
dathlin authored Apr 22, 2021
2 parents 28b8e25 + 0e27329 commit 46675aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions OpcUaHelper/Forms/FormBrowseServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,13 @@ private void M_OpcUaClient_ConnectComplete(object sender, EventArgs e)
{
try
{
// populate the browse view.
PopulateBranch(ObjectIds.ObjectsFolder, BrowseNodesTV.Nodes);
BrowseNodesTV.Enabled = true;
OpcUaClient client = (OpcUaClient)sender;
if (client.Connected)
{
// populate the browse view.
PopulateBranch(ObjectIds.ObjectsFolder, BrowseNodesTV.Nodes);
BrowseNodesTV.Enabled = true;
}
}
catch (Exception exception)
{
Expand Down

0 comments on commit 46675aa

Please sign in to comment.