Show/Hide Toolbars

Inventu Viewer+ Server Macros

Navigation: » No topics above this level «

Implementing the ServerMacro Class(es)

Scroll Prev Top Next More

When you create your new Class Library, Visual Studio will create an empty class named Class1--change the name to an appropriate name.

 

1.Add a using reference to the Inventu Viewer+ FSCProLib API namespace.
 

2.If you would like to use RadioButton controls in a ClientParms request, add a reference to the System.Collections.Specialized namespace (required for the OrderedDictionary used for Radio Buttons).

 

3.Next, set your class to run inside the FVMacros namespace.

 

4.Assuming that the SCWebControls reference is working correctly, you should be able to set that your new class inherits from the ServerMacro class which is the base class provided with FVTerm.  Here is an example class declaration for a Server macro named "TestMacro":
 
       clip0004
 

5.Add Registration Properties to describe your macro
 

6.Implement both constructors
 

7.Override the run method
 

8.Implement your logic in the run method--using Client Interaction Methods, General Methods and Properties
 

9.Refer to the Full Example to see it all put together...

 

Note: a single macro assembly can contain multiple ServerMacro child classes--just add another new c# file to your project and implement another class inheriting from ServerMacro