-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Hey there,
thank you for sharing your code!
I just wanted to build the Demo Client solution at development\NET\samples\client\Demo Client but there are several issues when trying to do so.
-
WinFormsUIproject is missing the filesEnums.csandNativeMethods.csin the folderWin32. They are included in theWinFormsUI.csprojfile, see here
Can you maybe provide those files? I have downloaded the latest version of the project from the successor but here the methodShowWindowis missing.
I have just found the missing function in the history
Maybe this helps you to provide the missing files. -
Next thing that seems to be missing is the
icon.icofile within the WinFormsUI project. I solved that one by using the default icon - but it should be fixed if possible. :)
Could not find file 'development\NET\samples\client\Demo Client\WinFormsUI\icon.ico'.
- After solving the above mentioned issues I get the following compile errors:
There is no argument given that corresponds to the required formal parameter 'aType' of 'DaAddressSpaceElement.DaAddressSpaceElement(EnumAddressSpaceElementType, string, string, string, uint, DaSession)' DemoClient2.0 C:\Dev\opc-classic\sdk\development\NET\samples\client\Demo Client\CS\TabControls\AddressSpaceControl.cs 891
which I would fix like this
//previous
DaAddressSpaceElement daAddressSpaceElement = new DaAddressSpaceElement();
//fix
DaAddressSpaceElement daAddressSpaceElement = new DaAddressSpaceElement(EnumAddressSpaceElementType.BRANCH, String.Empty, string.Empty, string.Empty, 0, null);And the following two
There is no argument given that corresponds to the required formal parameter 'executionOptions' of 'DaSession.Browse(string, string, DaAddressSpaceElementBrowseOptions, out DaAddressSpaceElement[], ExecutionOptions)' DemoClient2.0 C:\Dev\opc-classic\sdk\development\NET\samples\client\Demo Client\CS\DockWindows\MainWindow.cs
There is no argument given that corresponds to the required formal parameter 'executionOptions' of 'DaSession.Browse(string, string, DaAddressSpaceElementBrowseOptions, out DaAddressSpaceElement[], ExecutionOptions)' DemoClient2.0 C:\Dev\opc-classic\sdk\development\NET\samples\client\Demo Client\CS\DockWindows\MainWindow.cs
which I would fix like this
// previous code´
daSession.Browse(itemName, browseOptionsLeaf, out addressSpaceElements, executionOptions))
// fixed code
daSession.Browse(((DaAddressSpaceElement)selectedNode.Tag).ItemId,
((DaAddressSpaceElement)selectedNode.Tag).ItemPath,
browseOptionsLeaf,
out addressSpaceElements,
executionOptions))- The Main function required attribute
[STAThreadAttribute] - The
App.configrequired to be changed to only oneTraceFileentry:
//before
<add key="TraceFile1" value="Trace1.txt"/>
<add key="TraceFile2" value="Trace2.txt"/>
//fix
<add key="TraceFile" value="Trace1.txt"/>- I had to manually copy the
OTBux64.dllfrom thebinfolder to thebinfolder of theDemo Client. I guess here the copying may also be broken or it is connected to my settings - idk.
Now I was able to start the Demo Client.
Thank you!
BR Stefan