Moving existing Phidgets.NET Applications To Shared Phidgets

MovingPhidgets.NETApplicationsToSharedPhidgetsVersion3 History

Show minor edits - Show changes to output

Added lines 1-51:
(:title Moving existing Phidgets.NET Applications To Shared Phidgets :)
[[Toolkits.SharedPhidgets3 | << Back to the SharedPhidgets 3 page]]
\\
\\

\\

The API of the components in new SharedPhidgets toolkit is nearly the same as in the Phidgets.NET toolkit for local appliances. While there have been extensions to the API and there exist additional components, you can still access all object in nearly the same way as before. This tutorial describes, how you can port exisiting Phidgets.NET applications to the new SharedPhidgets toolkit.\\


!!The steps in general

# Load your Phidgets.NET project in VisualStudio.
# Remove the ''grouplab.phidgets'' reference
# Add the SharedPhidgets connection manager object and change the IP address
# Replace existing ''GroupLab.Phidgets.UI'' and ''GroupLab.Phidgets'' entries into ''GroupLab.SharedPhidgets''
# Update references to components for the skins
# '''Finished!''' Recompile your application and have fun!

\\

!!The procedure with an example: Simple servo

1) We load a simple servo control application that was created with the Phidgets.NET toolkit: it contains a servo object and a skin for this object.
->Attach:SP-port-0a.png

2) At first we remove the ''grouplab.phidgets'' reference: right click on the reference and click ''remove''.
->Attach:SP-port-0.png

3) Next, we add the SharedPhidgets connection manager object and change the IP address (insert here the address of your server).
->Attach:SP-port-5.png
->Attach:SP-port-6.png

4) Now, we have to replace all existing passages in the code that contains ''GroupLab.Phidgets.UI'' and ''GroupLab.Phidgets'' into ''GroupLab.SharedPhidgets''. Use the ''Replace'' method of Visual Studio:
->Attach:SP-port-1.png

Replace '''AT FIRST''' the passages with ''GroupLab.Phidgets.UI'' to ''GroupLab.SharedPhidgets'':
->Attach:SP-port-2a.png

and then the passages with ''GroupLab.Phidgets'' to ''GroupLab.SharedPhidgets'':
->Attach:SP-port-2.png

5) At last, update the property references to components for every of the the skins. Here in this example, we have only to change the servo property:
->Attach:SP-port-3.png

6) '''Finished!''' Recompile your application and have fun!


\\

\\